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:
authorAndre Susano Pinto <andresusanopinto@gmail.com>2009-10-06 05:58:22 +0400
committerAndre Susano Pinto <andresusanopinto@gmail.com>2009-10-06 05:58:22 +0400
commit63a88075b574e8f2f9adc041f423f49a7356d736 (patch)
tree951f1f65d74d052debdafa14f6ad22750b6aad04
parent11bdf6ea10ee7bc5e2862cdddbf42eddb06c42fa (diff)
parent69a24325742c617a9902376b061006dfb24f0a3c (diff)
svn merge -r 23528:23646 https://svn.blender.org/svnroot/bf-blender/trunk/blendersoc-2009-jaguarandi
-rw-r--r--CMake/macros.cmake38
-rw-r--r--CMakeLists.txt11
-rw-r--r--SConstruct1
-rw-r--r--config/win64-vc-config.py2
-rw-r--r--extern/bullet2/CMakeLists.txt6
-rw-r--r--extern/bullet2/src/SConscript4
-rw-r--r--intern/ghost/CMakeLists.txt17
-rw-r--r--intern/ghost/GHOST_C-api.h10
-rw-r--r--intern/ghost/GHOST_IWindow.h13
-rw-r--r--intern/ghost/GHOST_Types.h6
-rw-r--r--intern/ghost/intern/GHOST_C-api.cpp7
-rw-r--r--intern/ghost/intern/GHOST_DisplayManager.cpp2
-rw-r--r--intern/ghost/intern/GHOST_DisplayManagerCocoa.h106
-rw-r--r--intern/ghost/intern/GHOST_DisplayManagerCocoa.mm168
-rw-r--r--intern/ghost/intern/GHOST_ISystem.cpp12
-rw-r--r--intern/ghost/intern/GHOST_SystemCocoa.h274
-rw-r--r--intern/ghost/intern/GHOST_SystemCocoa.mm1414
-rw-r--r--intern/ghost/intern/GHOST_Window.cpp16
-rw-r--r--intern/ghost/intern/GHOST_Window.h16
-rw-r--r--intern/ghost/intern/GHOST_WindowCocoa.h315
-rw-r--r--intern/ghost/intern/GHOST_WindowCocoa.mm751
-rw-r--r--intern/ghost/intern/GHOST_WindowManager.cpp19
-rw-r--r--intern/ghost/intern/GHOST_WindowManager.h10
-rw-r--r--intern/guardedalloc/intern/mallocn.c24
-rw-r--r--intern/smoke/intern/FLUID_3D.cpp16
-rw-r--r--intern/smoke/intern/FLUID_3D_STATIC.cpp2
-rw-r--r--intern/smoke/intern/WTURBULENCE.cpp52
-rw-r--r--projectfiles_vc9/blender/blenpluginapi/blenpluginapi/blenpluginapi.vcproj12
-rw-r--r--projectfiles_vc9/blender/editors/ED_editors.vcproj46
-rw-r--r--projectfiles_vc9/blender/makesrna/RNA_rna.vcproj4
-rw-r--r--projectfiles_vc9/blender/nodes/nodes.vcproj8
-rw-r--r--projectfiles_vc9/blender/render/BRE_render.vcproj4
-rw-r--r--projectfiles_vc9/blender/windowmanager/windowmanager.vcproj4
-rw-r--r--release/scripts/io/export_3ds.py22
-rw-r--r--release/scripts/io/export_fbx.py28
-rw-r--r--release/scripts/io/export_obj.py31
-rw-r--r--release/scripts/io/export_x3d.py13
-rw-r--r--release/scripts/io/import_3ds.py7
-rw-r--r--release/scripts/io/import_obj.py19
-rw-r--r--release/scripts/io/netrender/client.py4
-rw-r--r--release/scripts/io/netrender/master.py40
-rw-r--r--release/scripts/io/netrender/master_html.py13
-rw-r--r--release/scripts/io/netrender/model.py22
-rw-r--r--release/scripts/io/netrender/slave.py71
-rw-r--r--release/scripts/modules/bpy_ops.py17
-rw-r--r--release/scripts/ui/buttons_data_bone.py210
-rw-r--r--release/scripts/ui/buttons_data_lamp.py6
-rw-r--r--release/scripts/ui/buttons_material.py70
-rw-r--r--release/scripts/ui/buttons_object.py4
-rw-r--r--release/scripts/ui/buttons_object_constraint.py141
-rw-r--r--release/scripts/ui/buttons_particle.py268
-rw-r--r--release/scripts/ui/buttons_physics_cloth.py38
-rw-r--r--release/scripts/ui/buttons_physics_common.py154
-rw-r--r--release/scripts/ui/buttons_physics_field.py114
-rw-r--r--release/scripts/ui/buttons_physics_softbody.py17
-rw-r--r--release/scripts/ui/buttons_scene.py106
-rw-r--r--release/scripts/ui/buttons_texture.py21
-rw-r--r--release/scripts/ui/space_info.py4
-rw-r--r--release/scripts/ui/space_userpref.py1
-rw-r--r--release/scripts/ui/space_view3d.py21
-rw-r--r--source/Makefile2
-rw-r--r--source/blender/blenkernel/BKE_DerivedMesh.h2
-rw-r--r--source/blender/blenkernel/BKE_blender.h2
-rw-r--r--source/blender/blenkernel/BKE_bvhutils.h4
-rw-r--r--source/blender/blenkernel/BKE_collision.h9
-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_image.h8
-rw-r--r--source/blender/blenkernel/BKE_node.h2
-rw-r--r--source/blender/blenkernel/BKE_paint.h2
-rw-r--r--source/blender/blenkernel/BKE_particle.h67
-rw-r--r--source/blender/blenkernel/intern/DerivedMesh.c212
-rw-r--r--source/blender/blenkernel/intern/action.c9
-rw-r--r--source/blender/blenkernel/intern/anim.c59
-rw-r--r--source/blender/blenkernel/intern/anim_sys.c15
-rw-r--r--source/blender/blenkernel/intern/boids.c192
-rw-r--r--source/blender/blenkernel/intern/bvhutils.c88
-rw-r--r--source/blender/blenkernel/intern/cdderivedmesh.c1098
-rw-r--r--source/blender/blenkernel/intern/cloth.c7
-rw-r--r--source/blender/blenkernel/intern/collision.c95
-rw-r--r--source/blender/blenkernel/intern/customdata.c4
-rw-r--r--source/blender/blenkernel/intern/depsgraph.c72
-rw-r--r--source/blender/blenkernel/intern/effect.c862
-rw-r--r--source/blender/blenkernel/intern/image.c61
-rw-r--r--source/blender/blenkernel/intern/implicit.c22
-rw-r--r--source/blender/blenkernel/intern/ipo.c54
-rw-r--r--source/blender/blenkernel/intern/lattice.c144
-rw-r--r--source/blender/blenkernel/intern/library.c44
-rw-r--r--source/blender/blenkernel/intern/material.c8
-rw-r--r--source/blender/blenkernel/intern/modifier.c15
-rw-r--r--source/blender/blenkernel/intern/nla.c3
-rw-r--r--source/blender/blenkernel/intern/node.c1
-rw-r--r--source/blender/blenkernel/intern/object.c42
-rw-r--r--source/blender/blenkernel/intern/particle.c430
-rw-r--r--source/blender/blenkernel/intern/particle_system.c719
-rw-r--r--source/blender/blenkernel/intern/pointcache.c28
-rw-r--r--source/blender/blenkernel/intern/scene.c14
-rw-r--r--source/blender/blenkernel/intern/sequence.c4
-rw-r--r--source/blender/blenkernel/intern/smoke.c252
-rw-r--r--source/blender/blenkernel/intern/softbody.c67
-rw-r--r--source/blender/blenkernel/intern/texture.c31
-rw-r--r--source/blender/blenkernel/intern/world.c11
-rw-r--r--source/blender/blenlib/BLI_threads.h53
-rw-r--r--source/blender/blenlib/intern/dynlib.c200
-rw-r--r--source/blender/blenlib/intern/threads.c94
-rw-r--r--source/blender/blenlib/intern/util.c14
-rw-r--r--source/blender/blenloader/intern/readfile.c215
-rw-r--r--source/blender/blenloader/intern/writefile.c16
-rw-r--r--source/blender/blenpluginapi/CMakeLists.txt4
-rw-r--r--source/blender/blenpluginapi/SConscript7
-rw-r--r--source/blender/editors/Makefile2
-rw-r--r--source/blender/editors/SConscript2
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c2
-rw-r--r--source/blender/editors/animation/anim_intern.h40
-rw-r--r--source/blender/editors/animation/anim_markers.c1
-rw-r--r--source/blender/editors/animation/anim_ops.c14
-rw-r--r--source/blender/editors/animation/fmodifier_ui.c2
-rw-r--r--source/blender/editors/animation/keyingsets.c209
-rw-r--r--source/blender/editors/armature/SConscript7
-rw-r--r--source/blender/editors/armature/armature_ops.c2
-rw-r--r--source/blender/editors/datafiles/B.blend.c5391
-rw-r--r--source/blender/editors/include/BIF_glutil.h1
-rw-r--r--source/blender/editors/include/ED_image.h5
-rw-r--r--source/blender/editors/include/ED_keyframing.h32
-rw-r--r--source/blender/editors/include/ED_mesh.h22
-rw-r--r--source/blender/editors/include/ED_particle.h17
-rw-r--r--source/blender/editors/include/ED_physics.h7
-rw-r--r--source/blender/editors/include/ED_render.h (renamed from source/blender/editors/include/ED_previewrender.h)27
-rw-r--r--source/blender/editors/include/ED_transform.h4
-rw-r--r--source/blender/editors/include/UI_interface.h2
-rw-r--r--source/blender/editors/include/UI_interface_icons.h6
-rw-r--r--source/blender/editors/interface/SConscript5
-rw-r--r--source/blender/editors/interface/interface.c14
-rw-r--r--source/blender/editors/interface/interface_handlers.c2
-rw-r--r--source/blender/editors/interface/interface_icons.c467
-rw-r--r--source/blender/editors/interface/interface_intern.h5
-rw-r--r--source/blender/editors/interface/interface_layout.c9
-rw-r--r--source/blender/editors/interface/interface_templates.c92
-rw-r--r--source/blender/editors/interface/interface_widgets.c39
-rw-r--r--source/blender/editors/interface/resources.c3
-rw-r--r--source/blender/editors/mesh/SConscript7
-rw-r--r--source/blender/editors/mesh/editface.c64
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c6
-rw-r--r--source/blender/editors/mesh/loopcut.c38
-rw-r--r--source/blender/editors/mesh/mesh_data.c (renamed from source/blender/editors/mesh/mesh_layers.c)388
-rw-r--r--source/blender/editors/mesh/mesh_ops.c1
-rw-r--r--source/blender/editors/object/object_add.c88
-rw-r--r--source/blender/editors/object/object_edit.c9
-rw-r--r--source/blender/editors/object/object_intern.h5
-rw-r--r--source/blender/editors/object/object_modifier.c6
-rw-r--r--source/blender/editors/object/object_ops.c4
-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)91
-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/render/Makefile (renamed from source/blender/editors/preview/Makefile)2
-rw-r--r--source/blender/editors/render/SConscript (renamed from source/blender/editors/preview/SConscript)9
-rw-r--r--source/blender/editors/render/render_intern.h (renamed from source/blender/editors/preview/previewrender_intern.h)20
-rw-r--r--source/blender/editors/render/render_ops.c54
-rw-r--r--source/blender/editors/render/render_preview.c (renamed from source/blender/editors/preview/previewrender.c)224
-rw-r--r--source/blender/editors/render/render_shading.c645
-rw-r--r--source/blender/editors/screen/SConscript7
-rw-r--r--source/blender/editors/screen/area.c25
-rw-r--r--source/blender/editors/screen/glutil.c12
-rw-r--r--source/blender/editors/screen/screen_ops.c21
-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.c20
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c146
-rw-r--r--source/blender/editors/space_action/action_edit.c21
-rw-r--r--source/blender/editors/space_api/spacetypes.c10
-rw-r--r--source/blender/editors/space_buttons/buttons_intern.h27
-rw-r--r--source/blender/editors/space_buttons/buttons_ops.c986
-rw-r--r--source/blender/editors/space_buttons/space_buttons.c29
-rw-r--r--source/blender/editors/space_file/SConscript7
-rw-r--r--source/blender/editors/space_file/file_draw.c6
-rw-r--r--source/blender/editors/space_file/space_file.c1
-rw-r--r--source/blender/editors/space_file/writeimage.c14
-rw-r--r--source/blender/editors/space_graph/graph_utils.c3
-rw-r--r--source/blender/editors/space_image/image_buttons.c30
-rw-r--r--source/blender/editors/space_image/image_draw.c12
-rw-r--r--source/blender/editors/space_image/image_ops.c152
-rw-r--r--source/blender/editors/space_image/space_image.c71
-rw-r--r--source/blender/editors/space_node/SConscript9
-rw-r--r--source/blender/editors/space_node/node_draw.c27
-rw-r--r--source/blender/editors/space_node/node_edit.c11
-rw-r--r--source/blender/editors/space_node/space_node.c2
-rw-r--r--source/blender/editors/space_outliner/outliner.c14
-rw-r--r--source/blender/editors/space_outliner/outliner_header.c2
-rw-r--r--source/blender/editors/space_outliner/space_outliner.c7
-rw-r--r--source/blender/editors/space_text/text_ops.c58
-rw-r--r--source/blender/editors/space_view3d/drawmesh.c95
-rw-r--r--source/blender/editors/space_view3d/drawobject.c1002
-rw-r--r--source/blender/editors/space_view3d/space_view3d.c9
-rw-r--r--source/blender/editors/space_view3d/view3d_buttons.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_header.c9
-rw-r--r--source/blender/editors/transform/transform.c1
-rw-r--r--source/blender/editors/transform/transform.h13
-rw-r--r--source/blender/editors/transform/transform_conversions.c3
-rw-r--r--source/blender/editors/transform/transform_generics.c3
-rw-r--r--source/blender/editors/transform/transform_manipulator.c19
-rw-r--r--source/blender/editors/transform/transform_ops.c94
-rw-r--r--source/blender/editors/transform/transform_orientations.c288
-rw-r--r--source/blender/editors/transform/transform_snap.c12
-rw-r--r--source/blender/gpu/gpu_buffers.h157
-rw-r--r--source/blender/gpu/intern/gpu_buffers.c1261
-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/makesdna/DNA_action_types.h9
-rw-r--r--source/blender/makesdna/DNA_anim_types.h6
-rw-r--r--source/blender/makesdna/DNA_cloth_types.h2
-rw-r--r--source/blender/makesdna/DNA_customdata_types.h4
-rw-r--r--source/blender/makesdna/DNA_material_types.h58
-rw-r--r--source/blender/makesdna/DNA_modifier_types.h21
-rw-r--r--source/blender/makesdna/DNA_object_force.h127
-rw-r--r--source/blender/makesdna/DNA_object_types.h2
-rw-r--r--source/blender/makesdna/DNA_particle_types.h42
-rw-r--r--source/blender/makesdna/DNA_scene_types.h11
-rw-r--r--source/blender/makesdna/DNA_texture_types.h27
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h1
-rw-r--r--source/blender/makesrna/RNA_types.h5
-rw-r--r--source/blender/makesrna/SConscript8
-rw-r--r--source/blender/makesrna/intern/CMakeLists.txt4
-rw-r--r--source/blender/makesrna/intern/SConscript10
-rw-r--r--source/blender/makesrna/intern/rna_ID.c21
-rw-r--r--source/blender/makesrna/intern/rna_animation.c56
-rw-r--r--source/blender/makesrna/intern/rna_boid.c27
-rw-r--r--source/blender/makesrna/intern/rna_brush.c84
-rw-r--r--source/blender/makesrna/intern/rna_camera.c19
-rw-r--r--source/blender/makesrna/intern/rna_cloth.c5
-rw-r--r--source/blender/makesrna/intern/rna_image.c23
-rw-r--r--source/blender/makesrna/intern/rna_internal.h3
-rw-r--r--source/blender/makesrna/intern/rna_lamp.c172
-rw-r--r--source/blender/makesrna/intern/rna_material.c558
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c7
-rw-r--r--source/blender/makesrna/intern/rna_mesh_api.c263
-rw-r--r--source/blender/makesrna/intern/rna_object.c8
-rw-r--r--source/blender/makesrna/intern/rna_object_force.c540
-rw-r--r--source/blender/makesrna/intern/rna_particle.c352
-rw-r--r--source/blender/makesrna/intern/rna_pose.c29
-rw-r--r--source/blender/makesrna/intern/rna_scene.c23
-rw-r--r--source/blender/makesrna/intern/rna_space.c14
-rw-r--r--source/blender/makesrna/intern/rna_texture.c425
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c4
-rw-r--r--source/blender/makesrna/intern/rna_world.c103
-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_composite.c7
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_image.c10
-rw-r--r--source/blender/nodes/intern/CMP_util.c9
-rw-r--r--source/blender/nodes/intern/TEX_util.c14
-rw-r--r--source/blender/nodes/intern/TEX_util.h2
-rw-r--r--source/blender/python/CMakeLists.txt2
-rw-r--r--source/blender/python/generic/matrix.c2
-rw-r--r--source/blender/render/CMakeLists.txt8
-rw-r--r--source/blender/render/SConscript11
-rw-r--r--source/blender/render/extern/include/RE_pipeline.h7
-rw-r--r--source/blender/render/extern/include/RE_render_ext.h2
-rw-r--r--source/blender/render/extern/include/RE_shader_ext.h1
-rw-r--r--source/blender/render/intern/include/render_types.h4
-rw-r--r--source/blender/render/intern/include/volume_precache.h2
-rw-r--r--source/blender/render/intern/include/volumetric.h3
-rw-r--r--source/blender/render/intern/source/convertblender.c29
-rw-r--r--source/blender/render/intern/source/pipeline.c168
-rw-r--r--source/blender/render/intern/source/rayshade.c3
-rw-r--r--source/blender/render/intern/source/renderdatabase.c10
-rw-r--r--source/blender/render/intern/source/sss.c4
-rw-r--r--source/blender/render/intern/source/texture.c119
-rw-r--r--source/blender/render/intern/source/volume_precache.c61
-rw-r--r--source/blender/render/intern/source/volumetric.c340
-rw-r--r--source/blender/render/intern/source/voxeldata.c6
-rw-r--r--source/blender/windowmanager/CMakeLists.txt4
-rw-r--r--source/blender/windowmanager/SConscript7
-rw-r--r--source/blender/windowmanager/WM_api.h4
-rw-r--r--source/blender/windowmanager/WM_types.h9
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c25
-rw-r--r--source/blender/windowmanager/intern/wm_files.c5
-rw-r--r--source/blender/windowmanager/intern/wm_init_exit.c10
-rw-r--r--source/blender/windowmanager/intern/wm_jobs.c33
-rw-r--r--source/blender/windowmanager/intern/wm_subwindow.c4
-rw-r--r--source/blender/windowmanager/intern/wm_window.c17
-rw-r--r--source/blender/windowmanager/wm_subwindow.h1
-rw-r--r--source/blenderplayer/bad_level_call_stubs/stubs.c19
-rw-r--r--source/creator/CMakeLists.txt13
-rw-r--r--source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp41
-rw-r--r--source/gameengine/BlenderRoutines/CMakeLists.txt7
-rw-r--r--source/gameengine/BlenderRoutines/SConscript6
-rw-r--r--source/gameengine/CMakeLists.txt5
-rw-r--r--source/gameengine/Converter/BL_ActionActuator.cpp4
-rw-r--r--source/gameengine/Converter/BL_ActionActuator.h3
-rw-r--r--source/gameengine/Converter/BL_ArmatureActuator.cpp4
-rw-r--r--source/gameengine/Converter/BL_ArmatureActuator.h4
-rw-r--r--source/gameengine/Converter/BL_ArmatureChannel.cpp8
-rw-r--r--source/gameengine/Converter/BL_ArmatureChannel.h8
-rw-r--r--source/gameengine/Converter/BL_ArmatureConstraint.cpp7
-rw-r--r--source/gameengine/Converter/BL_ArmatureConstraint.h9
-rw-r--r--source/gameengine/Converter/BL_ArmatureObject.cpp6
-rw-r--r--source/gameengine/Converter/BL_ArmatureObject.h4
-rw-r--r--source/gameengine/Converter/BL_BlenderDataConversion.cpp9
-rw-r--r--source/gameengine/Converter/BL_BlenderDataConversion.h1
-rw-r--r--source/gameengine/Converter/BL_ShapeActionActuator.cpp4
-rw-r--r--source/gameengine/Converter/BL_ShapeActionActuator.h4
-rw-r--r--source/gameengine/Converter/CMakeLists.txt7
-rw-r--r--source/gameengine/Converter/KX_BlenderSceneConverter.cpp9
-rw-r--r--source/gameengine/Converter/KX_BlenderSceneConverter.h4
-rw-r--r--source/gameengine/Converter/KX_ConvertControllers.cpp16
-rw-r--r--source/gameengine/Converter/KX_ConvertControllers.h3
-rw-r--r--source/gameengine/Converter/KX_ConvertProperties.cpp3
-rw-r--r--source/gameengine/Converter/KX_ConvertSensors.cpp1
-rw-r--r--source/gameengine/Converter/SConscript12
-rw-r--r--source/gameengine/Expressions/BoolValue.cpp4
-rw-r--r--source/gameengine/Expressions/BoolValue.h2
-rw-r--r--source/gameengine/Expressions/CMakeLists.txt7
-rw-r--r--source/gameengine/Expressions/FloatValue.cpp4
-rw-r--r--source/gameengine/Expressions/FloatValue.h2
-rw-r--r--source/gameengine/Expressions/IntValue.cpp3
-rw-r--r--source/gameengine/Expressions/IntValue.h3
-rw-r--r--source/gameengine/Expressions/KX_Python.h4
-rw-r--r--source/gameengine/Expressions/ListValue.cpp526
-rw-r--r--source/gameengine/Expressions/ListValue.h3
-rw-r--r--source/gameengine/Expressions/PyObjectPlus.cpp95
-rw-r--r--source/gameengine/Expressions/PyObjectPlus.h48
-rw-r--r--source/gameengine/Expressions/SConscript10
-rw-r--r--source/gameengine/Expressions/StringValue.h2
-rw-r--r--source/gameengine/Expressions/Value.cpp14
-rw-r--r--source/gameengine/Expressions/Value.h22
-rw-r--r--source/gameengine/GameLogic/CMakeLists.txt7
-rw-r--r--source/gameengine/GameLogic/SCA_2DFilterActuator.cpp6
-rw-r--r--source/gameengine/GameLogic/SCA_ANDController.cpp4
-rw-r--r--source/gameengine/GameLogic/SCA_ActuatorSensor.cpp3
-rw-r--r--source/gameengine/GameLogic/SCA_ActuatorSensor.h6
-rw-r--r--source/gameengine/GameLogic/SCA_AlwaysSensor.cpp4
-rw-r--r--source/gameengine/GameLogic/SCA_DelaySensor.cpp4
-rw-r--r--source/gameengine/GameLogic/SCA_ExpressionController.cpp2
-rw-r--r--source/gameengine/GameLogic/SCA_IActuator.cpp1
-rw-r--r--source/gameengine/GameLogic/SCA_IController.cpp5
-rw-r--r--source/gameengine/GameLogic/SCA_IController.h4
-rw-r--r--source/gameengine/GameLogic/SCA_ILogicBrick.cpp3
-rw-r--r--source/gameengine/GameLogic/SCA_ILogicBrick.h4
-rw-r--r--source/gameengine/GameLogic/SCA_IObject.cpp4
-rw-r--r--source/gameengine/GameLogic/SCA_IObject.h3
-rw-r--r--source/gameengine/GameLogic/SCA_ISensor.cpp6
-rw-r--r--source/gameengine/GameLogic/SCA_ISensor.h2
-rw-r--r--source/gameengine/GameLogic/SCA_JoystickSensor.cpp4
-rw-r--r--source/gameengine/GameLogic/SCA_JoystickSensor.h4
-rw-r--r--source/gameengine/GameLogic/SCA_KeyboardSensor.cpp2
-rw-r--r--source/gameengine/GameLogic/SCA_KeyboardSensor.h2
-rw-r--r--source/gameengine/GameLogic/SCA_LogicManager.cpp4
-rw-r--r--source/gameengine/GameLogic/SCA_MouseSensor.cpp21
-rw-r--r--source/gameengine/GameLogic/SCA_MouseSensor.h12
-rw-r--r--source/gameengine/GameLogic/SCA_NANDController.cpp4
-rw-r--r--source/gameengine/GameLogic/SCA_NORController.cpp4
-rw-r--r--source/gameengine/GameLogic/SCA_ORController.cpp4
-rw-r--r--source/gameengine/GameLogic/SCA_PropertyActuator.cpp3
-rw-r--r--source/gameengine/GameLogic/SCA_PropertySensor.cpp29
-rw-r--r--source/gameengine/GameLogic/SCA_PropertySensor.h4
-rw-r--r--source/gameengine/GameLogic/SCA_PythonController.cpp36
-rw-r--r--source/gameengine/GameLogic/SCA_PythonController.h14
-rw-r--r--source/gameengine/GameLogic/SCA_RandomActuator.cpp6
-rw-r--r--source/gameengine/GameLogic/SCA_RandomActuator.h5
-rw-r--r--source/gameengine/GameLogic/SCA_RandomSensor.cpp4
-rw-r--r--source/gameengine/GameLogic/SCA_RandomSensor.h4
-rw-r--r--source/gameengine/GameLogic/SCA_XNORController.cpp4
-rw-r--r--source/gameengine/GameLogic/SCA_XORController.cpp3
-rw-r--r--source/gameengine/GameLogic/SConscript8
-rw-r--r--source/gameengine/GamePlayer/common/SConscript10
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_Application.cpp3
-rw-r--r--source/gameengine/GamePlayer/ghost/SConscript8
-rw-r--r--source/gameengine/Ketsji/BL_Shader.cpp4
-rw-r--r--source/gameengine/Ketsji/BL_Shader.h2
-rw-r--r--source/gameengine/Ketsji/CMakeLists.txt7
-rw-r--r--source/gameengine/Ketsji/KXNetwork/CMakeLists.txt7
-rw-r--r--source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp4
-rw-r--r--source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp4
-rw-r--r--source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h4
-rw-r--r--source/gameengine/Ketsji/KXNetwork/SConscript9
-rw-r--r--source/gameengine/Ketsji/KX_ArmatureSensor.cpp3
-rw-r--r--source/gameengine/Ketsji/KX_ArmatureSensor.h4
-rw-r--r--source/gameengine/Ketsji/KX_BlenderMaterial.cpp25
-rw-r--r--source/gameengine/Ketsji/KX_BlenderMaterial.h2
-rw-r--r--source/gameengine/Ketsji/KX_Camera.cpp3
-rw-r--r--source/gameengine/Ketsji/KX_Camera.h4
-rw-r--r--source/gameengine/Ketsji/KX_CameraActuator.cpp4
-rw-r--r--source/gameengine/Ketsji/KX_CameraActuator.h4
-rw-r--r--source/gameengine/Ketsji/KX_ConstraintActuator.cpp6
-rw-r--r--source/gameengine/Ketsji/KX_ConstraintWrapper.cpp6
-rw-r--r--source/gameengine/Ketsji/KX_ConstraintWrapper.h2
-rw-r--r--source/gameengine/Ketsji/KX_Dome.cpp71
-rw-r--r--source/gameengine/Ketsji/KX_GameActuator.cpp12
-rw-r--r--source/gameengine/Ketsji/KX_GameObject.cpp79
-rw-r--r--source/gameengine/Ketsji/KX_GameObject.h32
-rw-r--r--source/gameengine/Ketsji/KX_ISceneConverter.h1
-rw-r--r--source/gameengine/Ketsji/KX_IpoActuator.cpp5
-rw-r--r--source/gameengine/Ketsji/KX_KetsjiEngine.cpp13
-rw-r--r--source/gameengine/Ketsji/KX_KetsjiEngine.h7
-rw-r--r--source/gameengine/Ketsji/KX_Light.cpp2
-rw-r--r--source/gameengine/Ketsji/KX_Light.h6
-rw-r--r--source/gameengine/Ketsji/KX_MeshProxy.cpp4
-rw-r--r--source/gameengine/Ketsji/KX_MeshProxy.h4
-rw-r--r--source/gameengine/Ketsji/KX_MouseFocusSensor.cpp4
-rw-r--r--source/gameengine/Ketsji/KX_MouseFocusSensor.h4
-rw-r--r--source/gameengine/Ketsji/KX_NearSensor.cpp5
-rw-r--r--source/gameengine/Ketsji/KX_NearSensor.h4
-rw-r--r--source/gameengine/Ketsji/KX_ObjectActuator.cpp4
-rw-r--r--source/gameengine/Ketsji/KX_ObjectActuator.h5
-rw-r--r--source/gameengine/Ketsji/KX_ParentActuator.cpp4
-rw-r--r--source/gameengine/Ketsji/KX_ParentActuator.h4
-rw-r--r--source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp5
-rw-r--r--source/gameengine/Ketsji/KX_PhysicsObjectWrapper.h4
-rw-r--r--source/gameengine/Ketsji/KX_PolyProxy.cpp4
-rw-r--r--source/gameengine/Ketsji/KX_PolyProxy.h4
-rw-r--r--source/gameengine/Ketsji/KX_PolygonMaterial.cpp12
-rw-r--r--source/gameengine/Ketsji/KX_PolygonMaterial.h5
-rw-r--r--source/gameengine/Ketsji/KX_PyConstraintBinding.cpp4
-rw-r--r--source/gameengine/Ketsji/KX_PyConstraintBinding.h4
-rw-r--r--source/gameengine/Ketsji/KX_PyMath.cpp4
-rw-r--r--source/gameengine/Ketsji/KX_PyMath.h3
-rw-r--r--source/gameengine/Ketsji/KX_PythonInit.cpp69
-rw-r--r--source/gameengine/Ketsji/KX_PythonInit.h3
-rw-r--r--source/gameengine/Ketsji/KX_PythonInitTypes.cpp4
-rw-r--r--source/gameengine/Ketsji/KX_PythonInitTypes.h2
-rw-r--r--source/gameengine/Ketsji/KX_PythonSeq.cpp3
-rw-r--r--source/gameengine/Ketsji/KX_PythonSeq.h4
-rw-r--r--source/gameengine/Ketsji/KX_RadarSensor.cpp3
-rw-r--r--source/gameengine/Ketsji/KX_RayEventManager.h2
-rw-r--r--source/gameengine/Ketsji/KX_RaySensor.cpp6
-rw-r--r--source/gameengine/Ketsji/KX_RaySensor.h3
-rw-r--r--source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp16
-rw-r--r--source/gameengine/Ketsji/KX_SCA_AddObjectActuator.h4
-rw-r--r--source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp4
-rw-r--r--source/gameengine/Ketsji/KX_SCA_EndObjectActuator.cpp4
-rw-r--r--source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.cpp4
-rw-r--r--source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.h4
-rw-r--r--source/gameengine/Ketsji/KX_Scene.cpp19
-rw-r--r--source/gameengine/Ketsji/KX_Scene.h6
-rw-r--r--source/gameengine/Ketsji/KX_SceneActuator.cpp4
-rw-r--r--source/gameengine/Ketsji/KX_SceneActuator.h4
-rw-r--r--source/gameengine/Ketsji/KX_SoundActuator.cpp4
-rw-r--r--source/gameengine/Ketsji/KX_SoundActuator.h5
-rw-r--r--source/gameengine/Ketsji/KX_StateActuator.cpp3
-rw-r--r--source/gameengine/Ketsji/KX_TouchSensor.cpp2
-rw-r--r--source/gameengine/Ketsji/KX_TouchSensor.h5
-rw-r--r--source/gameengine/Ketsji/KX_TrackToActuator.cpp6
-rw-r--r--source/gameengine/Ketsji/KX_TrackToActuator.h4
-rw-r--r--source/gameengine/Ketsji/KX_VehicleWrapper.cpp4
-rw-r--r--source/gameengine/Ketsji/KX_VehicleWrapper.h3
-rw-r--r--source/gameengine/Ketsji/KX_VertexProxy.cpp4
-rw-r--r--source/gameengine/Ketsji/KX_VertexProxy.h4
-rw-r--r--source/gameengine/Ketsji/KX_VisibilityActuator.cpp4
-rw-r--r--source/gameengine/Ketsji/SConscript6
-rw-r--r--source/gameengine/Physics/Bullet/CcdPhysicsController.cpp2
-rw-r--r--source/gameengine/Physics/Bullet/SConscript10
-rw-r--r--source/gameengine/Rasterizer/RAS_2DFilterManager.cpp2
-rw-r--r--source/gameengine/Rasterizer/SConscript10
-rw-r--r--source/gameengine/SConscript6
-rw-r--r--source/gameengine/VideoTexture/CMakeLists.txt7
-rw-r--r--source/gameengine/VideoTexture/SConscript5
-rw-r--r--source/gameengine/VideoTexture/VideoFFmpeg.h2
-rw-r--r--tools/Blender.py67
463 files changed, 20319 insertions, 10050 deletions
diff --git a/CMake/macros.cmake b/CMake/macros.cmake
index 6a337505c00..150bd55bfd7 100644
--- a/CMake/macros.cmake
+++ b/CMake/macros.cmake
@@ -85,33 +85,32 @@ ENDMACRO(SETUP_LIBDIRS)
MACRO(SETUP_LIBLINKS
target)
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS} ")
- #TARGET_LINK_LIBRARIES(${target} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${PYTHON_LIB} ${PYTHON_LINKFLAGS} ${JPEG_LIB} ${PNG_LIB} ${ZLIB_LIB} ${SDL_LIBRARY} ${LLIBS})
- TARGET_LINK_LIBRARIES(${target} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${PYTHON_LINKFLAGS} ${JPEG_LIBRARY} ${PNG_LIBRARIES} ${ZLIB_LIBRARIES} ${LLIBS})
+ TARGET_LINK_LIBRARIES(${target} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${JPEG_LIBRARY} ${PNG_LIBRARIES} ${ZLIB_LIBRARIES} ${LLIBS})
# since we are using the local libs for python when compiling msvc projects, we need to add _d when compiling debug versions
- IF(WIN32)
- TARGET_LINK_LIBRARIES(${target} debug ${PYTHON_LIB}_d)
- TARGET_LINK_LIBRARIES(${target} optimized ${PYTHON_LIB})
- ELSE(WIN32)
- TARGET_LINK_LIBRARIES(${target} ${PYTHON_LIB})
- ENDIF(WIN32)
+ IF(WITH_PYTHON)
+ TARGET_LINK_LIBRARIES(${target} ${PYTHON_LINKFLAGS})
- TARGET_LINK_LIBRARIES(${target} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${PYTHON_LINKFLAGS} ${JPEG_LIB} ${PNG_LIB} ${ZLIB_LIB} ${LLIBS})
+ IF(WIN32)
+ TARGET_LINK_LIBRARIES(${target} debug ${PYTHON_LIB}_d)
+ TARGET_LINK_LIBRARIES(${target} optimized ${PYTHON_LIB})
+ ELSE(WIN32)
+ TARGET_LINK_LIBRARIES(${target} ${PYTHON_LIB})
+ ENDIF(WIN32)
+ ENDIF(WITH_PYTHON)
+
+ TARGET_LINK_LIBRARIES(${target} ${OPENGL_glu_LIBRARY} ${JPEG_LIB} ${PNG_LIB} ${ZLIB_LIB})
TARGET_LINK_LIBRARIES(${target} ${FREETYPE_LIBRARY} ${LIBSAMPLERATE_LIB})
- # since we are using the local libs for python when compiling msvc projects, we need to add _d when compiling debug versions
-
- IF(WIN32)
- TARGET_LINK_LIBRARIES(${target} debug ${PYTHON_LIB}_d)
- TARGET_LINK_LIBRARIES(${target} optimized ${PYTHON_LIB})
- ELSE(WIN32)
- TARGET_LINK_LIBRARIES(${target} ${PYTHON_LIB})
- ENDIF(WIN32)
-
IF(WITH_INTERNATIONAL)
TARGET_LINK_LIBRARIES(${target} ${GETTEXT_LIB})
+
+ IF(WIN32)
+ TARGET_LINK_LIBRARIES(${target} ${ICONV_LIB})
+ ENDIF(WIN32)
ENDIF(WITH_INTERNATIONAL)
+
IF(WITH_OPENAL)
TARGET_LINK_LIBRARIES(${target} ${OPENAL_LIBRARY})
ENDIF(WITH_OPENAL)
@@ -127,9 +126,6 @@ MACRO(SETUP_LIBLINKS
IF(WITH_SDL)
TARGET_LINK_LIBRARIES(${target} ${SDL_LIBRARY})
ENDIF(WITH_SDL)
- IF(WIN32)
- TARGET_LINK_LIBRARIES(${target} ${ICONV_LIB})
- ENDIF(WIN32)
IF(WITH_QUICKTIME)
TARGET_LINK_LIBRARIES(${target} ${QUICKTIME_LIB})
ENDIF(WITH_QUICKTIME)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d8c5a132995..d53f4ed9966 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -81,6 +81,10 @@ OPTION(WITH_CXX_GUARDEDALLOC "Enable GuardedAlloc for C++ memory allocation" OFF
OPTION(WITH_BUILDINFO "Include extra build details" ON)
OPTION(WITH_INSTALL "Install accompanying scripts and language files needed to run blender" ON)
+IF (APPLE)
+OPTION(WITH_COCOA "Use Cocoa framework instead of deprecated Carbon" OFF)
+ENDIF (APPLE)
+
IF(NOT WITH_GAMEENGINE AND WITH_PLAYER)
MESSAGE("WARNING: WITH_PLAYER needs WITH_GAMEENGINE")
ENDIF(NOT WITH_GAMEENGINE AND WITH_PLAYER)
@@ -402,6 +406,7 @@ IF(APPLE)
FIND_PACKAGE(OpenAL)
IF(OPENAL_FOUND)
SET(WITH_OPENAL ON)
+ SET(OPENAL_INCLUDE_DIR "${OPENAL_INCLUDE_DIR};${LIBDIR}/openal/include")
ELSE(OPENAL_FOUND)
SET(WITH_OPENAL OFF)
ENDIF(OPENAL_FOUND)
@@ -485,9 +490,13 @@ IF(APPLE)
SET(LLIBS stdc++ SystemStubs)
+ IF (WITH_COCOA)
+ SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing -DGHOST_COCOA")
+ SET(PLATFORM_LINKFLAGS "-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Cocoa -framework Carbon -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework QuickTime")
+ ELSE (WITH_COCOA)
SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
SET(PLATFORM_LINKFLAGS "-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Carbon -framework AGL -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework QuickTime")
-
+ ENDIF (WITH_COCOA)
IF(WITH_OPENMP)
SET(LLIBS "${LLIBS} -lgomp ")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp ")
diff --git a/SConstruct b/SConstruct
index 5c4af916327..4d6ef7ccb49 100644
--- a/SConstruct
+++ b/SConstruct
@@ -643,7 +643,6 @@ if env['WITH_BF_DOCS']:
except: epydoc = None
if epydoc:
- SConscript('source/blender/python/api2_2x/doc/SConscript')
SConscript('source/gameengine/PyDoc/SConscript')
else:
print "No epydoc install detected, Python API and Gameengine API Docs will not be generated "
diff --git a/config/win64-vc-config.py b/config/win64-vc-config.py
index 5bb01ff16b5..5f088489b34 100644
--- a/config/win64-vc-config.py
+++ b/config/win64-vc-config.py
@@ -164,7 +164,7 @@ CXX = 'cl.exe'
CFLAGS = []
CCFLAGS = ['/nologo', '/Ob1', '/J', '/W3', '/Gd', '/wd4244', '/wd4305', '/wd4800', '/wd4065', '/wd4267']
CXXFLAGS = ['/EHsc']
-BGE_CXXFLAGS = ['/O2', '/EHsc', '/GR', '/fp:fast', '/arch:SSE2']
+BGE_CXXFLAGS = ['/O2', '/EHsc', '/GR', '/fp:fast']
BF_DEBUG_CCFLAGS = ['/Zi', '/FR${TARGET}.sbr']
diff --git a/extern/bullet2/CMakeLists.txt b/extern/bullet2/CMakeLists.txt
index 2e2d8920781..3054ed98908 100644
--- a/extern/bullet2/CMakeLists.txt
+++ b/extern/bullet2/CMakeLists.txt
@@ -32,14 +32,12 @@ FILE(GLOB SRC
src/BulletCollision/CollisionShapes/*.cpp
src/BulletCollision/NarrowPhaseCollision/*.cpp
src/BulletCollision/Gimpact/*.cpp
- src/BulletCollision//CollisionDispatch/*.cpp
+ src/BulletCollision/CollisionDispatch/*.cpp
src/BulletDynamics/ConstraintSolver/*.cpp
src/BulletDynamics/Vehicle/*.cpp
src/BulletDynamics/Dynamics/*.cpp
src/BulletSoftBody/*.cpp
)
-ADD_DEFINITIONS(-D_LIB)
-
BLENDERLIB(extern_bullet "${SRC}" "${INC}")
-#, libtype=['game2', 'player'], priority=[20, 170], compileflags=cflags )
+
diff --git a/extern/bullet2/src/SConscript b/extern/bullet2/src/SConscript
index 3d0c645e7a0..c0ee56045d8 100644
--- a/extern/bullet2/src/SConscript
+++ b/extern/bullet2/src/SConscript
@@ -4,11 +4,11 @@ import os
Import('env')
-defs = 'USE_DOUBLES QHULL _LIB'
+defs = ''
cflags = []
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
- defs += ' WIN32 NDEBUG _WINDOWS _LIB'
+ defs += ' WIN32 NDEBUG _WINDOWS'
#cflags += ['/MT', '/W3', '/GX', '/O2', '/Op']
cflags += ['/MT', '/W3', '/GX', '/Og', '/Ot', '/Ob1', '/Op', '/G6', '/O3', '/EHcs']
elif env['OURPLATFORM']=='win32-mingw':
diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt
index 9128e923e19..33af61baa07 100644
--- a/intern/ghost/CMakeLists.txt
+++ b/intern/ghost/CMakeLists.txt
@@ -26,9 +26,18 @@
SET(INC . ../string)
-FILE(GLOB SRC intern/*.cpp)
+FILE(GLOB SRC intern/*.cpp intern/*.mm)
IF(APPLE)
+ IF(WITH_COCOA)
+ LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerCarbon.cpp")
+ LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemCarbon.cpp")
+ LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowCarbon.cpp")
+ ELSE(WITH_COCOA)
+ LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerCocoa.mm")
+ LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemCocoa.mm")
+ LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowCocoa.mm")
+ ENDIF(WITH_COCOA)
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerWin32.cpp")
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemWin32.cpp")
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowWin32.cpp")
@@ -41,6 +50,9 @@ ELSE(APPLE)
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerCarbon.cpp")
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemCarbon.cpp")
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowCarbon.cpp")
+ LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerCocoa.mm")
+ LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemCocoa.mm")
+ LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowCocoa.mm")
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerX11.cpp")
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemX11.cpp")
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowX11.cpp")
@@ -52,6 +64,9 @@ ELSE(APPLE)
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerCarbon.cpp")
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemCarbon.cpp")
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowCarbon.cpp")
+ LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerCocoa.mm")
+ LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemCocoa.mm")
+ LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowCocoa.mm")
ENDIF(WIN32)
ENDIF(APPLE)
diff --git a/intern/ghost/GHOST_C-api.h b/intern/ghost/GHOST_C-api.h
index c0b7077fb53..9460fb504a9 100644
--- a/intern/ghost/GHOST_C-api.h
+++ b/intern/ghost/GHOST_C-api.h
@@ -598,6 +598,16 @@ extern GHOST_TWindowState GHOST_GetWindowState(GHOST_WindowHandle windowhandle);
extern GHOST_TSuccess GHOST_SetWindowState(GHOST_WindowHandle windowhandle,
GHOST_TWindowState state);
+
+/**
+ * Sets the window "modified" status, indicating unsaved changes
+ * @param windowhandle The handle to the window
+ * @param isUnsavedChanges Unsaved changes or not
+ * @return Indication of success.
+ */
+extern GHOST_TSuccess GHOST_SetWindowModifiedState(GHOST_WindowHandle windowhandle,
+ GHOST_TUns8 isUnsavedChanges);
+
/**
* Sets the order of the window (bottom, top).
* @param windowhandle The handle to the window
diff --git a/intern/ghost/GHOST_IWindow.h b/intern/ghost/GHOST_IWindow.h
index d91995e35ec..ff1484909b0 100644
--- a/intern/ghost/GHOST_IWindow.h
+++ b/intern/ghost/GHOST_IWindow.h
@@ -162,6 +162,19 @@ public:
virtual GHOST_TSuccess setState(GHOST_TWindowState state) = 0;
/**
+ * Sets the window "modified" status, indicating unsaved changes
+ * @param isUnsavedChanges Unsaved changes or not
+ * @return Indication of success.
+ */
+ virtual GHOST_TSuccess setModifiedState(bool isUnsavedChanges) = 0;
+
+ /**
+ * Gets the window "modified" status, indicating unsaved changes
+ * @return True if there are unsaved changes
+ */
+ virtual bool getModifiedState() = 0;
+
+ /**
* Sets the order of the window (bottom, top).
* @param order The order of the window.
* @return Indication of success.
diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h
index 31819f341a0..14e3c4bb5f7 100644
--- a/intern/ghost/GHOST_Types.h
+++ b/intern/ghost/GHOST_Types.h
@@ -116,6 +116,12 @@ typedef enum {
} GHOST_TWindowState;
+/** Constants for the answer to the blender exit request */
+typedef enum {
+ GHOST_kExitCancel = 0,
+ GHOST_kExitNow
+} GHOST_TExitRequestResponse;
+
typedef enum {
GHOST_kWindowOrderTop = 0,
GHOST_kWindowOrderBottom
diff --git a/intern/ghost/intern/GHOST_C-api.cpp b/intern/ghost/intern/GHOST_C-api.cpp
index 5c23b6c42a3..d14945d1bf8 100644
--- a/intern/ghost/intern/GHOST_C-api.cpp
+++ b/intern/ghost/intern/GHOST_C-api.cpp
@@ -629,6 +629,13 @@ GHOST_TSuccess GHOST_SetWindowState(GHOST_WindowHandle windowhandle,
}
+GHOST_TSuccess GHOST_SetWindowModifiedState(GHOST_WindowHandle windowhandle, GHOST_TUns8 isUnsavedChanges)
+{
+ GHOST_IWindow* window = (GHOST_IWindow*) windowhandle;
+
+ return window->setModifiedState(isUnsavedChanges);
+}
+
GHOST_TSuccess GHOST_SetWindowOrder(GHOST_WindowHandle windowhandle,
GHOST_TWindowOrder order)
diff --git a/intern/ghost/intern/GHOST_DisplayManager.cpp b/intern/ghost/intern/GHOST_DisplayManager.cpp
index a06692797c7..712ded7ea20 100644
--- a/intern/ghost/intern/GHOST_DisplayManager.cpp
+++ b/intern/ghost/intern/GHOST_DisplayManager.cpp
@@ -27,8 +27,6 @@
*/
/**
-
- * $Id$
* Copyright (C) 2001 NaN Technologies B.V.
* @author Maarten Gribnau
* @date September 21, 2001
diff --git a/intern/ghost/intern/GHOST_DisplayManagerCocoa.h b/intern/ghost/intern/GHOST_DisplayManagerCocoa.h
new file mode 100644
index 00000000000..153ee401011
--- /dev/null
+++ b/intern/ghost/intern/GHOST_DisplayManagerCocoa.h
@@ -0,0 +1,106 @@
+/**
+ * $Id$
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+/**
+ * @file GHOST_DisplayManagerCocoa.h
+ * Declaration of GHOST_DisplayManagerCocoa class.
+ */
+
+#ifndef _GHOST_DISPLAY_MANAGER_COCOA_H_
+#define _GHOST_DISPLAY_MANAGER_COCOA_H_
+
+#ifndef __APPLE__
+#error Apple only!
+#endif // __APPLE__
+
+#include "GHOST_DisplayManager.h"
+
+/**
+ * Manages system displays (Mac OSX/Cocoa implementation).
+ * @see GHOST_DisplayManager
+ * @author Maarten Gribnau
+ * @date September 21, 2001
+ */
+class GHOST_DisplayManagerCocoa : public GHOST_DisplayManager
+{
+public:
+ /**
+ * Constructor.
+ */
+ GHOST_DisplayManagerCocoa(void);
+
+ /**
+ * Returns the number of display devices on this system.
+ * @param numDisplays The number of displays on this system.
+ * @return Indication of success.
+ */
+ virtual GHOST_TSuccess getNumDisplays(GHOST_TUns8& numDisplays) const;
+
+ /**
+ * Returns the number of display settings for this display device.
+ * @param display The index of the display to query with 0 <= display < getNumDisplays().
+ * @param setting The number of settings of the display device with this index.
+ * @return Indication of success.
+ */
+ virtual GHOST_TSuccess getNumDisplaySettings(GHOST_TUns8 display, GHOST_TInt32& numSettings) const;
+
+ /**
+ * Returns the current setting for this display device.
+ * @param display The index of the display to query with 0 <= display < getNumDisplays().
+ * @param index The setting index to be returned.
+ * @param setting The setting of the display device with this index.
+ * @return Indication of success.
+ */
+ virtual GHOST_TSuccess getDisplaySetting(GHOST_TUns8 display, GHOST_TInt32 index, GHOST_DisplaySetting& setting) const;
+
+ /**
+ * Returns the current setting for this display device.
+ * @param display The index of the display to query with 0 <= display < getNumDisplays().
+ * @param setting The current setting of the display device with this index.
+ * @return Indication of success.
+ */
+ virtual GHOST_TSuccess getCurrentDisplaySetting(GHOST_TUns8 display, GHOST_DisplaySetting& setting) const;
+
+ /**
+ * Changes the current setting for this display device.
+ * @param display The index of the display to query with 0 <= display < getNumDisplays().
+ * @param setting The current setting of the display device with this index.
+ * @return Indication of success.
+ */
+ virtual GHOST_TSuccess setCurrentDisplaySetting(GHOST_TUns8 display, const GHOST_DisplaySetting& setting);
+
+protected:
+ //Do not cache values as OS X supports screen hot plug
+ /** Cached number of displays. */
+ //CGDisplayCount m_numDisplays;
+ /** Cached display id's for each display. */
+ //CGDirectDisplayID* m_displayIDs;
+};
+
+
+#endif // _GHOST_DISPLAY_MANAGER_COCOA_H_
+
diff --git a/intern/ghost/intern/GHOST_DisplayManagerCocoa.mm b/intern/ghost/intern/GHOST_DisplayManagerCocoa.mm
new file mode 100644
index 00000000000..f105928c9a3
--- /dev/null
+++ b/intern/ghost/intern/GHOST_DisplayManagerCocoa.mm
@@ -0,0 +1,168 @@
+/**
+ * $Id$
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 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): Maarten Gribnau 09/2001
+ Damien Plisson 10/2009
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#include <Cocoa/Cocoa.h>
+
+#include "GHOST_DisplayManagerCocoa.h"
+#include "GHOST_Debug.h"
+
+// We do not support multiple monitors at the moment
+
+
+GHOST_DisplayManagerCocoa::GHOST_DisplayManagerCocoa(void)
+{
+}
+
+
+GHOST_TSuccess GHOST_DisplayManagerCocoa::getNumDisplays(GHOST_TUns8& numDisplays) const
+{
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
+ numDisplays = (GHOST_TUns8) [[NSScreen screens] count];
+
+ [pool drain];
+ return GHOST_kSuccess;
+}
+
+
+GHOST_TSuccess GHOST_DisplayManagerCocoa::getNumDisplaySettings(GHOST_TUns8 display, GHOST_TInt32& numSettings) const
+{
+ GHOST_ASSERT((display==kMainDisplay), "GHOST_DisplayManagerCocoa::getNumDisplaySettings(): only main display is supported");
+
+ numSettings = (GHOST_TInt32)3; //Width, Height, BitsPerPixel
+
+ return GHOST_kSuccess;
+}
+
+
+GHOST_TSuccess GHOST_DisplayManagerCocoa::getDisplaySetting(GHOST_TUns8 display, GHOST_TInt32 index, GHOST_DisplaySetting& setting) const
+{
+ //Note that only current display setting is available
+ NSScreen *askedDisplay;
+
+ GHOST_ASSERT((display==kMainDisplay), "GHOST_DisplayManagerCocoa::getDisplaySetting(): only main display is supported");
+
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
+ if (display == kMainDisplay) //Screen #0 may not be the main one
+ askedDisplay = [NSScreen mainScreen];
+ else
+ askedDisplay = [[NSScreen screens] objectAtIndex:display];
+
+ if(askedDisplay == nil) {
+ [pool drain];
+ return GHOST_kFailure;
+ }
+
+ NSRect frame = [askedDisplay visibleFrame];
+ setting.xPixels = frame.size.width;
+ setting.yPixels = frame.size.height;
+
+ setting.bpp = NSBitsPerPixelFromDepth([askedDisplay depth]);
+
+ setting.frequency = 0; //No more CRT display...
+
+#ifdef GHOST_DEBUG
+ printf("display mode: width=%d, height=%d, bpp=%d, frequency=%d\n", setting.xPixels, setting.yPixels, setting.bpp, setting.frequency);
+#endif // GHOST_DEBUG
+
+ [pool drain];
+ return GHOST_kSuccess;
+}
+
+
+GHOST_TSuccess GHOST_DisplayManagerCocoa::getCurrentDisplaySetting(GHOST_TUns8 display, GHOST_DisplaySetting& setting) const
+{
+ NSScreen *askedDisplay;
+
+ GHOST_ASSERT((display==kMainDisplay), "GHOST_DisplayManagerCocoa::getCurrentDisplaySetting(): only main display is supported");
+
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
+ if (display == kMainDisplay) //Screen #0 may not be the main one
+ askedDisplay = [NSScreen mainScreen];
+ else
+ askedDisplay = [[NSScreen screens] objectAtIndex:display];
+
+ if(askedDisplay == nil) {
+ [pool drain];
+ return GHOST_kFailure;
+ }
+
+ NSRect frame = [askedDisplay visibleFrame];
+ setting.xPixels = frame.size.width;
+ setting.yPixels = frame.size.height;
+
+ setting.bpp = NSBitsPerPixelFromDepth([askedDisplay depth]);
+
+ setting.frequency = 0; //No more CRT display...
+
+#ifdef GHOST_DEBUG
+ printf("current display mode: width=%d, height=%d, bpp=%d, frequency=%d\n", setting.xPixels, setting.yPixels, setting.bpp, setting.frequency);
+#endif // GHOST_DEBUG
+
+ [pool drain];
+ return GHOST_kSuccess;
+}
+
+
+GHOST_TSuccess GHOST_DisplayManagerCocoa::setCurrentDisplaySetting(GHOST_TUns8 display, const GHOST_DisplaySetting& setting)
+{
+ GHOST_ASSERT((display==kMainDisplay), "GHOST_DisplayManagerCocoa::setCurrentDisplaySetting(): only main display is supported");
+
+#ifdef GHOST_DEBUG
+ printf("GHOST_DisplayManagerCocoa::setCurrentDisplaySetting(): requested settings:\n");
+ printf(" setting.xPixels=%d\n", setting.xPixels);
+ printf(" setting.yPixels=%d\n", setting.yPixels);
+ printf(" setting.bpp=%d\n", setting.bpp);
+ printf(" setting.frequency=%d\n", setting.frequency);
+#endif // GHOST_DEBUG
+
+ //Display configuration is no more available in 10.6
+
+/* CFDictionaryRef displayModeValues = ::CGDisplayBestModeForParametersAndRefreshRate(
+ m_displayIDs[display],
+ (size_t)setting.bpp,
+ (size_t)setting.xPixels,
+ (size_t)setting.yPixels,
+ (CGRefreshRate)setting.frequency,
+ NULL);*/
+
+#ifdef GHOST_DEBUG
+ printf("GHOST_DisplayManagerCocoa::setCurrentDisplaySetting(): switching to:\n");
+ printf(" setting.xPixels=%d\n", getValue(displayModeValues, kCGDisplayWidth));
+ printf(" setting.yPixels=%d\n", getValue(displayModeValues, kCGDisplayHeight));
+ printf(" setting.bpp=%d\n", getValue(displayModeValues, kCGDisplayBitsPerPixel));
+ printf(" setting.frequency=%d\n", getValue(displayModeValues, kCGDisplayRefreshRate));
+#endif // GHOST_DEBUG
+
+ //CGDisplayErr err = ::CGDisplaySwitchToMode(m_displayIDs[display], displayModeValues);
+
+ return /*err == CGDisplayNoErr ? GHOST_kSuccess :*/ GHOST_kFailure;
+}
diff --git a/intern/ghost/intern/GHOST_ISystem.cpp b/intern/ghost/intern/GHOST_ISystem.cpp
index 9329e68132b..fc338c182a9 100644
--- a/intern/ghost/intern/GHOST_ISystem.cpp
+++ b/intern/ghost/intern/GHOST_ISystem.cpp
@@ -44,7 +44,11 @@
# include "GHOST_SystemWin32.h"
#else
# ifdef __APPLE__
-# include "GHOST_SystemCarbon.h"
+# ifdef GHOST_COCOA
+# include "GHOST_SystemCocoa.h"
+# else
+# include "GHOST_SystemCarbon.h"
+# endif
# else
# include "GHOST_SystemX11.h"
# endif
@@ -62,7 +66,11 @@ GHOST_TSuccess GHOST_ISystem::createSystem()
m_system = new GHOST_SystemWin32 ();
#else
# ifdef __APPLE__
- m_system = new GHOST_SystemCarbon ();
+# ifdef GHOST_COCOA
+ m_system = new GHOST_SystemCocoa ();
+# else
+ m_system = new GHOST_SystemCarbon ();
+# endif
# else
m_system = new GHOST_SystemX11 ();
# endif
diff --git a/intern/ghost/intern/GHOST_SystemCocoa.h b/intern/ghost/intern/GHOST_SystemCocoa.h
new file mode 100644
index 00000000000..3e499f3d136
--- /dev/null
+++ b/intern/ghost/intern/GHOST_SystemCocoa.h
@@ -0,0 +1,274 @@
+/**
+ * $Id$
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Maarten Gribnau 05/2001
+ * Damien Plisson 09/2009
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+/**
+ * @file GHOST_SystemCocoa.h
+ * Declaration of GHOST_SystemCocoa class.
+ */
+
+#ifndef _GHOST_SYSTEM_COCOA_H_
+#define _GHOST_SYSTEM_COCOA_H_
+
+#ifndef __APPLE__
+#error Apple OSX only!
+#endif // __APPLE__
+
+//#define __CARBONSOUND__
+
+
+#include "GHOST_System.h"
+
+class GHOST_EventCursor;
+class GHOST_EventKey;
+class GHOST_EventWindow;
+
+
+class GHOST_SystemCocoa : public GHOST_System {
+public:
+ /**
+ * Constructor.
+ */
+ GHOST_SystemCocoa();
+
+ /**
+ * Destructor.
+ */
+ ~GHOST_SystemCocoa();
+
+ /***************************************************************************************
+ ** Time(r) functionality
+ ***************************************************************************************/
+
+ /**
+ * Returns the system time.
+ * Returns the number of milliseconds since the start of the system process.
+ * Based on ANSI clock() routine.
+ * @return The number of milliseconds.
+ */
+ virtual GHOST_TUns64 getMilliSeconds() const;
+
+ /***************************************************************************************
+ ** Display/window management functionality
+ ***************************************************************************************/
+
+ /**
+ * Returns the number of displays on this system.
+ * @return The number of displays.
+ */
+ virtual GHOST_TUns8 getNumDisplays() const;
+
+ /**
+ * Returns the dimensions of the main display on this system.
+ * @return The dimension of the main display.
+ */
+ virtual void getMainDisplayDimensions(GHOST_TUns32& width, GHOST_TUns32& height) const;
+
+ /**
+ * Create a new window.
+ * The new window is added to the list of windows managed.
+ * Never explicitly delete the window, use disposeWindow() instead.
+ * @param title The name of the window (displayed in the title bar of the window if the OS supports it).
+ * @param left The coordinate of the left edge of the window.
+ * @param top The coordinate of the top edge of the window.
+ * @param width The width the window.
+ * @param height The height the window.
+ * @param state The state of the window when opened.
+ * @param type The type of drawing context installed in this window.
+ * @param parentWindow Parent (embedder) window
+ * @return The new window (or 0 if creation failed).
+ */
+ virtual GHOST_IWindow* createWindow(
+ const STR_String& title,
+ GHOST_TInt32 left,
+ GHOST_TInt32 top,
+ GHOST_TUns32 width,
+ GHOST_TUns32 height,
+ GHOST_TWindowState state,
+ GHOST_TDrawingContextType type,
+ const bool stereoVisual,
+ const GHOST_TEmbedderWindowID parentWindow = 0
+ );
+
+ virtual GHOST_TSuccess beginFullScreen(
+ const GHOST_DisplaySetting& setting,
+ GHOST_IWindow** window,
+ const bool stereoVisual
+ );
+
+ virtual GHOST_TSuccess endFullScreen( void );
+
+ /***************************************************************************************
+ ** Event management functionality
+ ***************************************************************************************/
+
+ /**
+ * Gets events from the system and stores them in the queue.
+ * @param waitForEvent Flag to wait for an event (or return immediately).
+ * @return Indication of the presence of events.
+ */
+ virtual bool processEvents(bool waitForEvent);
+
+ /**
+ * Handle User request to quit, from Menu bar Quit, and Cmd+Q
+ * Display alert panel if changes performed since last save
+ */
+ GHOST_TUns8 handleQuitRequest();
+
+ /***************************************************************************************
+ ** Cursor management functionality
+ ***************************************************************************************/
+
+ /**
+ * Returns the current location of the cursor (location in screen coordinates)
+ * @param x The x-coordinate of the cursor.
+ * @param y The y-coordinate of the cursor.
+ * @return Indication of success.
+ */
+ virtual GHOST_TSuccess getCursorPosition(GHOST_TInt32& x, GHOST_TInt32& y) const;
+
+ /**
+ * Updates the location of the cursor (location in screen coordinates).
+ * @param x The x-coordinate of the cursor.
+ * @param y The y-coordinate of the cursor.
+ * @return Indication of success.
+ */
+ virtual GHOST_TSuccess setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y) const;
+
+ /***************************************************************************************
+ ** Access to mouse button and keyboard states.
+ ***************************************************************************************/
+
+ /**
+ * Returns the state of all modifier keys.
+ * @param keys The state of all modifier keys (true == pressed).
+ * @return Indication of success.
+ */
+ virtual GHOST_TSuccess getModifierKeys(GHOST_ModifierKeys& keys) const;
+
+ /**
+ * Returns the state of the mouse buttons (ouside the message queue).
+ * @param buttons The state of the buttons.
+ * @return Indication of success.
+ */
+ virtual GHOST_TSuccess getButtons(GHOST_Buttons& buttons) const;
+
+ /**
+ * Returns Clipboard data
+ * @param selection Indicate which buffer to return
+ * @return Returns the selected buffer
+ */
+ virtual GHOST_TUns8* getClipboard(bool selection) const;
+
+ /**
+ * Puts buffer to system clipboard
+ * @param buffer The buffer to be copied
+ * @param selection Indicates which buffer to copy too, only used on X11
+ */
+ virtual void putClipboard(GHOST_TInt8 *buffer, bool selection) const;
+
+protected:
+ /**
+ * Initializes the system.
+ * For now, it justs registers the window class (WNDCLASS).
+ * @return A success value.
+ */
+ virtual GHOST_TSuccess init();
+
+ /**
+ * Handles a tablet event.
+ * @param eventPtr An NSEvent pointer (casted to void* to enable compilation in standard C++)
+ * @return Indication whether the event was handled.
+ */
+ GHOST_TSuccess handleTabletEvent(void *eventPtr);
+
+ /**
+ * Handles a mouse event.
+ * @param eventPtr An NSEvent pointer (casted to void* to enable compilation in standard C++)
+ * @return Indication whether the event was handled.
+ */
+ GHOST_TSuccess handleMouseEvent(void *eventPtr);
+
+ /**
+ * Handles a key event.
+ * @param eventPtr An NSEvent pointer (casted to void* to enable compilation in standard C++)
+ * @return Indication whether the event was handled.
+ */
+ GHOST_TSuccess handleKeyEvent(void *eventPtr);
+
+ /**
+ * Handles a window event.
+ * @param eventPtr An NSEvent pointer (casted to void* to enable compilation in standard C++)
+ * @return Indication whether the event was handled.
+ */
+ GHOST_TSuccess handleWindowEvent(void *eventPtr);
+
+ /**
+ * Handles all basic Mac application stuff for a mouse down event.
+ * @param eventPtr An NSEvent pointer (casted to void* to enable compilation in standard C++)
+ * @return Indication whether the event was handled.
+ */
+ // bool handleMouseDown(void *eventPtr);
+
+ /**
+ * Handles a Mac menu command.
+ * @param menuResult A Mac menu/item identifier.
+ * @return Indication whether the event was handled.
+ */
+ // bool handleMenuCommand(GHOST_TInt32 menuResult);
+
+ /* callback for blender generated events */
+// static OSStatus blendEventHandlerProc(EventHandlerCallRef handler, EventRef event, void* userData);
+
+
+ /**
+ * Callback for Mac Timer tasks that expire.
+ * @param tmTask Pointer to the timer task that expired.
+ */
+ //static void s_timerCallback(TMTaskPtr tmTask);
+
+ /** Cocoa autoReleasePool (void*) used for enablign standard C++ compilation */
+ void* m_autoReleasePool;
+
+ /** Event handler reference. */
+ //EventHandlerRef m_handler;
+
+ /** Start time at initialization. */
+ GHOST_TUns64 m_start_time;
+
+ /** Mouse buttons state */
+ GHOST_TUns32 m_pressedMouseButtons;
+
+ /** State of the modifiers. */
+ GHOST_TUns32 m_modifierMask;
+
+ /** Ignores window size messages (when window is dragged). */
+ bool m_ignoreWindowSizedMessages;
+};
+
+#endif // _GHOST_SYSTEM_COCOA_H_
+
diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm
new file mode 100644
index 00000000000..06ce2882beb
--- /dev/null
+++ b/intern/ghost/intern/GHOST_SystemCocoa.mm
@@ -0,0 +1,1414 @@
+/**
+ * $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): Maarten Gribnau 05/2001
+ * Damien Plisson 09/2009
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#import <Cocoa/Cocoa.h>
+
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/sysctl.h>
+
+#include "GHOST_SystemCocoa.h"
+
+#include "GHOST_DisplayManagerCocoa.h"
+#include "GHOST_EventKey.h"
+#include "GHOST_EventButton.h"
+#include "GHOST_EventCursor.h"
+#include "GHOST_EventWheel.h"
+#include "GHOST_EventNDOF.h"
+
+#include "GHOST_TimerManager.h"
+#include "GHOST_TimerTask.h"
+#include "GHOST_WindowManager.h"
+#include "GHOST_WindowCocoa.h"
+#include "GHOST_NDOFManager.h"
+#include "AssertMacros.h"
+
+#pragma mark KeyMap, mouse converters
+
+//TODO: remove (kept as reminder to implement window events)
+/*
+const EventTypeSpec kEvents[] =
+{
+ { kEventClassAppleEvent, kEventAppleEvent },
+
+// { kEventClassApplication, kEventAppActivated },
+// { kEventClassApplication, kEventAppDeactivated },
+
+ { kEventClassKeyboard, kEventRawKeyDown },
+ { kEventClassKeyboard, kEventRawKeyRepeat },
+ { kEventClassKeyboard, kEventRawKeyUp },
+ { kEventClassKeyboard, kEventRawKeyModifiersChanged },
+
+ { kEventClassMouse, kEventMouseDown },
+ { kEventClassMouse, kEventMouseUp },
+ { kEventClassMouse, kEventMouseMoved },
+ { kEventClassMouse, kEventMouseDragged },
+ { kEventClassMouse, kEventMouseWheelMoved },
+
+ { kEventClassWindow, kEventWindowClickZoomRgn } , // for new zoom behaviour
+ { kEventClassWindow, kEventWindowZoom }, // for new zoom behaviour
+ { kEventClassWindow, kEventWindowExpand } , // for new zoom behaviour
+ { kEventClassWindow, kEventWindowExpandAll }, // for new zoom behaviour
+
+ { kEventClassWindow, kEventWindowClose },
+ { kEventClassWindow, kEventWindowActivated },
+ { kEventClassWindow, kEventWindowDeactivated },
+ { kEventClassWindow, kEventWindowUpdate },
+ { kEventClassWindow, kEventWindowBoundsChanged },
+
+ { kEventClassBlender, kEventBlenderNdofAxis },
+ { kEventClassBlender, kEventBlenderNdofButtons }
+
+
+
+};*/
+
+static GHOST_TButtonMask convertButton(EventMouseButton button)
+{
+ switch (button) {
+ case 0:
+ return GHOST_kButtonMaskLeft;
+ case 1:
+ return GHOST_kButtonMaskRight;
+ case 2:
+ return GHOST_kButtonMaskMiddle;
+ case 3:
+ return GHOST_kButtonMaskButton4;
+ case 4:
+ return GHOST_kButtonMaskButton5;
+ default:
+ return GHOST_kButtonMaskLeft;
+ }
+}
+
+/**
+ * Converts Mac rawkey codes (same for Cocoa & Carbon)
+ * into GHOST key codes
+ * @param rawCode The raw physical key code
+ * @param recvChar the character ignoring modifiers (except for shift)
+ * @return Ghost key code
+ */
+static GHOST_TKey convertKey(int rawCode, unichar recvChar)
+{
+
+ //printf("\nrecvchar %c 0x%x",recvChar,recvChar);
+ switch (rawCode) {
+ /*Physical keycodes not used due to map changes in int'l keyboards
+ case kVK_ANSI_A: return GHOST_kKeyA;
+ case kVK_ANSI_B: return GHOST_kKeyB;
+ case kVK_ANSI_C: return GHOST_kKeyC;
+ case kVK_ANSI_D: return GHOST_kKeyD;
+ case kVK_ANSI_E: return GHOST_kKeyE;
+ case kVK_ANSI_F: return GHOST_kKeyF;
+ case kVK_ANSI_G: return GHOST_kKeyG;
+ case kVK_ANSI_H: return GHOST_kKeyH;
+ case kVK_ANSI_I: return GHOST_kKeyI;
+ case kVK_ANSI_J: return GHOST_kKeyJ;
+ case kVK_ANSI_K: return GHOST_kKeyK;
+ case kVK_ANSI_L: return GHOST_kKeyL;
+ case kVK_ANSI_M: return GHOST_kKeyM;
+ case kVK_ANSI_N: return GHOST_kKeyN;
+ case kVK_ANSI_O: return GHOST_kKeyO;
+ case kVK_ANSI_P: return GHOST_kKeyP;
+ case kVK_ANSI_Q: return GHOST_kKeyQ;
+ case kVK_ANSI_R: return GHOST_kKeyR;
+ case kVK_ANSI_S: return GHOST_kKeyS;
+ case kVK_ANSI_T: return GHOST_kKeyT;
+ case kVK_ANSI_U: return GHOST_kKeyU;
+ case kVK_ANSI_V: return GHOST_kKeyV;
+ case kVK_ANSI_W: return GHOST_kKeyW;
+ case kVK_ANSI_X: return GHOST_kKeyX;
+ case kVK_ANSI_Y: return GHOST_kKeyY;
+ case kVK_ANSI_Z: return GHOST_kKeyZ;*/
+
+ /* Numbers keys mapped to handle some int'l keyboard (e.g. French)*/
+ case kVK_ISO_Section: return GHOST_kKeyUnknown;
+ case kVK_ANSI_1: return GHOST_kKey1;
+ case kVK_ANSI_2: return GHOST_kKey2;
+ case kVK_ANSI_3: return GHOST_kKey3;
+ case kVK_ANSI_4: return GHOST_kKey4;
+ case kVK_ANSI_5: return GHOST_kKey5;
+ case kVK_ANSI_6: return GHOST_kKey6;
+ case kVK_ANSI_7: return GHOST_kKey7;
+ case kVK_ANSI_8: return GHOST_kKey8;
+ case kVK_ANSI_9: return GHOST_kKey9;
+ case kVK_ANSI_0: return GHOST_kKey0;
+
+ case kVK_ANSI_Keypad0: return GHOST_kKeyNumpad0;
+ case kVK_ANSI_Keypad1: return GHOST_kKeyNumpad1;
+ case kVK_ANSI_Keypad2: return GHOST_kKeyNumpad2;
+ case kVK_ANSI_Keypad3: return GHOST_kKeyNumpad3;
+ case kVK_ANSI_Keypad4: return GHOST_kKeyNumpad4;
+ case kVK_ANSI_Keypad5: return GHOST_kKeyNumpad5;
+ case kVK_ANSI_Keypad6: return GHOST_kKeyNumpad6;
+ case kVK_ANSI_Keypad7: return GHOST_kKeyNumpad7;
+ case kVK_ANSI_Keypad8: return GHOST_kKeyNumpad8;
+ case kVK_ANSI_Keypad9: return GHOST_kKeyNumpad9;
+ case kVK_ANSI_KeypadDecimal: return GHOST_kKeyNumpadPeriod;
+ case kVK_ANSI_KeypadEnter: return GHOST_kKeyNumpadEnter;
+ case kVK_ANSI_KeypadPlus: return GHOST_kKeyNumpadPlus;
+ case kVK_ANSI_KeypadMinus: return GHOST_kKeyNumpadMinus;
+ case kVK_ANSI_KeypadMultiply: return GHOST_kKeyNumpadAsterisk;
+ case kVK_ANSI_KeypadDivide: return GHOST_kKeyNumpadSlash;
+ case kVK_ANSI_KeypadClear: return GHOST_kKeyUnknown;
+
+ case kVK_F1: return GHOST_kKeyF1;
+ case kVK_F2: return GHOST_kKeyF2;
+ case kVK_F3: return GHOST_kKeyF3;
+ case kVK_F4: return GHOST_kKeyF4;
+ case kVK_F5: return GHOST_kKeyF5;
+ case kVK_F6: return GHOST_kKeyF6;
+ case kVK_F7: return GHOST_kKeyF7;
+ case kVK_F8: return GHOST_kKeyF8;
+ case kVK_F9: return GHOST_kKeyF9;
+ case kVK_F10: return GHOST_kKeyF10;
+ case kVK_F11: return GHOST_kKeyF11;
+ case kVK_F12: return GHOST_kKeyF12;
+ case kVK_F13: return GHOST_kKeyF13;
+ case kVK_F14: return GHOST_kKeyF14;
+ case kVK_F15: return GHOST_kKeyF15;
+ case kVK_F16: return GHOST_kKeyF16;
+ case kVK_F17: return GHOST_kKeyF17;
+ case kVK_F18: return GHOST_kKeyF18;
+ case kVK_F19: return GHOST_kKeyF19;
+ case kVK_F20: return GHOST_kKeyF20;
+
+ case kVK_UpArrow: return GHOST_kKeyUpArrow;
+ case kVK_DownArrow: return GHOST_kKeyDownArrow;
+ case kVK_LeftArrow: return GHOST_kKeyLeftArrow;
+ case kVK_RightArrow: return GHOST_kKeyRightArrow;
+
+ case kVK_Return: return GHOST_kKeyEnter;
+ case kVK_Delete: return GHOST_kKeyBackSpace;
+ case kVK_ForwardDelete: return GHOST_kKeyDelete;
+ case kVK_Escape: return GHOST_kKeyEsc;
+ case kVK_Tab: return GHOST_kKeyTab;
+ case kVK_Space: return GHOST_kKeySpace;
+
+ case kVK_Home: return GHOST_kKeyHome;
+ case kVK_End: return GHOST_kKeyEnd;
+ case kVK_PageUp: return GHOST_kKeyUpPage;
+ case kVK_PageDown: return GHOST_kKeyDownPage;
+
+ /*case kVK_ANSI_Minus: return GHOST_kKeyMinus;
+ case kVK_ANSI_Equal: return GHOST_kKeyEqual;
+ case kVK_ANSI_Comma: return GHOST_kKeyComma;
+ case kVK_ANSI_Period: return GHOST_kKeyPeriod;
+ case kVK_ANSI_Slash: return GHOST_kKeySlash;
+ case kVK_ANSI_Semicolon: return GHOST_kKeySemicolon;
+ case kVK_ANSI_Quote: return GHOST_kKeyQuote;
+ case kVK_ANSI_Backslash: return GHOST_kKeyBackslash;
+ case kVK_ANSI_LeftBracket: return GHOST_kKeyLeftBracket;
+ case kVK_ANSI_RightBracket: return GHOST_kKeyRightBracket;
+ case kVK_ANSI_Grave: return GHOST_kKeyAccentGrave;*/
+
+ case kVK_VolumeUp:
+ case kVK_VolumeDown:
+ case kVK_Mute:
+ return GHOST_kKeyUnknown;
+
+ default:
+ /*Then detect on character value for "remappable" keys in int'l keyboards*/
+ if ((recvChar >= 'A') && (recvChar <= 'Z')) {
+ return (GHOST_TKey) (recvChar - 'A' + GHOST_kKeyA);
+ } else if ((recvChar >= 'a') && (recvChar <= 'z')) {
+ return (GHOST_TKey) (recvChar - 'a' + GHOST_kKeyA);
+ } else
+ switch (recvChar) {
+ case '-': return GHOST_kKeyMinus;
+ case '=': return GHOST_kKeyEqual;
+ case ',': return GHOST_kKeyComma;
+ case '.': return GHOST_kKeyPeriod;
+ case '/': return GHOST_kKeySlash;
+ case ';': return GHOST_kKeySemicolon;
+ case '\'': return GHOST_kKeyQuote;
+ case '\\': return GHOST_kKeyBackslash;
+ case '[': return GHOST_kKeyLeftBracket;
+ case ']': return GHOST_kKeyRightBracket;
+ case '`': return GHOST_kKeyAccentGrave;
+ default:
+ return GHOST_kKeyUnknown;
+ }
+ }
+ return GHOST_kKeyUnknown;
+}
+
+/* MacOSX returns a Roman charset with kEventParamKeyMacCharCodes
+ * as defined here: http://developer.apple.com/documentation/mac/Text/Text-516.html
+ * I am not sure how international this works...
+ * For cross-platform convention, we'll use the Latin ascii set instead.
+ * As defined at: http://www.ramsch.org/martin/uni/fmi-hp/iso8859-1.html
+ *
+ */
+static unsigned char convertRomanToLatin(unsigned char ascii)
+{
+
+ if(ascii<128) return ascii;
+
+ switch(ascii) {
+ case 128: return 142;
+ case 129: return 143;
+ case 130: return 128;
+ case 131: return 201;
+ case 132: return 209;
+ case 133: return 214;
+ case 134: return 220;
+ case 135: return 225;
+ case 136: return 224;
+ case 137: return 226;
+ case 138: return 228;
+ case 139: return 227;
+ case 140: return 229;
+ case 141: return 231;
+ case 142: return 233;
+ case 143: return 232;
+ case 144: return 234;
+ case 145: return 235;
+ case 146: return 237;
+ case 147: return 236;
+ case 148: return 238;
+ case 149: return 239;
+ case 150: return 241;
+ case 151: return 243;
+ case 152: return 242;
+ case 153: return 244;
+ case 154: return 246;
+ case 155: return 245;
+ case 156: return 250;
+ case 157: return 249;
+ case 158: return 251;
+ case 159: return 252;
+ case 160: return 0;
+ case 161: return 176;
+ case 162: return 162;
+ case 163: return 163;
+ case 164: return 167;
+ case 165: return 183;
+ case 166: return 182;
+ case 167: return 223;
+ case 168: return 174;
+ case 169: return 169;
+ case 170: return 174;
+ case 171: return 180;
+ case 172: return 168;
+ case 173: return 0;
+ case 174: return 198;
+ case 175: return 216;
+ case 176: return 0;
+ case 177: return 177;
+ case 178: return 0;
+ case 179: return 0;
+ case 180: return 165;
+ case 181: return 181;
+ case 182: return 0;
+ case 183: return 0;
+ case 184: return 215;
+ case 185: return 0;
+ case 186: return 0;
+ case 187: return 170;
+ case 188: return 186;
+ case 189: return 0;
+ case 190: return 230;
+ case 191: return 248;
+ case 192: return 191;
+ case 193: return 161;
+ case 194: return 172;
+ case 195: return 0;
+ case 196: return 0;
+ case 197: return 0;
+ case 198: return 0;
+ case 199: return 171;
+ case 200: return 187;
+ case 201: return 201;
+ case 202: return 0;
+ case 203: return 192;
+ case 204: return 195;
+ case 205: return 213;
+ case 206: return 0;
+ case 207: return 0;
+ case 208: return 0;
+ case 209: return 0;
+ case 210: return 0;
+
+ case 214: return 247;
+
+ case 229: return 194;
+ case 230: return 202;
+ case 231: return 193;
+ case 232: return 203;
+ case 233: return 200;
+ case 234: return 205;
+ case 235: return 206;
+ case 236: return 207;
+ case 237: return 204;
+ case 238: return 211;
+ case 239: return 212;
+ case 240: return 0;
+ case 241: return 210;
+ case 242: return 218;
+ case 243: return 219;
+ case 244: return 217;
+ case 245: return 0;
+ case 246: return 0;
+ case 247: return 0;
+ case 248: return 0;
+ case 249: return 0;
+ case 250: return 0;
+
+
+ default: return 0;
+ }
+
+}
+
+#define FIRSTFILEBUFLG 512
+static bool g_hasFirstFile = false;
+static char g_firstFileBuf[512];
+
+//TODO:Need to investigate this. Function called too early in creator.c to have g_hasFirstFile == true
+extern "C" int GHOST_HACK_getFirstFile(char buf[FIRSTFILEBUFLG]) {
+ if (g_hasFirstFile) {
+ strncpy(buf, g_firstFileBuf, FIRSTFILEBUFLG - 1);
+ buf[FIRSTFILEBUFLG - 1] = '\0';
+ return 1;
+ } else {
+ return 0;
+ }
+}
+
+
+#pragma mark Cocoa objects
+
+/**
+ * CocoaAppDelegate
+ * ObjC object to capture applicationShouldTerminate, and send quit event
+ **/
+@interface CocoaAppDelegate : NSObject {
+ GHOST_SystemCocoa *systemCocoa;
+}
+-(void)setSystemCocoa:(GHOST_SystemCocoa *)sysCocoa;
+- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender;
+- (void)applicationWillTerminate:(NSNotification *)aNotification;
+@end
+
+@implementation CocoaAppDelegate : NSObject
+-(void)setSystemCocoa:(GHOST_SystemCocoa *)sysCocoa
+{
+ systemCocoa = sysCocoa;
+}
+
+- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender
+{
+ //TODO: implement graceful termination through Cocoa mechanism to avoid session log off to be cancelled
+ //Note that Cmd+Q is already handled by keyhandler
+ if (systemCocoa->handleQuitRequest() == GHOST_kExitNow)
+ return NSTerminateCancel;//NSTerminateNow;
+ else
+ return NSTerminateCancel;
+}
+
+// To avoid cancelling a log off process, we must use Cocoa termination process
+// And this function is the only chance to perform clean up
+// So WM_exit needs to be called directly, as the event loop will never run before termination
+- (void)applicationWillTerminate:(NSNotification *)aNotification
+{
+ /*G.afbreek = 0; //Let Cocoa perform the termination at the end
+ WM_exit(C);*/
+}
+@end
+
+
+
+#pragma mark initialization/finalization
+
+
+GHOST_SystemCocoa::GHOST_SystemCocoa()
+{
+ m_modifierMask =0;
+ m_pressedMouseButtons =0;
+ m_displayManager = new GHOST_DisplayManagerCocoa ();
+ GHOST_ASSERT(m_displayManager, "GHOST_SystemCocoa::GHOST_SystemCocoa(): m_displayManager==0\n");
+ m_displayManager->initialize();
+
+ //NSEvent timeStamp is given in system uptime, state start date is boot time
+ //FIXME : replace by Cocoa equivalent
+ int mib[2];
+ struct timeval boottime;
+ size_t len;
+
+ mib[0] = CTL_KERN;
+ mib[1] = KERN_BOOTTIME;
+ len = sizeof(struct timeval);
+
+ sysctl(mib, 2, &boottime, &len, NULL, 0);
+ m_start_time = ((boottime.tv_sec*1000)+(boottime.tv_usec/1000));
+
+ m_ignoreWindowSizedMessages = false;
+}
+
+GHOST_SystemCocoa::~GHOST_SystemCocoa()
+{
+ NSAutoreleasePool* pool = (NSAutoreleasePool *)m_autoReleasePool;
+ [pool drain];
+}
+
+
+GHOST_TSuccess GHOST_SystemCocoa::init()
+{
+
+ GHOST_TSuccess success = GHOST_System::init();
+ if (success) {
+ //ProcessSerialNumber psn;
+
+ //Carbon stuff to move window & menu to foreground
+ /*if (!GetCurrentProcess(&psn)) {
+ TransformProcessType(&psn, kProcessTransformToForegroundApplication);
+ SetFrontProcess(&psn);
+ }*/
+
+ m_autoReleasePool = [[NSAutoreleasePool alloc] init];
+ if (NSApp == nil) {
+ [NSApplication sharedApplication];
+
+ if ([NSApp mainMenu] == nil) {
+ NSMenu *mainMenubar = [[NSMenu alloc] init];
+ NSMenuItem *menuItem;
+
+ //Create the application menu
+ NSMenu *appMenu = [[NSMenu alloc] initWithTitle:@"Blender"];
+
+ [appMenu addItemWithTitle:@"About Blender" action:@selector(orderFrontStandardAboutPanel:) keyEquivalent:@""];
+ [appMenu addItem:[NSMenuItem separatorItem]];
+
+ menuItem = [appMenu addItemWithTitle:@"Hide Blender" action:@selector(hide:) keyEquivalent:@"h"];
+ [menuItem setKeyEquivalentModifierMask:NSCommandKeyMask];
+
+ menuItem = [appMenu addItemWithTitle:@"Hide others" action:@selector(hideOtherApplications:) keyEquivalent:@"h"];
+ [menuItem setKeyEquivalentModifierMask:(NSAlternateKeyMask | NSCommandKeyMask)];
+
+ [appMenu addItemWithTitle:@"Show All" action:@selector(unhideAllApplications:) keyEquivalent:@""];
+
+ menuItem = [appMenu addItemWithTitle:@"Quit Blender" action:@selector(terminate:) keyEquivalent:@"q"];
+ [menuItem setKeyEquivalentModifierMask:NSCommandKeyMask];
+
+ menuItem = [[NSMenuItem alloc] init];
+ [menuItem setSubmenu:appMenu];
+
+ [mainMenubar addItem:menuItem];
+ [menuItem release];
+ [appMenu release];
+
+ //Create the window menu
+ NSMenu *windowMenu = [[NSMenu alloc] initWithTitle:@"Window"];
+
+ menuItem = [windowMenu addItemWithTitle:@"Minimize" action:@selector(performMiniaturize:) keyEquivalent:@"m"];
+ [menuItem setKeyEquivalentModifierMask:NSCommandKeyMask];
+
+ [windowMenu addItemWithTitle:@"Zoom" action:@selector(performZoom:) keyEquivalent:@""];
+
+ menuItem = [[NSMenuItem alloc] init];
+ [menuItem setSubmenu:windowMenu];
+
+ [mainMenubar addItem:menuItem];
+ [menuItem release];
+
+ [NSApp setMainMenu:mainMenubar];
+ [NSApp setWindowsMenu:windowMenu];
+ [windowMenu release];
+ }
+ [NSApp finishLaunching];
+ }
+ if ([NSApp delegate] == nil) {
+ CocoaAppDelegate *appDelegate = [[CocoaAppDelegate alloc] init];
+ [appDelegate setSystemCocoa:this];
+ [NSApp setDelegate:appDelegate];
+ }
+
+
+ /*
+ * Initialize the cursor to the standard arrow shape (so that we can change it later on).
+ * This initializes the cursor's visibility counter to 0.
+ */
+ /*::InitCursor();
+
+ MenuRef windMenu;
+ ::CreateStandardWindowMenu(0, &windMenu);
+ ::InsertMenu(windMenu, 0);
+ ::DrawMenuBar();
+
+ ::InstallApplicationEventHandler(sEventHandlerProc, GetEventTypeCount(kEvents), kEvents, this, &m_handler);
+
+ ::AEInstallEventHandler(kCoreEventClass, kAEOpenApplication, sAEHandlerLaunch, (SInt32) this, false);
+ ::AEInstallEventHandler(kCoreEventClass, kAEOpenDocuments, sAEHandlerOpenDocs, (SInt32) this, false);
+ ::AEInstallEventHandler(kCoreEventClass, kAEPrintDocuments, sAEHandlerPrintDocs, (SInt32) this, false);
+ ::AEInstallEventHandler(kCoreEventClass, kAEQuitApplication, sAEHandlerQuit, (SInt32) this, false);
+ */
+ }
+ return success;
+}
+
+
+#pragma mark window management
+
+GHOST_TUns64 GHOST_SystemCocoa::getMilliSeconds() const
+{
+ //Cocoa equivalent exists in 10.6 ([[NSProcessInfo processInfo] systemUptime])
+ int mib[2];
+ struct timeval boottime;
+ size_t len;
+
+ mib[0] = CTL_KERN;
+ mib[1] = KERN_BOOTTIME;
+ len = sizeof(struct timeval);
+
+ sysctl(mib, 2, &boottime, &len, NULL, 0);
+
+ return ((boottime.tv_sec*1000)+(boottime.tv_usec/1000));
+}
+
+
+GHOST_TUns8 GHOST_SystemCocoa::getNumDisplays() const
+{
+ //Note that OS X supports monitor hot plug
+ // We do not support multiple monitors at the moment
+ return [[NSScreen screens] count];
+}
+
+
+void GHOST_SystemCocoa::getMainDisplayDimensions(GHOST_TUns32& width, GHOST_TUns32& height) const
+{
+ //Get visible frame, that is frame excluding dock and top menu bar
+ NSRect frame = [[NSScreen mainScreen] visibleFrame];
+
+ //Returns max window contents (excluding title bar...)
+ NSRect contentRect = [NSWindow contentRectForFrameRect:frame
+ styleMask:(NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask)];
+
+ width = contentRect.size.width;
+ height = contentRect.size.height;
+}
+
+
+GHOST_IWindow* GHOST_SystemCocoa::createWindow(
+ const STR_String& title,
+ GHOST_TInt32 left,
+ GHOST_TInt32 top,
+ GHOST_TUns32 width,
+ GHOST_TUns32 height,
+ GHOST_TWindowState state,
+ GHOST_TDrawingContextType type,
+ bool stereoVisual,
+ const GHOST_TEmbedderWindowID parentWindow
+)
+{
+ GHOST_IWindow* window = 0;
+
+ //Get the available rect for including window contents
+ NSRect frame = [[NSScreen mainScreen] visibleFrame];
+ NSRect contentRect = [NSWindow contentRectForFrameRect:frame
+ styleMask:(NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask)];
+
+ //Ensures window top left is inside this available rect
+ left = left > contentRect.origin.x ? left : contentRect.origin.x;
+ top = top > contentRect.origin.y ? top : contentRect.origin.y;
+
+ window = new GHOST_WindowCocoa (title, left, top, width, height, state, type);
+
+ if (window) {
+ if (window->getValid()) {
+ // Store the pointer to the window
+ GHOST_ASSERT(m_windowManager, "m_windowManager not initialized");
+ m_windowManager->addWindow(window);
+ m_windowManager->setActiveWindow(window);
+ pushEvent(new GHOST_Event(getMilliSeconds(), GHOST_kEventWindowSize, window));
+ }
+ else {
+ GHOST_PRINT("GHOST_SystemCocoa::createWindow(): window invalid\n");
+ delete window;
+ window = 0;
+ }
+ }
+ else {
+ GHOST_PRINT("GHOST_SystemCocoa::createWindow(): could not create window\n");
+ }
+ return window;
+}
+
+GHOST_TSuccess GHOST_SystemCocoa::beginFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow** window, const bool stereoVisual)
+{
+ GHOST_TSuccess success = GHOST_kFailure;
+
+ //TODO: update this method
+ // need yo make this Carbon all on 10.5 for fullscreen to work correctly
+ CGCaptureAllDisplays();
+
+ success = GHOST_System::beginFullScreen( setting, window, stereoVisual);
+
+ if( success != GHOST_kSuccess ) {
+ // fullscreen failed for other reasons, release
+ CGReleaseAllDisplays();
+ }
+
+ return success;
+}
+
+GHOST_TSuccess GHOST_SystemCocoa::endFullScreen(void)
+{
+ //TODO: update this method
+ CGReleaseAllDisplays();
+ return GHOST_System::endFullScreen();
+}
+
+
+
+
+GHOST_TSuccess GHOST_SystemCocoa::getCursorPosition(GHOST_TInt32& x, GHOST_TInt32& y) const
+{
+ NSPoint mouseLoc = [NSEvent mouseLocation];
+
+ // Convert the coordinates to screen coordinates
+ x = (GHOST_TInt32)mouseLoc.x;
+ y = (GHOST_TInt32)mouseLoc.y;
+ return GHOST_kSuccess;
+}
+
+
+GHOST_TSuccess GHOST_SystemCocoa::setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y) const
+{
+ float xf=(float)x, yf=(float)y;
+
+ CGAssociateMouseAndMouseCursorPosition(false);
+ CGWarpMouseCursorPosition(CGPointMake(xf, yf));
+ CGAssociateMouseAndMouseCursorPosition(true);
+
+ return GHOST_kSuccess;
+}
+
+
+GHOST_TSuccess GHOST_SystemCocoa::getModifierKeys(GHOST_ModifierKeys& keys) const
+{
+ NSUInteger modifiers = [[NSApp currentEvent] modifierFlags];
+ //Direct query to modifierFlags can be used in 10.6
+
+ keys.set(GHOST_kModifierKeyCommand, (modifiers & NSCommandKeyMask) ? true : false);
+ keys.set(GHOST_kModifierKeyLeftAlt, (modifiers & NSAlternateKeyMask) ? true : false);
+ keys.set(GHOST_kModifierKeyLeftShift, (modifiers & NSShiftKeyMask) ? true : false);
+ keys.set(GHOST_kModifierKeyLeftControl, (modifiers & NSControlKeyMask) ? true : false);
+
+ return GHOST_kSuccess;
+}
+
+GHOST_TSuccess GHOST_SystemCocoa::getButtons(GHOST_Buttons& buttons) const
+{
+ buttons.clear();
+ buttons.set(GHOST_kButtonMaskLeft, m_pressedMouseButtons & GHOST_kButtonMaskLeft);
+ buttons.set(GHOST_kButtonMaskRight, m_pressedMouseButtons & GHOST_kButtonMaskRight);
+ buttons.set(GHOST_kButtonMaskMiddle, m_pressedMouseButtons & GHOST_kButtonMaskMiddle);
+ buttons.set(GHOST_kButtonMaskButton4, m_pressedMouseButtons & GHOST_kButtonMaskButton4);
+ buttons.set(GHOST_kButtonMaskButton5, m_pressedMouseButtons & GHOST_kButtonMaskButton5);
+ return GHOST_kSuccess;
+}
+
+
+
+#pragma mark Event handlers
+
+/**
+ * The event queue polling function
+ */
+bool GHOST_SystemCocoa::processEvents(bool waitForEvent)
+{
+ NSAutoreleasePool* pool = (NSAutoreleasePool*)m_autoReleasePool;
+ //bool anyProcessed = false;
+ NSEvent *event;
+
+ //Reinit the AutoReleasePool
+ //This is not done the typical Cocoa way (init at beginning of loop, and drain at the end)
+ //to allow pool to work with other function calls outside this loop (but in same thread)
+ [pool drain];
+ m_autoReleasePool = [[NSAutoreleasePool alloc] init];
+
+ // SetMouseCoalescingEnabled(false, NULL);
+ //TODO : implement timer ??
+
+ /*do {
+ GHOST_TimerManager* timerMgr = getTimerManager();
+
+ if (waitForEvent) {
+ GHOST_TUns64 next = timerMgr->nextFireTime();
+ double timeOut;
+
+ if (next == GHOST_kFireTimeNever) {
+ timeOut = kEventDurationForever;
+ } else {
+ timeOut = (double)(next - getMilliSeconds())/1000.0;
+ if (timeOut < 0.0)
+ timeOut = 0.0;
+ }
+
+ ::ReceiveNextEvent(0, NULL, timeOut, false, &event);
+ }
+
+ if (timerMgr->fireTimers(getMilliSeconds())) {
+ anyProcessed = true;
+ }
+
+ //TODO: check fullscreen redrawing issues
+ if (getFullScreen()) {
+ // Check if the full-screen window is dirty
+ GHOST_IWindow* window = m_windowManager->getFullScreenWindow();
+ if (((GHOST_WindowCarbon*)window)->getFullScreenDirty()) {
+ pushEvent( new GHOST_Event(getMilliSeconds(), GHOST_kEventWindowUpdate, window) );
+ anyProcessed = true;
+ }
+ }*/
+
+ do {
+ event = [NSApp nextEventMatchingMask:NSAnyEventMask
+ untilDate:[NSDate distantPast]
+ inMode:NSDefaultRunLoopMode
+ dequeue:YES];
+ if (event==nil)
+ break;
+
+ //anyProcessed = true;
+
+ switch ([event type]) {
+ case NSKeyDown:
+ case NSKeyUp:
+ case NSFlagsChanged:
+ handleKeyEvent(event);
+
+ /* Support system-wide keyboard shortcuts, like Exposé, ...) =>included in always NSApp sendEvent */
+ /* if (([event modifierFlags] & NSCommandKeyMask) || [event type] == NSFlagsChanged) {
+ [NSApp sendEvent:event];
+ }*/
+ break;
+
+ case NSLeftMouseDown:
+ case NSLeftMouseUp:
+ case NSRightMouseDown:
+ case NSRightMouseUp:
+ case NSMouseMoved:
+ case NSLeftMouseDragged:
+ case NSRightMouseDragged:
+ case NSScrollWheel:
+ case NSOtherMouseDown:
+ case NSOtherMouseUp:
+ case NSOtherMouseDragged:
+ handleMouseEvent(event);
+ break;
+
+ case NSTabletPoint:
+ case NSTabletProximity:
+ handleTabletEvent(event);
+ break;
+
+ /* Trackpad features, will need OS X 10.6 for implementation
+ case NSEventTypeGesture:
+ case NSEventTypeMagnify:
+ case NSEventTypeSwipe:
+ case NSEventTypeRotate:
+ case NSEventTypeBeginGesture:
+ case NSEventTypeEndGesture:
+ break; */
+
+ /*Unused events
+ NSMouseEntered = 8,
+ NSMouseExited = 9,
+ NSAppKitDefined = 13,
+ NSSystemDefined = 14,
+ NSApplicationDefined = 15,
+ NSPeriodic = 16,
+ NSCursorUpdate = 17,*/
+
+ default:
+ break;
+ }
+ //Resend event to NSApp to ensure Mac wide events are handled
+ [NSApp sendEvent:event];
+ } while (event!= nil);
+ //} while (waitForEvent && !anyProcessed); Needed only for timer implementation
+
+
+ return true; //anyProcessed;
+}
+
+//TODO: To be called from NSWindow delegate
+GHOST_TSuccess GHOST_SystemCocoa::handleWindowEvent(void *eventPtr)
+{
+ /*WindowRef windowRef;
+ GHOST_WindowCocoa *window;
+
+ // Check if the event was send to a GHOST window
+ ::GetEventParameter(event, kEventParamDirectObject, typeWindowRef, NULL, sizeof(WindowRef), NULL, &windowRef);
+ window = (GHOST_WindowCarbon*) ::GetWRefCon(windowRef);
+ if (!validWindow(window)) {
+ return err;
+ }
+
+ //if (!getFullScreen()) {
+ err = noErr;
+ switch([event ])
+ {
+ case kEventWindowClose:
+ pushEvent( new GHOST_Event(getMilliSeconds(), GHOST_kEventWindowClose, window) );
+ break;
+ case kEventWindowActivated:
+ m_windowManager->setActiveWindow(window);
+ window->loadCursor(window->getCursorVisibility(), window->getCursorShape());
+ pushEvent( new GHOST_Event(getMilliSeconds(), GHOST_kEventWindowActivate, window) );
+ break;
+ case kEventWindowDeactivated:
+ m_windowManager->setWindowInactive(window);
+ pushEvent( new GHOST_Event(getMilliSeconds(), GHOST_kEventWindowDeactivate, window) );
+ break;
+ case kEventWindowUpdate:
+ //if (getFullScreen()) GHOST_PRINT("GHOST_SystemCarbon::handleWindowEvent(): full-screen update event\n");
+ pushEvent( new GHOST_Event(getMilliSeconds(), GHOST_kEventWindowUpdate, window) );
+ break;
+ case kEventWindowBoundsChanged:
+ if (!m_ignoreWindowSizedMessages)
+ {
+ window->updateDrawingContext();
+ pushEvent( new GHOST_Event(getMilliSeconds(), GHOST_kEventWindowSize, window) );
+ }
+ break;
+ default:
+ err = eventNotHandledErr;
+ break;
+ }
+// }
+ //else {
+ //window = (GHOST_WindowCarbon*) m_windowManager->getFullScreenWindow();
+ //GHOST_PRINT("GHOST_SystemCarbon::handleWindowEvent(): full-screen window event, " << window << "\n");
+ //::RemoveEventFromQueue(::GetMainEventQueue(), event);
+ //}
+ */
+ return GHOST_kSuccess;
+}
+
+GHOST_TUns8 GHOST_SystemCocoa::handleQuitRequest()
+{
+ //Check open windows if some changes are not saved
+ if (m_windowManager->getAnyModifiedState())
+ {
+ int shouldQuit = NSRunAlertPanel(@"Exit Blender", @"Some changes have not been saved. Do you really want to quit ?",
+ @"Cancel", @"Quit anyway", nil);
+ if (shouldQuit == NSAlertAlternateReturn)
+ {
+ pushEvent( new GHOST_Event(getMilliSeconds(), GHOST_kEventQuit, NULL) );
+ return GHOST_kExitNow;
+ }
+ }
+ else {
+ pushEvent( new GHOST_Event(getMilliSeconds(), GHOST_kEventQuit, NULL) );
+ return GHOST_kExitNow;
+ }
+
+ return GHOST_kExitCancel;
+}
+
+
+GHOST_TSuccess GHOST_SystemCocoa::handleTabletEvent(void *eventPtr)
+{
+ NSEvent *event = (NSEvent *)eventPtr;
+ GHOST_IWindow* window = m_windowManager->getActiveWindow();
+ GHOST_TabletData& ct=((GHOST_WindowCocoa*)window)->GetCocoaTabletData();
+ NSUInteger tabletEvent;
+
+ ct.Pressure = 0;
+ ct.Xtilt = 0;
+ ct.Ytilt = 0;
+
+ //Handle tablet events combined with mouse events
+ switch ([event subtype]) {
+ case NX_SUBTYPE_TABLET_POINT:
+ tabletEvent = NSTabletPoint;
+ break;
+ case NX_SUBTYPE_TABLET_PROXIMITY:
+ tabletEvent = NSTabletProximity;
+ break;
+
+ default:
+ tabletEvent = [event type];
+ break;
+ }
+
+ switch (tabletEvent) {
+ case NSTabletPoint:
+ ct.Pressure = [event tangentialPressure];
+ ct.Xtilt = [event tilt].x;
+ ct.Ytilt = [event tilt].y;
+ break;
+
+ case NSTabletProximity:
+ if ([event isEnteringProximity])
+ {
+ //pointer is entering tablet area proximity
+ switch ([event pointingDeviceType]) {
+ case NSPenPointingDevice:
+ ct.Active = GHOST_kTabletModeStylus;
+ break;
+ case NSEraserPointingDevice:
+ ct.Active = GHOST_kTabletModeEraser;
+ break;
+ case NSCursorPointingDevice:
+ case NSUnknownPointingDevice:
+ default:
+ ct.Active = GHOST_kTabletModeNone;
+ break;
+ }
+ } else {
+ // pointer is leaving - return to mouse
+ ct.Active = GHOST_kTabletModeNone;
+ }
+ break;
+
+ default:
+ GHOST_ASSERT(FALSE,"GHOST_SystemCocoa::handleTabletEvent : unknown event received");
+ return GHOST_kFailure;
+ break;
+ }
+ return GHOST_kSuccess;
+}
+
+
+GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
+{
+ NSEvent *event = (NSEvent *)eventPtr;
+ GHOST_IWindow* window = m_windowManager->getActiveWindow();
+
+ switch ([event type])
+ {
+ case NSLeftMouseDown:
+ case NSRightMouseDown:
+ case NSOtherMouseDown:
+ if (m_windowManager->getActiveWindow()) {
+ pushEvent(new GHOST_EventButton([event timestamp], GHOST_kEventButtonDown, window, convertButton([event buttonNumber])));
+ }
+ handleTabletEvent(eventPtr);
+ break;
+
+ case NSLeftMouseUp:
+ case NSRightMouseUp:
+ case NSOtherMouseUp:
+ if (m_windowManager->getActiveWindow()) {
+ pushEvent(new GHOST_EventButton([event timestamp], GHOST_kEventButtonUp, window, convertButton([event buttonNumber])));
+ }
+ handleTabletEvent(eventPtr);
+ break;
+
+ case NSLeftMouseDragged:
+ case NSRightMouseDragged:
+ case NSOtherMouseDragged:
+ handleTabletEvent(eventPtr);
+ case NSMouseMoved:
+ {
+ NSPoint mousePos = [event locationInWindow];
+ pushEvent(new GHOST_EventCursor([event timestamp], GHOST_kEventCursorMove, window, mousePos.x, mousePos.y));
+ break;
+ }
+
+ case NSScrollWheel:
+ {
+ GHOST_TInt32 delta;
+ delta = [event deltaY] > 0 ? 1 : -1;
+ pushEvent(new GHOST_EventWheel(getMilliSeconds(), window, delta));
+
+ }
+ break;
+
+ default:
+ return GHOST_kFailure;
+ break;
+ }
+
+ return GHOST_kSuccess;
+}
+
+
+GHOST_TSuccess GHOST_SystemCocoa::handleKeyEvent(void *eventPtr)
+{
+ NSEvent *event = (NSEvent *)eventPtr;
+ GHOST_IWindow* window = m_windowManager->getActiveWindow();
+ NSUInteger modifiers;
+ NSString *characters;
+ GHOST_TKey keyCode;
+ unsigned char ascii;
+
+ /* Can happen, very rarely - seems to only be when command-H makes
+ * the window go away and we still get an HKey up.
+ */
+ if (!window) {
+ return GHOST_kFailure;
+ }
+
+ switch ([event type]) {
+ case NSKeyDown:
+ case NSKeyUp:
+ characters = [event characters];
+ if ([characters length]) { //Check for dead keys
+ keyCode = convertKey([event keyCode],
+ [[event charactersIgnoringModifiers] characterAtIndex:0]);
+ ascii= convertRomanToLatin((char)[characters characterAtIndex:0]);
+ } else {
+ keyCode = convertKey([event keyCode],0);
+ ascii= 0;
+ }
+
+
+ if ((keyCode == GHOST_kKeyQ) && (m_modifierMask & NSCommandKeyMask))
+ break; //Cmd-Q is directly handled by Cocoa
+
+ if ([event type] == NSKeyDown) {
+ pushEvent( new GHOST_EventKey([event timestamp], GHOST_kEventKeyDown, window, keyCode, ascii) );
+ //printf("\nKey pressed keyCode=%u ascii=%i %c",keyCode,ascii,ascii);
+ } else {
+ pushEvent( new GHOST_EventKey([event timestamp], GHOST_kEventKeyUp, window, keyCode, ascii) );
+ }
+ break;
+
+ case NSFlagsChanged:
+ modifiers = [event modifierFlags];
+ if ((modifiers & NSShiftKeyMask) != (m_modifierMask & NSShiftKeyMask)) {
+ pushEvent( new GHOST_EventKey(getMilliSeconds(), (modifiers & NSShiftKeyMask)?GHOST_kEventKeyDown:GHOST_kEventKeyUp, window, GHOST_kKeyLeftShift) );
+ }
+ if ((modifiers & NSControlKeyMask) != (m_modifierMask & NSControlKeyMask)) {
+ pushEvent( new GHOST_EventKey(getMilliSeconds(), (modifiers & NSControlKeyMask)?GHOST_kEventKeyDown:GHOST_kEventKeyUp, window, GHOST_kKeyLeftControl) );
+ }
+ if ((modifiers & NSAlternateKeyMask) != (m_modifierMask & NSAlternateKeyMask)) {
+ pushEvent( new GHOST_EventKey(getMilliSeconds(), (modifiers & NSAlternateKeyMask)?GHOST_kEventKeyDown:GHOST_kEventKeyUp, window, GHOST_kKeyLeftAlt) );
+ }
+ if ((modifiers & NSCommandKeyMask) != (m_modifierMask & NSCommandKeyMask)) {
+ pushEvent( new GHOST_EventKey(getMilliSeconds(), (modifiers & NSCommandKeyMask)?GHOST_kEventKeyDown:GHOST_kEventKeyUp, window, GHOST_kKeyCommand) );
+ }
+
+ m_modifierMask = modifiers;
+ break;
+
+ default:
+ return GHOST_kFailure;
+ break;
+ }
+
+ return GHOST_kSuccess;
+}
+
+
+/* System wide mouse clicks are handled directly through systematic event forwarding to Cocoa
+bool GHOST_SystemCarbon::handleMouseDown(void *eventPtr)
+{
+ NSEvent *event = (NSEvent *)eventPtr;
+ WindowPtr window;
+ short part;
+ BitMap screenBits;
+ bool handled = true;
+ GHOST_WindowCarbon* ghostWindow;
+ Point mousePos = {0 , 0};
+
+ ::GetEventParameter(event, kEventParamMouseLocation, typeQDPoint, NULL, sizeof(Point), NULL, &mousePos);
+
+ part = ::FindWindow(mousePos, &window);
+ ghostWindow = (GHOST_WindowCarbon*) ::GetWRefCon(window);
+
+ switch (part) {
+ case inMenuBar:
+ handleMenuCommand(::MenuSelect(mousePos));
+ break;
+
+ case inDrag:
+ // *
+ // * The DragWindow() routine creates a lot of kEventWindowBoundsChanged
+ // * events. By setting m_ignoreWindowSizedMessages these are suppressed.
+ // * @see GHOST_SystemCarbon::handleWindowEvent(EventRef event)
+ // *
+ // even worse: scale window also generates a load of events, and nothing
+ // is handled (read: client's event proc called) until you release mouse (ton)
+
+ GHOST_ASSERT(validWindow(ghostWindow), "GHOST_SystemCarbon::handleMouseDown: invalid window");
+ m_ignoreWindowSizedMessages = true;
+ ::DragWindow(window, mousePos, &GetQDGlobalsScreenBits(&screenBits)->bounds);
+ m_ignoreWindowSizedMessages = false;
+
+ pushEvent( new GHOST_Event(getMilliSeconds(), GHOST_kEventWindowMove, ghostWindow) );
+
+ break;
+
+ case inContent:
+ if (window != ::FrontWindow()) {
+ ::SelectWindow(window);
+ //
+ // * We add a mouse down event on the newly actived window
+ // *
+ //GHOST_PRINT("GHOST_SystemCarbon::handleMouseDown(): adding mouse down event, " << ghostWindow << "\n");
+ EventMouseButton button;
+ ::GetEventParameter(event, kEventParamMouseButton, typeMouseButton, NULL, sizeof(button), NULL, &button);
+ pushEvent(new GHOST_EventButton(getMilliSeconds(), GHOST_kEventButtonDown, ghostWindow, convertButton(button)));
+ } else {
+ handled = false;
+ }
+ break;
+
+ case inGoAway:
+ GHOST_ASSERT(ghostWindow, "GHOST_SystemCarbon::handleMouseEvent: ghostWindow==0");
+ if (::TrackGoAway(window, mousePos))
+ {
+ // todo: add option-close, because itÿs in the HIG
+ // if (event.modifiers & optionKey) {
+ // Close the clean documents, others will be confirmed one by one.
+ //}
+ // else {
+ pushEvent(new GHOST_Event(getMilliSeconds(), GHOST_kEventWindowClose, ghostWindow));
+ //}
+ }
+ break;
+
+ case inGrow:
+ GHOST_ASSERT(ghostWindow, "GHOST_SystemCarbon::handleMouseEvent: ghostWindow==0");
+ ::ResizeWindow(window, mousePos, NULL, NULL);
+ break;
+
+ case inZoomIn:
+ case inZoomOut:
+ GHOST_ASSERT(ghostWindow, "GHOST_SystemCarbon::handleMouseEvent: ghostWindow==0");
+ if (::TrackBox(window, mousePos, part)) {
+ int macState;
+
+ macState = ghostWindow->getMac_windowState();
+ if ( macState== 0)
+ ::ZoomWindow(window, part, true);
+ else
+ if (macState == 2) { // always ok
+ ::ZoomWindow(window, part, true);
+ ghostWindow->setMac_windowState(1);
+ } else { // need to force size again
+ // GHOST_TUns32 scr_x,scr_y; //unused
+ Rect outAvailableRect;
+
+ ghostWindow->setMac_windowState(2);
+ ::GetAvailableWindowPositioningBounds ( GetMainDevice(), &outAvailableRect);
+
+ //this->getMainDisplayDimensions(scr_x,scr_y);
+ ::SizeWindow (window, outAvailableRect.right-outAvailableRect.left,outAvailableRect.bottom-outAvailableRect.top-1,false);
+ ::MoveWindow (window, outAvailableRect.left, outAvailableRect.top,true);
+ }
+
+ }
+ break;
+
+ default:
+ handled = false;
+ break;
+ }
+
+ return handled;
+}
+
+
+bool GHOST_SystemCarbon::handleMenuCommand(GHOST_TInt32 menuResult)
+{
+ short menuID;
+ short menuItem;
+ UInt32 command;
+ bool handled;
+ OSErr err;
+
+ menuID = HiWord(menuResult);
+ menuItem = LoWord(menuResult);
+
+ err = ::GetMenuItemCommandID(::GetMenuHandle(menuID), menuItem, &command);
+
+ handled = false;
+
+ if (err || command == 0) {
+ }
+ else {
+ switch(command) {
+ }
+ }
+
+ ::HiliteMenu(0);
+ return handled;
+}*/
+
+
+
+#pragma mark Clipboard get/set
+
+GHOST_TUns8* GHOST_SystemCocoa::getClipboard(bool selection) const
+{
+ GHOST_TUns8 * temp_buff;
+ size_t pastedTextSize;
+
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
+ NSPasteboard *pasteBoard = [NSPasteboard generalPasteboard];
+
+ if (pasteBoard == nil) {
+ [pool drain];
+ return NULL;
+ }
+
+ NSArray *supportedTypes =
+ [NSArray arrayWithObjects: @"public.utf8-plain-text", nil];
+
+ NSString *bestType = [[NSPasteboard generalPasteboard]
+ availableTypeFromArray:supportedTypes];
+
+ if (bestType == nil) {
+ [pool drain];
+ return NULL;
+ }
+
+ NSString * textPasted = [pasteBoard stringForType:@"public.utf8-plain-text"];
+
+ if (textPasted == nil) {
+ [pool drain];
+ return NULL;
+ }
+
+ pastedTextSize = [textPasted lengthOfBytesUsingEncoding:NSUTF8StringEncoding];
+
+ temp_buff = (GHOST_TUns8*) malloc(pastedTextSize+1);
+
+ if (temp_buff == NULL) {
+ [pool drain];
+ return NULL;
+ }
+
+ strncpy((char*)temp_buff, [textPasted UTF8String], pastedTextSize);
+
+ temp_buff[pastedTextSize] = '\0';
+
+ [pool drain];
+
+ if(temp_buff) {
+ return temp_buff;
+ } else {
+ return NULL;
+ }
+}
+
+void GHOST_SystemCocoa::putClipboard(GHOST_TInt8 *buffer, bool selection) const
+{
+ NSString *textToCopy;
+
+ if(selection) {return;} // for copying the selection, used on X11
+
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
+ NSPasteboard *pasteBoard = [NSPasteboard generalPasteboard];
+
+ if (pasteBoard == nil) {
+ [pool drain];
+ return;
+ }
+
+ NSArray *supportedTypes = [NSArray arrayWithObject:@"public.utf8-plain-text"];
+
+ [pasteBoard declareTypes:supportedTypes owner:nil];
+
+ textToCopy = [NSString stringWithUTF8String:buffer];
+
+ [pasteBoard setString:textToCopy forType:@"public.utf8-plain-text"];
+
+ [pool drain];
+}
+
+#pragma mark Carbon stuff to remove
+
+#ifdef WITH_CARBON
+
+
+OSErr GHOST_SystemCarbon::sAEHandlerLaunch(const AppleEvent *event, AppleEvent *reply, SInt32 refCon)
+{
+ //GHOST_SystemCarbon* sys = (GHOST_SystemCarbon*) refCon;
+
+ return noErr;
+}
+
+OSErr GHOST_SystemCarbon::sAEHandlerOpenDocs(const AppleEvent *event, AppleEvent *reply, SInt32 refCon)
+{
+ //GHOST_SystemCarbon* sys = (GHOST_SystemCarbon*) refCon;
+ AEDescList docs;
+ SInt32 ndocs;
+ OSErr err;
+
+ err = AEGetParamDesc(event, keyDirectObject, typeAEList, &docs);
+ if (err != noErr) return err;
+
+ err = AECountItems(&docs, &ndocs);
+ if (err==noErr) {
+ int i;
+
+ for (i=0; i<ndocs; i++) {
+ FSSpec fss;
+ AEKeyword kwd;
+ DescType actType;
+ Size actSize;
+
+ err = AEGetNthPtr(&docs, i+1, typeFSS, &kwd, &actType, &fss, sizeof(fss), &actSize);
+ if (err!=noErr)
+ break;
+
+ if (i==0) {
+ FSRef fsref;
+
+ if (FSpMakeFSRef(&fss, &fsref)!=noErr)
+ break;
+ if (FSRefMakePath(&fsref, (UInt8*) g_firstFileBuf, sizeof(g_firstFileBuf))!=noErr)
+ break;
+
+ g_hasFirstFile = true;
+ }
+ }
+ }
+
+ AEDisposeDesc(&docs);
+
+ return err;
+}
+
+OSErr GHOST_SystemCarbon::sAEHandlerPrintDocs(const AppleEvent *event, AppleEvent *reply, SInt32 refCon)
+{
+ //GHOST_SystemCarbon* sys = (GHOST_SystemCarbon*) refCon;
+
+ return noErr;
+}
+
+OSErr GHOST_SystemCarbon::sAEHandlerQuit(const AppleEvent *event, AppleEvent *reply, SInt32 refCon)
+{
+ GHOST_SystemCarbon* sys = (GHOST_SystemCarbon*) refCon;
+
+ sys->pushEvent( new GHOST_Event(sys->getMilliSeconds(), GHOST_kEventQuit, NULL) );
+
+ return noErr;
+}
+#endif \ No newline at end of file
diff --git a/intern/ghost/intern/GHOST_Window.cpp b/intern/ghost/intern/GHOST_Window.cpp
index dee890830a1..34e9f519a07 100644
--- a/intern/ghost/intern/GHOST_Window.cpp
+++ b/intern/ghost/intern/GHOST_Window.cpp
@@ -27,8 +27,6 @@
*/
/**
-
- * $Id$
* Copyright (C) 2001 NaN Technologies B.V.
* @author Maarten Gribnau
* @date May 10, 2001
@@ -54,6 +52,8 @@ GHOST_Window::GHOST_Window(
m_cursorShape(GHOST_kStandardCursorDefault),
m_stereoVisual(stereoVisual)
{
+ m_isUnsavedChanges = false;
+
m_fullScreen = state == GHOST_kWindowStateFullScreen;
if (m_fullScreen) {
m_fullScreenWidth = width;
@@ -139,3 +139,15 @@ GHOST_TSuccess GHOST_Window::setCustomCursorShape(GHOST_TUns8 *bitmap, GHOST_TUn
}
}
+
+GHOST_TSuccess GHOST_Window::setModifiedState(bool isUnsavedChanges)
+{
+ m_isUnsavedChanges = isUnsavedChanges;
+
+ return GHOST_kSuccess;
+}
+
+bool GHOST_Window::getModifiedState()
+{
+ return m_isUnsavedChanges;
+} \ No newline at end of file
diff --git a/intern/ghost/intern/GHOST_Window.h b/intern/ghost/intern/GHOST_Window.h
index 88178bae5b3..a2d1675f6ab 100644
--- a/intern/ghost/intern/GHOST_Window.h
+++ b/intern/ghost/intern/GHOST_Window.h
@@ -174,6 +174,19 @@ public:
virtual GHOST_TSuccess setCursorGrab(bool grab);
/**
+ * Sets the window "modified" status, indicating unsaved changes
+ * @param isUnsavedChanges Unsaved changes or not
+ * @return Indication of success.
+ */
+ virtual GHOST_TSuccess setModifiedState(bool isUnsavedChanges);
+
+ /**
+ * Gets the window "modified" status, indicating unsaved changes
+ * @return True if there are unsaved changes
+ */
+ virtual bool getModifiedState();
+
+ /**
* Returns the type of drawing context used in this window.
* @return The current type of drawing context.
*/
@@ -262,6 +275,9 @@ protected:
/** The current shape of the cursor */
GHOST_TStandardCursor m_cursorShape;
+ /** Modified state : are there unsaved changes */
+ bool m_isUnsavedChanges;
+
/** Stores wether this is a full screen window. */
bool m_fullScreen;
diff --git a/intern/ghost/intern/GHOST_WindowCocoa.h b/intern/ghost/intern/GHOST_WindowCocoa.h
new file mode 100644
index 00000000000..f383e3a7a81
--- /dev/null
+++ b/intern/ghost/intern/GHOST_WindowCocoa.h
@@ -0,0 +1,315 @@
+/**
+ * $Id$
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+/**
+ * @file GHOST_WindowCocoa.h
+ * Declaration of GHOST_WindowCocoa class.
+ */
+
+#ifndef _GHOST_WINDOW_COCOA_H_
+#define _GHOST_WINDOW_COCOA_H_
+
+#ifndef __APPLE__
+#error Apple OSX only!
+#endif // __APPLE__
+
+#include "GHOST_Window.h"
+#include "STR_String.h"
+
+#include <AGL/agl.h>
+
+
+/**
+ * Window on Mac OSX/Cocoa.
+ * Carbon windows have a size widget in the lower right corner of the window.
+ * To force it to be visible, the height of the client rectangle is reduced so
+ * that applications do not draw in that area. GHOST will manage that area
+ * which is called the gutter.
+ * When OpenGL contexts are active, GHOST will use AGL_BUFFER_RECT to prevent
+ * OpenGL drawing outside the reduced client rectangle.
+ * @author Maarten Gribnau
+ * @date May 23, 2001
+ */
+class GHOST_WindowCocoa : public GHOST_Window {
+public:
+ /**
+ * Constructor.
+ * Creates a new window and opens it.
+ * To check if the window was created properly, use the getValid() method.
+ * @param title The text shown in the title bar of the window.
+ * @param left The coordinate of the left edge of the window.
+ * @param top The coordinate of the top edge of the window.
+ * @param width The width the window.
+ * @param height The height the window.
+ * @param state The state the window is initially opened with.
+ * @param type The type of drawing context installed in this window.
+ * @param stereoVisual Stereo visual for quad buffered stereo.
+ */
+ GHOST_WindowCocoa(
+ const STR_String& title,
+ GHOST_TInt32 left,
+ GHOST_TInt32 top,
+ GHOST_TUns32 width,
+ GHOST_TUns32 height,
+ GHOST_TWindowState state,
+ GHOST_TDrawingContextType type = GHOST_kDrawingContextTypeNone,
+ const bool stereoVisual = false
+ );
+
+ /**
+ * Destructor.
+ * Closes the window and disposes resources allocated.
+ */
+ virtual ~GHOST_WindowCocoa();
+
+ /**
+ * Returns indication as to whether the window is valid.
+ * @return The validity of the window.
+ */
+ virtual bool getValid() const;
+
+ /**
+ * Sets the title displayed in the title bar.
+ * @param title The title to display in the title bar.
+ */
+ virtual void setTitle(const STR_String& title);
+
+ /**
+ * Returns the title displayed in the title bar.
+ * @param title The title displayed in the title bar.
+ */
+ virtual void getTitle(STR_String& title) const;
+
+ /**
+ * Returns the window rectangle dimensions.
+ * The dimensions are given in screen coordinates that are relative to the upper-left corner of the screen.
+ * @param bounds The bounding rectangle of the window.
+ */
+ virtual void getWindowBounds(GHOST_Rect& bounds) const;
+
+ /**
+ * Returns the client rectangle dimensions.
+ * The left and top members of the rectangle are always zero.
+ * @param bounds The bounding rectangle of the cleient area of the window.
+ */
+ virtual void getClientBounds(GHOST_Rect& bounds) const;
+
+ /**
+ * Resizes client rectangle width.
+ * @param width The new width of the client area of the window.
+ */
+ virtual GHOST_TSuccess setClientWidth(GHOST_TUns32 width);
+
+ /**
+ * Resizes client rectangle height.
+ * @param height The new height of the client area of the window.
+ */
+ virtual GHOST_TSuccess setClientHeight(GHOST_TUns32 height);
+
+ /**
+ * Resizes client rectangle.
+ * @param width The new width of the client area of the window.
+ * @param height The new height of the client area of the window.
+ */
+ virtual GHOST_TSuccess setClientSize(GHOST_TUns32 width, GHOST_TUns32 height);
+
+ /**
+ * Returns the state of the window (normal, minimized, maximized).
+ * @return The state of the window.
+ */
+ virtual GHOST_TWindowState getState() const;
+
+ /**
+ * Sets the window "modified" status, indicating unsaved changes
+ * @param isUnsavedChanges Unsaved changes or not
+ * @return Indication of success.
+ */
+ virtual GHOST_TSuccess setModifiedState(bool isUnsavedChanges);
+
+ /**
+ * Converts a point in screen coordinates to client rectangle coordinates
+ * @param inX The x-coordinate on the screen.
+ * @param inY The y-coordinate on the screen.
+ * @param outX The x-coordinate in the client rectangle.
+ * @param outY The y-coordinate in the client rectangle.
+ */
+ virtual void screenToClient(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const;
+
+ /**
+ * Converts a point in screen coordinates to client rectangle coordinates
+ * @param inX The x-coordinate in the client rectangle.
+ * @param inY The y-coordinate in the client rectangle.
+ * @param outX The x-coordinate on the screen.
+ * @param outY The y-coordinate on the screen.
+ */
+ virtual void clientToScreen(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const;
+
+ /**
+ * Sets the state of the window (normal, minimized, maximized).
+ * @param state The state of the window.
+ * @return Indication of success.
+ */
+ virtual GHOST_TSuccess setState(GHOST_TWindowState state);
+
+ /**
+ * Sets the order of the window (bottom, top).
+ * @param order The order of the window.
+ * @return Indication of success.
+ */
+ virtual GHOST_TSuccess setOrder(GHOST_TWindowOrder order);
+
+ /**
+ * Swaps front and back buffers of a window.
+ * @return A boolean success indicator.
+ */
+ virtual GHOST_TSuccess swapBuffers();
+
+ /**
+ * Updates the drawing context of this window. Needed
+ * whenever the window is changed.
+ * @return Indication of success.
+ */
+ GHOST_TSuccess updateDrawingContext();
+
+ /**
+ * Activates the drawing context of this window.
+ * @return A boolean success indicator.
+ */
+ virtual GHOST_TSuccess activateDrawingContext();
+
+ virtual void loadCursor(bool visible, GHOST_TStandardCursor cursor) const;
+
+ /**
+ * Returns the dirty state of the window when in full-screen mode.
+ * @return Whether it is dirty.
+ */
+ virtual bool getFullScreenDirty();
+
+ /* accessor for fullscreen window */
+ virtual void setMac_windowState(short value);
+ virtual short getMac_windowState();
+
+
+ const GHOST_TabletData* GetTabletData()
+ { return &m_tablet; }
+
+ GHOST_TabletData& GetCocoaTabletData()
+ { return m_tablet; }
+protected:
+ /**
+ * Tries to install a rendering context in this window.
+ * @param type The type of rendering context installed.
+ * @return Indication as to whether installation has succeeded.
+ */
+ virtual GHOST_TSuccess installDrawingContext(GHOST_TDrawingContextType type);
+
+ /**
+ * Removes the current drawing context.
+ * @return Indication as to whether removal has succeeded.
+ */
+ virtual GHOST_TSuccess removeDrawingContext();
+
+ /**
+ * Invalidates the contents of this window.
+ * @return Indication of success.
+ */
+ virtual GHOST_TSuccess invalidate();
+
+ /**
+ * Sets the cursor visibility on the window using
+ * native window system calls.
+ */
+ virtual GHOST_TSuccess setWindowCursorVisibility(bool visible);
+
+ /**
+ * Sets the cursor shape on the window using
+ * native window system calls.
+ */
+ virtual GHOST_TSuccess setWindowCursorShape(GHOST_TStandardCursor shape);
+
+ /**
+ * Sets the cursor shape on the window using
+ * native window system calls.
+ */
+ virtual GHOST_TSuccess setWindowCustomCursorShape(GHOST_TUns8 *bitmap, GHOST_TUns8 *mask,
+ int sizex, int sizey, int hotX, int hotY, int fg_color, int bg_color);
+
+ virtual GHOST_TSuccess setWindowCustomCursorShape(GHOST_TUns8 bitmap[16][2], GHOST_TUns8 mask[16][2], int hotX, int hotY);
+
+ /**
+ * Converts a string object to a Mac Pascal string.
+ * @param in The string object to be converted.
+ * @param out The converted string.
+ */
+ virtual void gen2mac(const STR_String& in, Str255 out) const;
+
+ /**
+ * Converts a Mac Pascal string to a string object.
+ * @param in The string to be converted.
+ * @param out The converted string object.
+ */
+ virtual void mac2gen(const Str255 in, STR_String& out) const;
+
+ WindowRef m_windowRef;
+ CGrafPtr m_grafPtr;
+ AGLContext m_aglCtx;
+
+ /** The first created OpenGL context (for sharing display lists) */
+ static AGLContext s_firstaglCtx;
+
+ Cursor* m_customCursor;
+
+ GHOST_TabletData m_tablet;
+
+ /** When running in full-screen this tells whether to refresh the window. */
+ bool m_fullScreenDirty;
+
+ /** specific MacOs X full screen window setting as we use partially system mechanism
+ values : 0 not maximizable default
+ 1 normal state
+ 2 maximized state
+
+ this will be reworked when rebuilding GHOST carbon to use new OS X apis
+ in order to be unified with GHOST fullscreen/maximised settings
+
+ (lukep)
+ **/
+
+ short mac_windowState;
+
+
+ /**
+ * The width/height of the size rectangle in the lower right corner of a
+ * Mac/Carbon window. This is also the height of the gutter area.
+ */
+#ifdef GHOST_DRAW_CARBON_GUTTER
+ static const GHOST_TInt32 s_sizeRectSize;
+#endif // GHOST_DRAW_CARBON_GUTTER
+};
+
+#endif // _GHOST_WINDOW_COCOA_H_
+
diff --git a/intern/ghost/intern/GHOST_WindowCocoa.mm b/intern/ghost/intern/GHOST_WindowCocoa.mm
new file mode 100644
index 00000000000..092443814b0
--- /dev/null
+++ b/intern/ghost/intern/GHOST_WindowCocoa.mm
@@ -0,0 +1,751 @@
+/**
+ * $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 *****
+ */
+
+/**
+ * Copyright (C) 2001 NaN Technologies B.V.
+ * @author Maarten Gribnau
+ * @date May 10, 2001
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <Carbon/Carbon.h>
+
+#include "GHOST_WindowCocoa.h"
+#include "GHOST_Debug.h"
+
+AGLContext GHOST_WindowCocoa::s_firstaglCtx = NULL;
+#ifdef GHOST_DRAW_CARBON_GUTTER
+const GHOST_TInt32 GHOST_WindowCocoa::s_sizeRectSize = 16;
+#endif //GHOST_DRAW_CARBON_GUTTER
+
+static const GLint sPreferredFormatWindow[8] = {
+AGL_RGBA,
+AGL_DOUBLEBUFFER,
+AGL_ACCELERATED,
+AGL_DEPTH_SIZE, 32,
+AGL_NONE,
+};
+
+static const GLint sPreferredFormatFullScreen[9] = {
+AGL_RGBA,
+AGL_DOUBLEBUFFER,
+AGL_ACCELERATED,
+AGL_FULLSCREEN,
+AGL_DEPTH_SIZE, 32,
+AGL_NONE,
+};
+
+
+
+WindowRef ugly_hack=NULL;
+
+const EventTypeSpec kWEvents[] = {
+ { kEventClassWindow, kEventWindowZoom }, /* for new zoom behaviour */
+};
+
+static OSStatus myWEventHandlerProc(EventHandlerCallRef handler, EventRef event, void* userData) {
+ WindowRef mywindow;
+ GHOST_WindowCocoa *ghost_window;
+ OSStatus err;
+ int theState;
+
+ if (::GetEventKind(event) == kEventWindowZoom) {
+ err = ::GetEventParameter (event,kEventParamDirectObject,typeWindowRef,NULL,sizeof(mywindow),NULL, &mywindow);
+ ghost_window = (GHOST_WindowCocoa *) GetWRefCon(mywindow);
+ theState = ghost_window->getMac_windowState();
+ if (theState == 1)
+ ghost_window->setMac_windowState(2);
+ else if (theState == 2)
+ ghost_window->setMac_windowState(1);
+
+ }
+ return eventNotHandledErr;
+}
+
+GHOST_WindowCocoa::GHOST_WindowCocoa(
+ const STR_String& title,
+ GHOST_TInt32 left,
+ GHOST_TInt32 top,
+ GHOST_TUns32 width,
+ GHOST_TUns32 height,
+ GHOST_TWindowState state,
+ GHOST_TDrawingContextType type,
+ const bool stereoVisual
+) :
+ GHOST_Window(title, left, top, width, height, state, GHOST_kDrawingContextTypeNone),
+ m_windowRef(0),
+ m_grafPtr(0),
+ m_aglCtx(0),
+ m_customCursor(0),
+ m_fullScreenDirty(false)
+{
+ Str255 title255;
+ OSStatus err;
+
+ //fprintf(stderr," main screen top %i left %i height %i width %i\n", top, left, height, width);
+
+ if (state >= GHOST_kWindowState8Normal ) {
+ if(state == GHOST_kWindowState8Normal) state= GHOST_kWindowStateNormal;
+ else if(state == GHOST_kWindowState8Maximized) state= GHOST_kWindowStateMaximized;
+ else if(state == GHOST_kWindowState8Minimized) state= GHOST_kWindowStateMinimized;
+ else if(state == GHOST_kWindowState8FullScreen) state= GHOST_kWindowStateFullScreen;
+
+ // state = state - 8; this was the simple version of above code, doesnt work in gcc 4.0
+
+ setMac_windowState(1);
+ } else
+ setMac_windowState(0);
+
+ if (state != GHOST_kWindowStateFullScreen) {
+ Rect bnds = { top, left, top+height, left+width };
+ // Boolean visible = (state == GHOST_kWindowStateNormal) || (state == GHOST_kWindowStateMaximized); /*unused*/
+ gen2mac(title, title255);
+
+ err = ::CreateNewWindow( kDocumentWindowClass,
+ kWindowStandardDocumentAttributes+kWindowLiveResizeAttribute,
+ &bnds,
+ &m_windowRef);
+
+ if ( err != noErr) {
+ fprintf(stderr," error creating window %i \n",err);
+ } else {
+
+ ::SetWRefCon(m_windowRef,(SInt32)this);
+ setTitle(title);
+ err = InstallWindowEventHandler (m_windowRef, myWEventHandlerProc, GetEventTypeCount(kWEvents), kWEvents,NULL,NULL);
+ if ( err != noErr) {
+ fprintf(stderr," error creating handler %i \n",err);
+ } else {
+ // ::TransitionWindow (m_windowRef,kWindowZoomTransitionEffect,kWindowShowTransitionAction,NULL);
+ ::ShowWindow(m_windowRef);
+ ::MoveWindow (m_windowRef, left, top,true);
+
+ }
+ }
+ if (m_windowRef) {
+ m_grafPtr = ::GetWindowPort(m_windowRef);
+ setDrawingContextType(type);
+ updateDrawingContext();
+ activateDrawingContext();
+ }
+ if(ugly_hack==NULL) {
+ ugly_hack= m_windowRef;
+ // when started from commandline, window remains in the back... also for play anim
+ ProcessSerialNumber psn;
+ GetCurrentProcess(&psn);
+ SetFrontProcess(&psn);
+ }
+ }
+ else {
+ /*
+ Rect bnds = { top, left, top+height, left+width };
+ gen2mac("", title255);
+ m_windowRef = ::NewCWindow(
+ nil, // Storage
+ &bnds, // Bounding rectangle of the window
+ title255, // Title of the window
+ 0, // Window initially visible
+ plainDBox, // procID
+ (WindowRef)-1L, // Put window before all other windows
+ 0, // Window has minimize box
+ (SInt32)this); // Store a pointer to the class in the refCon
+ */
+ //GHOST_PRINT("GHOST_WindowCocoa::GHOST_WindowCocoa(): creating full-screen OpenGL context\n");
+ setDrawingContextType(GHOST_kDrawingContextTypeOpenGL);;installDrawingContext(GHOST_kDrawingContextTypeOpenGL);
+ updateDrawingContext();
+ activateDrawingContext();
+
+ m_tablet.Active = GHOST_kTabletModeNone;
+ }
+}
+
+
+GHOST_WindowCocoa::~GHOST_WindowCocoa()
+{
+ if (m_customCursor) delete m_customCursor;
+
+ if(ugly_hack==m_windowRef) ugly_hack= NULL;
+
+ // printf("GHOST_WindowCocoa::~GHOST_WindowCocoa(): removing drawing context\n");
+ if(ugly_hack==NULL) setDrawingContextType(GHOST_kDrawingContextTypeNone);
+ if (m_windowRef) {
+ ::DisposeWindow(m_windowRef);
+ m_windowRef = 0;
+ }
+}
+
+bool GHOST_WindowCocoa::getValid() const
+{
+ bool valid;
+ if (!m_fullScreen) {
+ valid = (m_windowRef != 0) && (m_grafPtr != 0) && ::IsValidWindowPtr(m_windowRef);
+ }
+ else {
+ valid = true;
+ }
+ return valid;
+}
+
+
+void GHOST_WindowCocoa::setTitle(const STR_String& title)
+{
+ GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::setTitle(): window invalid")
+ Str255 title255;
+ gen2mac(title, title255);
+ ::SetWTitle(m_windowRef, title255);
+}
+
+
+void GHOST_WindowCocoa::getTitle(STR_String& title) const
+{
+ GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::getTitle(): window invalid")
+ Str255 title255;
+ ::GetWTitle(m_windowRef, title255);
+ mac2gen(title255, title);
+}
+
+
+void GHOST_WindowCocoa::getWindowBounds(GHOST_Rect& bounds) const
+{
+ OSStatus success;
+ Rect rect;
+ GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::getWindowBounds(): window invalid")
+ success = ::GetWindowBounds(m_windowRef, kWindowStructureRgn, &rect);
+ bounds.m_b = rect.bottom;
+ bounds.m_l = rect.left;
+ bounds.m_r = rect.right;
+ bounds.m_t = rect.top;
+}
+
+
+void GHOST_WindowCocoa::getClientBounds(GHOST_Rect& bounds) const
+{
+ Rect rect;
+ GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::getClientBounds(): window invalid")
+ //::GetPortBounds(m_grafPtr, &rect);
+ ::GetWindowBounds(m_windowRef, kWindowContentRgn, &rect);
+
+ bounds.m_b = rect.bottom;
+ bounds.m_l = rect.left;
+ bounds.m_r = rect.right;
+ bounds.m_t = rect.top;
+
+ // Subtract gutter height from bottom
+#ifdef GHOST_DRAW_CARBON_GUTTER
+ if ((bounds.m_b - bounds.m_t) > s_sizeRectSize)
+ {
+ bounds.m_b -= s_sizeRectSize;
+ }
+ else
+ {
+ bounds.m_t = bounds.m_b;
+ }
+#endif //GHOST_DRAW_CARBON_GUTTER
+}
+
+
+GHOST_TSuccess GHOST_WindowCocoa::setClientWidth(GHOST_TUns32 width)
+{
+ GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::setClientWidth(): window invalid")
+ GHOST_Rect cBnds, wBnds;
+ getClientBounds(cBnds);
+ if (((GHOST_TUns32)cBnds.getWidth()) != width) {
+ ::SizeWindow(m_windowRef, width, cBnds.getHeight(), true);
+ }
+ return GHOST_kSuccess;
+}
+
+
+GHOST_TSuccess GHOST_WindowCocoa::setClientHeight(GHOST_TUns32 height)
+{
+ GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::setClientHeight(): window invalid")
+ GHOST_Rect cBnds, wBnds;
+ getClientBounds(cBnds);
+#ifdef GHOST_DRAW_CARBON_GUTTER
+ if (((GHOST_TUns32)cBnds.getHeight()) != height+s_sizeRectSize) {
+ ::SizeWindow(m_windowRef, cBnds.getWidth(), height+s_sizeRectSize, true);
+ }
+#else //GHOST_DRAW_CARBON_GUTTER
+ if (((GHOST_TUns32)cBnds.getHeight()) != height) {
+ ::SizeWindow(m_windowRef, cBnds.getWidth(), height, true);
+ }
+#endif //GHOST_DRAW_CARBON_GUTTER
+ return GHOST_kSuccess;
+}
+
+
+GHOST_TSuccess GHOST_WindowCocoa::setClientSize(GHOST_TUns32 width, GHOST_TUns32 height)
+{
+ GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::setClientSize(): window invalid")
+ GHOST_Rect cBnds, wBnds;
+ getClientBounds(cBnds);
+#ifdef GHOST_DRAW_CARBON_GUTTER
+ if ((((GHOST_TUns32)cBnds.getWidth()) != width) ||
+ (((GHOST_TUns32)cBnds.getHeight()) != height+s_sizeRectSize)) {
+ ::SizeWindow(m_windowRef, width, height+s_sizeRectSize, true);
+ }
+#else //GHOST_DRAW_CARBON_GUTTER
+ if ((((GHOST_TUns32)cBnds.getWidth()) != width) ||
+ (((GHOST_TUns32)cBnds.getHeight()) != height)) {
+ ::SizeWindow(m_windowRef, width, height, true);
+ }
+#endif //GHOST_DRAW_CARBON_GUTTER
+ return GHOST_kSuccess;
+}
+
+
+GHOST_TWindowState GHOST_WindowCocoa::getState() const
+{
+ GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::getState(): window invalid")
+ GHOST_TWindowState state;
+ if (::IsWindowVisible(m_windowRef) == false) {
+ state = GHOST_kWindowStateMinimized;
+ }
+ else if (::IsWindowInStandardState(m_windowRef, nil, nil)) {
+ state = GHOST_kWindowStateMaximized;
+ }
+ else {
+ state = GHOST_kWindowStateNormal;
+ }
+ return state;
+}
+
+
+void GHOST_WindowCocoa::screenToClient(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const
+{
+ GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::screenToClient(): window invalid")
+ Point point;
+ point.h = inX;
+ point.v = inY;
+ GrafPtr oldPort;
+ ::GetPort(&oldPort);
+ ::SetPort(m_grafPtr);
+ ::GlobalToLocal(&point);
+ ::SetPort(oldPort);
+ outX = point.h;
+ outY = point.v;
+}
+
+
+void GHOST_WindowCocoa::clientToScreen(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const
+{
+ GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::clientToScreen(): window invalid")
+ Point point;
+ point.h = inX;
+ point.v = inY;
+ GrafPtr oldPort;
+ ::GetPort(&oldPort);
+ ::SetPort(m_grafPtr);
+ ::LocalToGlobal(&point);
+ ::SetPort(oldPort);
+ outX = point.h;
+ outY = point.v;
+}
+
+
+GHOST_TSuccess GHOST_WindowCocoa::setState(GHOST_TWindowState state)
+{
+ GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::setState(): window invalid")
+ switch (state) {
+ case GHOST_kWindowStateMinimized:
+ ::HideWindow(m_windowRef);
+ break;
+ case GHOST_kWindowStateMaximized:
+ case GHOST_kWindowStateNormal:
+ default:
+ ::ShowWindow(m_windowRef);
+ break;
+ }
+ return GHOST_kSuccess;
+}
+
+GHOST_TSuccess GHOST_WindowCocoa::setModifiedState(bool isUnsavedChanges)
+{
+ if (isUnsavedChanges) {
+ SetWindowModified(m_windowRef, 1);
+ } else {
+ SetWindowModified(m_windowRef, 0);
+ }
+
+ return GHOST_Window::setModifiedState(isUnsavedChanges);
+}
+
+
+
+GHOST_TSuccess GHOST_WindowCocoa::setOrder(GHOST_TWindowOrder order)
+{
+ GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::setOrder(): window invalid")
+ if (order == GHOST_kWindowOrderTop) {
+ //::BringToFront(m_windowRef); is wrong, front window should be active for input too
+ ::SelectWindow(m_windowRef);
+ }
+ else {
+ /* doesnt work if you do this with a mouseclick */
+ ::SendBehind(m_windowRef, nil);
+ }
+ return GHOST_kSuccess;
+}
+
+/*#define WAIT_FOR_VSYNC 1*/
+#ifdef WAIT_FOR_VSYNC
+#include <OpenGL/OpenGL.h>
+#endif
+
+GHOST_TSuccess GHOST_WindowCocoa::swapBuffers()
+{
+#ifdef WAIT_FOR_VSYNC
+/* wait for vsync, to avoid tearing artifacts */
+long VBL = 1;
+CGLSetParameter(CGLGetCurrentContext(), kCGLCPSwapInterval, &VBL);
+#endif
+
+ GHOST_TSuccess succeeded = GHOST_kSuccess;
+ if (m_drawingContextType == GHOST_kDrawingContextTypeOpenGL) {
+ if (m_aglCtx) {
+ ::aglSwapBuffers(m_aglCtx);
+ }
+ else {
+ succeeded = GHOST_kFailure;
+ }
+ }
+ return succeeded;
+}
+
+GHOST_TSuccess GHOST_WindowCocoa::updateDrawingContext()
+{
+ GHOST_TSuccess succeeded = GHOST_kSuccess;
+ if (m_drawingContextType == GHOST_kDrawingContextTypeOpenGL) {
+ if (m_aglCtx) {
+ ::aglUpdateContext(m_aglCtx);
+ }
+ else {
+ succeeded = GHOST_kFailure;
+ }
+ }
+ return succeeded;
+}
+
+GHOST_TSuccess GHOST_WindowCocoa::activateDrawingContext()
+{
+ GHOST_TSuccess succeeded = GHOST_kSuccess;
+ if (m_drawingContextType == GHOST_kDrawingContextTypeOpenGL) {
+ if (m_aglCtx) {
+ ::aglSetCurrentContext(m_aglCtx);
+#ifdef GHOST_DRAW_CARBON_GUTTER
+ // Restrict drawing to non-gutter area
+ ::aglEnable(m_aglCtx, AGL_BUFFER_RECT);
+ GHOST_Rect bnds;
+ getClientBounds(bnds);
+ GLint b[4] =
+ {
+ bnds.m_l,
+ bnds.m_t+s_sizeRectSize,
+ bnds.m_r-bnds.m_l,
+ bnds.m_b-bnds.m_t
+ };
+ GLboolean result = ::aglSetInteger(m_aglCtx, AGL_BUFFER_RECT, b);
+#endif //GHOST_DRAW_CARBON_GUTTER
+ }
+ else {
+ succeeded = GHOST_kFailure;
+ }
+ }
+ return succeeded;
+}
+
+
+GHOST_TSuccess GHOST_WindowCocoa::installDrawingContext(GHOST_TDrawingContextType type)
+{
+ GHOST_TSuccess success = GHOST_kFailure;
+ switch (type) {
+ case GHOST_kDrawingContextTypeOpenGL:
+ {
+ if (!getValid()) break;
+
+ AGLPixelFormat pixelFormat;
+ if (!m_fullScreen) {
+ pixelFormat = ::aglChoosePixelFormat(0, 0, sPreferredFormatWindow);
+ m_aglCtx = ::aglCreateContext(pixelFormat, s_firstaglCtx);
+ if (!m_aglCtx) break;
+ if (!s_firstaglCtx) s_firstaglCtx = m_aglCtx;
+ success = ::aglSetDrawable(m_aglCtx, m_grafPtr) == GL_TRUE ? GHOST_kSuccess : GHOST_kFailure;
+ }
+ else {
+ //GHOST_PRINT("GHOST_WindowCocoa::installDrawingContext(): init full-screen OpenGL\n");
+GDHandle device=::GetMainDevice();pixelFormat=::aglChoosePixelFormat(&device,1,sPreferredFormatFullScreen);
+ m_aglCtx = ::aglCreateContext(pixelFormat, 0);
+ if (!m_aglCtx) break;
+ if (!s_firstaglCtx) s_firstaglCtx = m_aglCtx;
+ //GHOST_PRINT("GHOST_WindowCocoa::installDrawingContext(): created OpenGL context\n");
+ //::CGGetActiveDisplayList(0, NULL, &m_numDisplays)
+ success = ::aglSetFullScreen(m_aglCtx, m_fullScreenWidth, m_fullScreenHeight, 75, 0) == GL_TRUE ? GHOST_kSuccess : GHOST_kFailure;
+ /*
+ if (success == GHOST_kSuccess) {
+ GHOST_PRINT("GHOST_WindowCocoa::installDrawingContext(): init full-screen OpenGL succeeded\n");
+ }
+ else {
+ GHOST_PRINT("GHOST_WindowCocoa::installDrawingContext(): init full-screen OpenGL failed\n");
+ }
+ */
+ }
+ ::aglDestroyPixelFormat(pixelFormat);
+ }
+ break;
+
+ case GHOST_kDrawingContextTypeNone:
+ success = GHOST_kSuccess;
+ break;
+
+ default:
+ break;
+ }
+ return success;
+}
+
+
+GHOST_TSuccess GHOST_WindowCocoa::removeDrawingContext()
+{
+ GHOST_TSuccess success = GHOST_kFailure;
+ switch (m_drawingContextType) {
+ case GHOST_kDrawingContextTypeOpenGL:
+ if (m_aglCtx) {
+ aglSetCurrentContext(NULL);
+ aglSetDrawable(m_aglCtx, NULL);
+ //aglDestroyContext(m_aglCtx);
+ if (s_firstaglCtx == m_aglCtx) s_firstaglCtx = NULL;
+ success = ::aglDestroyContext(m_aglCtx) == GL_TRUE ? GHOST_kSuccess : GHOST_kFailure;
+ m_aglCtx = 0;
+ }
+ break;
+ case GHOST_kDrawingContextTypeNone:
+ success = GHOST_kSuccess;
+ break;
+ default:
+ break;
+ }
+ return success;
+}
+
+
+GHOST_TSuccess GHOST_WindowCocoa::invalidate()
+{
+ GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::invalidate(): window invalid")
+ if (!m_fullScreen) {
+ Rect rect;
+ ::GetPortBounds(m_grafPtr, &rect);
+ ::InvalWindowRect(m_windowRef, &rect);
+ }
+ else {
+ //EventRef event;
+ //OSStatus status = ::CreateEvent(NULL, kEventClassWindow, kEventWindowUpdate, 0, 0, &event);
+ //GHOST_PRINT("GHOST_WindowCocoa::invalidate(): created event " << status << " \n");
+ //status = ::SetEventParameter(event, kEventParamDirectObject, typeWindowRef, sizeof(WindowRef), this);
+ //GHOST_PRINT("GHOST_WindowCocoa::invalidate(): set event parameter " << status << " \n");
+ //status = ::PostEventToQueue(::GetMainEventQueue(), event, kEventPriorityStandard);
+ //status = ::SendEventToEventTarget(event, ::GetApplicationEventTarget());
+ //GHOST_PRINT("GHOST_WindowCocoa::invalidate(): added event to queue " << status << " \n");
+ m_fullScreenDirty = true;
+ }
+ return GHOST_kSuccess;
+}
+
+
+void GHOST_WindowCocoa::gen2mac(const STR_String& in, Str255 out) const
+{
+ STR_String tempStr = in;
+ int num = tempStr.Length();
+ if (num > 255) num = 255;
+ ::memcpy(out+1, tempStr.Ptr(), num);
+ out[0] = num;
+}
+
+
+void GHOST_WindowCocoa::mac2gen(const Str255 in, STR_String& out) const
+{
+ char tmp[256];
+ ::memcpy(tmp, in+1, in[0]);
+ tmp[in[0]] = '\0';
+ out = tmp;
+}
+
+void GHOST_WindowCocoa::loadCursor(bool visible, GHOST_TStandardCursor cursor) const
+{
+ static bool systemCursorVisible = true;
+
+ if (visible != systemCursorVisible) {
+ if (visible) {
+ ::ShowCursor();
+ systemCursorVisible = true;
+ }
+ else {
+ ::HideCursor();
+ systemCursorVisible = false;
+ }
+ }
+
+ if (cursor == GHOST_kStandardCursorCustom && m_customCursor) {
+ ::SetCursor( m_customCursor );
+ } else {
+ int carbon_cursor;
+
+#define GCMAP(ghostCursor, carbonCursor) case ghostCursor: carbon_cursor = carbonCursor; break
+ switch (cursor) {
+ default:
+ GCMAP( GHOST_kStandardCursorDefault, kThemeArrowCursor);
+ GCMAP( GHOST_kStandardCursorRightArrow, kThemeAliasArrowCursor);
+ GCMAP( GHOST_kStandardCursorLeftArrow, kThemeArrowCursor);
+ GCMAP( GHOST_kStandardCursorInfo, kThemeArrowCursor);
+ GCMAP( GHOST_kStandardCursorDestroy, kThemeArrowCursor);
+ GCMAP( GHOST_kStandardCursorHelp, kThemeArrowCursor);
+ GCMAP( GHOST_kStandardCursorCycle, kThemeArrowCursor);
+ GCMAP( GHOST_kStandardCursorSpray, kThemeArrowCursor);
+ GCMAP( GHOST_kStandardCursorWait, kThemeWatchCursor);
+ GCMAP( GHOST_kStandardCursorText, kThemeIBeamCursor);
+ GCMAP( GHOST_kStandardCursorCrosshair, kThemeCrossCursor);
+ GCMAP( GHOST_kStandardCursorUpDown, kThemeClosedHandCursor);
+ GCMAP( GHOST_kStandardCursorLeftRight, kThemeClosedHandCursor);
+ GCMAP( GHOST_kStandardCursorTopSide, kThemeArrowCursor);
+ GCMAP( GHOST_kStandardCursorBottomSide, kThemeArrowCursor);
+ GCMAP( GHOST_kStandardCursorLeftSide, kThemeResizeLeftCursor);
+ GCMAP( GHOST_kStandardCursorRightSide, kThemeResizeRightCursor);
+ GCMAP( GHOST_kStandardCursorTopLeftCorner, kThemeArrowCursor);
+ GCMAP( GHOST_kStandardCursorTopRightCorner, kThemeArrowCursor);
+ GCMAP( GHOST_kStandardCursorBottomRightCorner, kThemeArrowCursor);
+ GCMAP( GHOST_kStandardCursorBottomLeftCorner, kThemeArrowCursor);
+ };
+#undef GCMAP
+
+ ::SetThemeCursor(carbon_cursor);
+ }
+}
+
+
+bool GHOST_WindowCocoa::getFullScreenDirty()
+{
+ return m_fullScreen && m_fullScreenDirty;
+}
+
+
+GHOST_TSuccess GHOST_WindowCocoa::setWindowCursorVisibility(bool visible)
+{
+ if (::FrontWindow() == m_windowRef) {
+ loadCursor(visible, getCursorShape());
+ }
+
+ return GHOST_kSuccess;
+}
+
+GHOST_TSuccess GHOST_WindowCocoa::setWindowCursorShape(GHOST_TStandardCursor shape)
+{
+ if (m_customCursor) {
+ delete m_customCursor;
+ m_customCursor = 0;
+ }
+
+ if (::FrontWindow() == m_windowRef) {
+ loadCursor(getCursorVisibility(), shape);
+ }
+
+ return GHOST_kSuccess;
+}
+
+#if 0
+/** Reverse the bits in a GHOST_TUns8 */
+static GHOST_TUns8 uns8ReverseBits(GHOST_TUns8 ch)
+{
+ ch= ((ch>>1)&0x55) | ((ch<<1)&0xAA);
+ ch= ((ch>>2)&0x33) | ((ch<<2)&0xCC);
+ ch= ((ch>>4)&0x0F) | ((ch<<4)&0xF0);
+ return ch;
+}
+#endif
+
+
+/** Reverse the bits in a GHOST_TUns16 */
+static GHOST_TUns16 uns16ReverseBits(GHOST_TUns16 shrt)
+{
+ shrt= ((shrt>>1)&0x5555) | ((shrt<<1)&0xAAAA);
+ shrt= ((shrt>>2)&0x3333) | ((shrt<<2)&0xCCCC);
+ shrt= ((shrt>>4)&0x0F0F) | ((shrt<<4)&0xF0F0);
+ shrt= ((shrt>>8)&0x00FF) | ((shrt<<8)&0xFF00);
+ return shrt;
+}
+
+GHOST_TSuccess GHOST_WindowCocoa::setWindowCustomCursorShape(GHOST_TUns8 *bitmap, GHOST_TUns8 *mask,
+ int sizex, int sizey, int hotX, int hotY, int fg_color, int bg_color)
+{
+ int y;
+
+ if (m_customCursor) {
+ delete m_customCursor;
+ m_customCursor = 0;
+ }
+
+ m_customCursor = new Cursor;
+ if (!m_customCursor) return GHOST_kFailure;
+
+ for (y=0; y<16; y++) {
+#if !defined(__LITTLE_ENDIAN__)
+ m_customCursor->data[y] = uns16ReverseBits((bitmap[2*y]<<0) | (bitmap[2*y+1]<<8));
+ m_customCursor->mask[y] = uns16ReverseBits((mask[2*y]<<0) | (mask[2*y+1]<<8));
+#else
+ m_customCursor->data[y] = uns16ReverseBits((bitmap[2*y+1]<<0) | (bitmap[2*y]<<8));
+ m_customCursor->mask[y] = uns16ReverseBits((mask[2*y+1]<<0) | (mask[2*y]<<8));
+#endif
+
+ }
+
+ m_customCursor->hotSpot.h = hotX;
+ m_customCursor->hotSpot.v = hotY;
+
+ if (::FrontWindow() == m_windowRef) {
+ loadCursor(getCursorVisibility(), GHOST_kStandardCursorCustom);
+ }
+
+ return GHOST_kSuccess;
+}
+
+GHOST_TSuccess GHOST_WindowCocoa::setWindowCustomCursorShape(GHOST_TUns8 bitmap[16][2],
+ GHOST_TUns8 mask[16][2], int hotX, int hotY)
+{
+ return setWindowCustomCursorShape((GHOST_TUns8*)bitmap, (GHOST_TUns8*) mask, 16, 16, hotX, hotY, 0, 1);
+}
+
+
+void GHOST_WindowCocoa::setMac_windowState(short value)
+{
+ mac_windowState = value;
+}
+
+short GHOST_WindowCocoa::getMac_windowState()
+{
+ return mac_windowState;
+}
diff --git a/intern/ghost/intern/GHOST_WindowManager.cpp b/intern/ghost/intern/GHOST_WindowManager.cpp
index af96653db13..15ee41e3dce 100644
--- a/intern/ghost/intern/GHOST_WindowManager.cpp
+++ b/intern/ghost/intern/GHOST_WindowManager.cpp
@@ -187,10 +187,21 @@ void GHOST_WindowManager::setWindowInactive(const GHOST_IWindow* window)
}
- std::vector<GHOST_IWindow *> &
-GHOST_WindowManager::
-getWindows(
-){
+std::vector<GHOST_IWindow *> &GHOST_WindowManager::getWindows()
+{
return m_windows;
}
+
+bool GHOST_WindowManager::getAnyModifiedState()
+{
+ bool isAnyModified = false;
+ std::vector<GHOST_IWindow*>::iterator iter;
+
+ for (iter = m_windows.begin(); iter != m_windows.end(); iter++) {
+ if ((*iter)->getModifiedState())
+ isAnyModified = true;
+ }
+
+ return isAnyModified;
+} \ No newline at end of file
diff --git a/intern/ghost/intern/GHOST_WindowManager.h b/intern/ghost/intern/GHOST_WindowManager.h
index 46e80d2c603..3690ad41e2c 100644
--- a/intern/ghost/intern/GHOST_WindowManager.h
+++ b/intern/ghost/intern/GHOST_WindowManager.h
@@ -133,11 +133,13 @@ public:
* this vector. Please do not destroy or add windows use the
* interface above for this,
*/
+ std::vector<GHOST_IWindow *> & getWindows();
- std::vector<GHOST_IWindow *> &
- getWindows(
- );
-
+ /**
+ * Return true if any windows has a modified status
+ * @return True if any window has unsaved changes
+ */
+ bool getAnyModifiedState();
protected:
/** The list of windows managed */
diff --git a/intern/guardedalloc/intern/mallocn.c b/intern/guardedalloc/intern/mallocn.c
index 3b5f6a0caf9..ca7f2a4d506 100644
--- a/intern/guardedalloc/intern/mallocn.c
+++ b/intern/guardedalloc/intern/mallocn.c
@@ -688,17 +688,35 @@ static const char *check_memlist(MemHead *memh)
uintptr_t MEM_get_memory_in_use(void)
{
- return mem_in_use;
+ uintptr_t _mem_in_use;
+
+ mem_lock_thread();
+ _mem_in_use= mem_in_use;
+ mem_unlock_thread();
+
+ return _mem_in_use;
}
uintptr_t MEM_get_mapped_memory_in_use(void)
{
- return mmap_in_use;
+ uintptr_t _mmap_in_use;
+
+ mem_lock_thread();
+ _mmap_in_use= mmap_in_use;
+ mem_unlock_thread();
+
+ return _mmap_in_use;
}
int MEM_get_memory_blocks_in_use(void)
{
- return totblock;
+ int _totblock;
+
+ mem_lock_thread();
+ _totblock= totblock;
+ mem_unlock_thread();
+
+ return _totblock;
}
/* eof */
diff --git a/intern/smoke/intern/FLUID_3D.cpp b/intern/smoke/intern/FLUID_3D.cpp
index 8a32eaa2e68..bb2227801c7 100644
--- a/intern/smoke/intern/FLUID_3D.cpp
+++ b/intern/smoke/intern/FLUID_3D.cpp
@@ -399,16 +399,12 @@ void FLUID_3D::project()
for (y = 1; y < _yRes - 1; y++, index += 2)
for (x = 1; x < _xRes - 1; x++, index++)
{
- // if(!_obstacles[index])
+ if(!_obstacles[index])
{
_xVelocity[index] -= 0.5f * (_pressure[index + 1] - _pressure[index - 1]) * invDx;
_yVelocity[index] -= 0.5f * (_pressure[index + _xRes] - _pressure[index - _xRes]) * invDx;
_zVelocity[index] -= 0.5f * (_pressure[index + _slabSize] - _pressure[index - _slabSize]) * invDx;
- }/*
- else
- {
- _xVelocity[index] = _yVelocity[index] = _zVelocity[index] = 0.0f;
- }*/
+ }
}
if (_pressure) delete[] _pressure;
@@ -497,23 +493,15 @@ void FLUID_3D::setObstaclePressure(float *_pressure)
if (top && !bottom) {
_pressure[index] += _pressure[index - _slabSize];
pcnt += 1.;
- // _zVelocity[index] += - _zVelocity[index - _slabSize];
- // vp += 1.0;
}
if (!top && bottom) {
_pressure[index] += _pressure[index + _slabSize];
pcnt += 1.;
- // _zVelocity[index] += - _zVelocity[index + _slabSize];
- // vp += 1.0;
}
if(pcnt > 0.000001f)
_pressure[index] /= pcnt;
- // test - dg
- // if(vp > 0.000001f)
- // _zVelocity[index] /= vp;
-
// TODO? set correct velocity bc's
// velocities are only set to zero right now
// this means it's not a full no-slip boundary condition
diff --git a/intern/smoke/intern/FLUID_3D_STATIC.cpp b/intern/smoke/intern/FLUID_3D_STATIC.cpp
index 0215dfc417f..afeca2b1faa 100644
--- a/intern/smoke/intern/FLUID_3D_STATIC.cpp
+++ b/intern/smoke/intern/FLUID_3D_STATIC.cpp
@@ -296,7 +296,7 @@ void FLUID_3D::advectFieldSemiLagrange(const float dt, const float* velx, const
const int slabSize = res[0] * res[1];
// scale dt up to grid resolution
-#if PARALLEL==1
+#if PARALLEL==1 && !_WIN32
#pragma omp parallel
#pragma omp for schedule(static)
#endif
diff --git a/intern/smoke/intern/WTURBULENCE.cpp b/intern/smoke/intern/WTURBULENCE.cpp
index bcfc61856af..7ea4bde3884 100644
--- a/intern/smoke/intern/WTURBULENCE.cpp
+++ b/intern/smoke/intern/WTURBULENCE.cpp
@@ -735,19 +735,17 @@ void WTURBULENCE::stepTurbulenceFull(float dtOrg, float* xvel, float* yvel, floa
// enlarge timestep to match grid
const float dt = dtOrg * _amplify;
const float invAmp = 1.0f / _amplify;
- float *tempBig1 = new float[_totalCellsBig];
- float *tempBig2 = new float[_totalCellsBig];
- float *bigUx = new float[_totalCellsBig];
- float *bigUy = new float[_totalCellsBig];
- float *bigUz = new float[_totalCellsBig];
- float *_energy = new float[_totalCellsSm];
- float *highFreqEnergy = new float[_totalCellsSm];
- float *eigMin = new float[_totalCellsSm];
- float *eigMax = new float[_totalCellsSm];
-
- memset(highFreqEnergy, 0, sizeof(float)*_totalCellsSm);
- memset(eigMin, 0, sizeof(float)*_totalCellsSm);
- memset(eigMax, 0, sizeof(float)*_totalCellsSm);
+ float *tempBig1 = (float *)calloc(_totalCellsBig, sizeof(float));
+ float *tempBig2 = (float *)calloc(_totalCellsBig, sizeof(float));
+ float *bigUx = (float *)calloc(_totalCellsBig, sizeof(float));
+ float *bigUy = (float *)calloc(_totalCellsBig, sizeof(float));
+ float *bigUz = (float *)calloc(_totalCellsBig, sizeof(float));
+ float *_energy = (float *)calloc(_totalCellsSm, sizeof(float));
+ float *highFreqEnergy = (float *)calloc(_totalCellsSm, sizeof(float));
+ float *eigMin = (float *)calloc(_totalCellsSm, sizeof(float));
+ float *eigMax = (float *)calloc(_totalCellsSm, sizeof(float));
+
+ memset(_tcTemp, 0, sizeof(float)*_totalCellsSm);
// prepare textures
advectTextureCoordinates(dtOrg, xvel,yvel,zvel, tempBig1, tempBig2);
@@ -771,16 +769,16 @@ void WTURBULENCE::stepTurbulenceFull(float dtOrg, float* xvel, float* yvel, floa
// parallel region setup
float maxVelMagThreads[8] = { -1., -1., -1., -1., -1., -1., -1., -1. };
-#if PARALLEL==1
+#if PARALLEL==1 && !_WIN32
#pragma omp parallel
#endif
{ float maxVelMag1 = 0.;
-#if PARALLEL==1
+#if PARALLEL==1 && !_WIN32
const int id = omp_get_thread_num(); /*, num = omp_get_num_threads(); */
#endif
// vector noise main loop
-#if PARALLEL==1
+#if PARALLEL==1 && !_WIN32
#pragma omp for schedule(static)
#endif
for (int zSmall = 0; zSmall < _zResSm; zSmall++)
@@ -912,7 +910,7 @@ void WTURBULENCE::stepTurbulenceFull(float dtOrg, float* xvel, float* yvel, floa
bigUx[index] = bigUy[index] = bigUz[index] = 0.;
} // xyz
-#if PARALLEL==1
+#if PARALLEL==1 && !_WIN32
maxVelMagThreads[id] = maxVelMag1;
#else
maxVelMagThreads[0] = maxVelMag1;
@@ -922,7 +920,7 @@ void WTURBULENCE::stepTurbulenceFull(float dtOrg, float* xvel, float* yvel, floa
// compute maximum over threads
float maxVelMag = maxVelMagThreads[0];
-#if PARALLEL==1
+#if PARALLEL==1 && !_WIN32
for (int i = 1; i < 8; i++)
if (maxVelMag < maxVelMagThreads[i])
maxVelMag = maxVelMagThreads[i];
@@ -957,13 +955,13 @@ void WTURBULENCE::stepTurbulenceFull(float dtOrg, float* xvel, float* yvel, floa
SWAP_POINTERS(_densityBig, _densityBigOld);
} // substep
- delete[] tempBig1;
- delete[] tempBig2;
- delete[] bigUx;
- delete[] bigUy;
- delete[] bigUz;
- delete[] _energy;
- delete[] highFreqEnergy;
+ free(tempBig1);
+ free(tempBig2);
+ free(bigUx);
+ free(bigUy);
+ free(bigUz);
+ free(_energy);
+ free(highFreqEnergy);
// wipe the density borders
FLUID_3D::setZeroBorder(_densityBig, _resBig);
@@ -973,8 +971,8 @@ void WTURBULENCE::stepTurbulenceFull(float dtOrg, float* xvel, float* yvel, floa
// eigenvalues stored do not reflect the underlying texture coordinates
resetTextureCoordinates(eigMin, eigMax);
- delete[] eigMin;
- delete[] eigMax;
+ free(eigMin);
+ free(eigMax);
// output files
// string prefix = string("./amplified.preview/density_bigxy_");
diff --git a/projectfiles_vc9/blender/blenpluginapi/blenpluginapi/blenpluginapi.vcproj b/projectfiles_vc9/blender/blenpluginapi/blenpluginapi/blenpluginapi.vcproj
index 26493699f5d..c8e8dffbb24 100644
--- a/projectfiles_vc9/blender/blenpluginapi/blenpluginapi/blenpluginapi.vcproj
+++ b/projectfiles_vc9/blender/blenpluginapi/blenpluginapi/blenpluginapi.vcproj
@@ -43,7 +43,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\source\blender;..\..\..\..\source\blender\blenlib;..\..\..\..\source\blender\imbuf;..\..\..\..\source\blender\makesdna;..\..\..\..\source\blender\blenpluginapi"
+ AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\lib\windows\pthreads\include;..\..\..\..\source\blender;..\..\..\..\source\blender\blenlib;..\..\..\..\source\blender\imbuf;..\..\..\..\source\blender\makesdna;..\..\..\..\source\blender\blenpluginapi"
PreprocessorDefinitions="WIN32,_DEBUG,_LIB"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -118,7 +118,7 @@
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\source\blender;..\..\..\..\source\blender\blenlib;..\..\..\..\source\blender\imbuf;..\..\..\..\source\blender\makesdna;..\..\..\..\source\blender\blenpluginapi"
+ AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\lib\windows\pthreads\include;..\..\..\..\source\blender;..\..\..\..\source\blender\blenlib;..\..\..\..\source\blender\imbuf;..\..\..\..\source\blender\makesdna;..\..\..\..\source\blender\blenpluginapi"
PreprocessorDefinitions="WIN32,NDEBUG,_LIB"
StringPooling="true"
RuntimeLibrary="0"
@@ -193,7 +193,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\source\blender;..\..\..\..\source\blender\blenlib;..\..\..\..\source\blender\imbuf;..\..\..\..\source\blender\makesdna;..\..\..\..\source\blender\blenpluginapi"
+ AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\lib\windows\pthreads\include;..\..\..\..\source\blender;..\..\..\..\source\blender\blenlib;..\..\..\..\source\blender\imbuf;..\..\..\..\source\blender\makesdna;..\..\..\..\source\blender\blenpluginapi"
PreprocessorDefinitions="WIN32,NDEBUG,_LIB"
StringPooling="true"
RuntimeLibrary="2"
@@ -268,7 +268,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\source\blender;..\..\..\..\source\blender\blenlib;..\..\..\..\source\blender\imbuf;..\..\..\..\source\blender\makesdna;..\..\..\..\source\blender\blenpluginapi"
+ AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\lib\windows\pthreads\include;..\..\..\..\source\blender;..\..\..\..\source\blender\blenlib;..\..\..\..\source\blender\imbuf;..\..\..\..\source\blender\makesdna;..\..\..\..\source\blender\blenpluginapi"
PreprocessorDefinitions="WIN32,_DEBUG,_LIB"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -342,7 +342,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\source\blender;..\..\..\..\source\blender\blenlib;..\..\..\..\source\blender\imbuf;..\..\..\..\source\blender\makesdna;..\..\..\..\source\blender\blenpluginapi"
+ AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\lib\windows\pthreads\include;..\..\..\..\source\blender;..\..\..\..\source\blender\blenlib;..\..\..\..\source\blender\imbuf;..\..\..\..\source\blender\makesdna;..\..\..\..\source\blender\blenpluginapi"
PreprocessorDefinitions="WIN32,NDEBUG,_LIB"
StringPooling="true"
RuntimeLibrary="0"
@@ -417,7 +417,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\source\blender;..\..\..\..\source\blender\blenlib;..\..\..\..\source\blender\imbuf;..\..\..\..\source\blender\makesdna;..\..\..\..\source\blender\blenpluginapi"
+ AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\lib\windows\pthreads\include;..\..\..\..\source\blender;..\..\..\..\source\blender\blenlib;..\..\..\..\source\blender\imbuf;..\..\..\..\source\blender\makesdna;..\..\..\..\source\blender\blenpluginapi"
PreprocessorDefinitions="WIN32,_DEBUG,_LIB"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
diff --git a/projectfiles_vc9/blender/editors/ED_editors.vcproj b/projectfiles_vc9/blender/editors/ED_editors.vcproj
index 3d7a12435a3..c49e817196e 100644
--- a/projectfiles_vc9/blender/editors/ED_editors.vcproj
+++ b/projectfiles_vc9/blender/editors/ED_editors.vcproj
@@ -271,7 +271,7 @@
>
</File>
<File
- RelativePath="..\..\..\source\blender\editors\include\ED_previewrender.h"
+ RelativePath="..\..\..\source\blender\editors\include\ED_render.h"
>
</File>
<File
@@ -1220,11 +1220,11 @@
>
</File>
<File
- RelativePath="..\..\..\source\blender\editors\mesh\mesh_intern.h"
+ RelativePath="..\..\..\source\blender\editors\mesh\mesh_data.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\editors\mesh\mesh_layers.c"
+ RelativePath="..\..\..\source\blender\editors\mesh\mesh_intern.h"
>
</File>
<File
@@ -1421,38 +1421,34 @@
</File>
</Filter>
<Filter
- Name="preview"
+ Name="physics"
>
<File
- RelativePath="..\..\..\source\blender\editors\preview\previewrender.c"
+ RelativePath="..\..\..\source\blender\editors\physics\particle_boids.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\editors\preview\previewrender_intern.h"
+ RelativePath="..\..\..\source\blender\editors\physics\particle_edit.c"
>
</File>
- </Filter>
- <Filter
- Name="physics"
- >
<File
- RelativePath="..\..\..\source\blender\editors\physics\ed_fluidsim.c"
+ RelativePath="..\..\..\source\blender\editors\physics\particle_object.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\editors\physics\ed_pointcache.c"
+ RelativePath="..\..\..\source\blender\editors\physics\physics_fluid.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\editors\physics\editparticle.c"
+ RelativePath="..\..\..\source\blender\editors\physics\physics_intern.h"
>
</File>
<File
- RelativePath="..\..\..\source\blender\editors\physics\physics_boids.c"
+ RelativePath="..\..\..\source\blender\editors\physics\physics_ops.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\editors\physics\physics_intern.h"
+ RelativePath="..\..\..\source\blender\editors\physics\physics_pointcache.c"
>
</File>
</Filter>
@@ -1548,6 +1544,26 @@
>
</File>
</Filter>
+ <Filter
+ Name="render"
+ >
+ <File
+ RelativePath="..\..\..\source\blender\editors\render\render_intern.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\source\blender\editors\render\render_ops.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\source\blender\editors\render\render_preview.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\source\blender\editors\render\render_shading.c"
+ >
+ </File>
+ </Filter>
</Files>
<Globals>
</Globals>
diff --git a/projectfiles_vc9/blender/makesrna/RNA_rna.vcproj b/projectfiles_vc9/blender/makesrna/RNA_rna.vcproj
index b52cf929fc3..66449b01f81 100644
--- a/projectfiles_vc9/blender/makesrna/RNA_rna.vcproj
+++ b/projectfiles_vc9/blender/makesrna/RNA_rna.vcproj
@@ -43,7 +43,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\ikplugin;..\..\..\source\blender\windowmanager;..\..\..\source\blender\editors\include;..\..\..\source\blender\render\extern\include"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\lib\windows\pthreads\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\ikplugin;..\..\..\source\blender\windowmanager;..\..\..\source\blender\editors\include;..\..\..\source\blender\render\extern\include"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
@@ -114,7 +114,7 @@
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\ikplugin;..\..\..\source\blender\windowmanager;..\..\..\source\blender\editors\include;..\..\..\source\blender\render\extern\include"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\lib\windows\pthreads\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\ikplugin;..\..\..\source\blender\windowmanager;..\..\..\source\blender\editors\include;..\..\..\source\blender\render\extern\include"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS"
MinimalRebuild="true"
RuntimeLibrary="0"
diff --git a/projectfiles_vc9/blender/nodes/nodes.vcproj b/projectfiles_vc9/blender/nodes/nodes.vcproj
index 4b6f90b6cd6..e9cb51b5cff 100644
--- a/projectfiles_vc9/blender/nodes/nodes.vcproj
+++ b/projectfiles_vc9/blender/nodes/nodes.vcproj
@@ -42,7 +42,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\source\blender\makesrna"
+ AdditionalIncludeDirectories="..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\zlib\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\source\blender\makesrna"
PreprocessorDefinitions="_DEBUG;WIN32;_LIB"
MinimalRebuild="false"
BasicRuntimeChecks="3"
@@ -112,7 +112,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\source\blender\makesrna"
+ AdditionalIncludeDirectories="..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\zlib\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\source\blender\makesrna"
PreprocessorDefinitions="_DEBUG;WIN32;_LIB"
BasicRuntimeChecks="0"
RuntimeLibrary="0"
@@ -182,7 +182,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\source\blender\makesrna"
+ AdditionalIncludeDirectories="..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\zlib\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\source\blender\makesrna"
PreprocessorDefinitions="_DEBUG;WIN32;_LIB;WITH_OPENEXR"
MinimalRebuild="false"
BasicRuntimeChecks="3"
@@ -253,7 +253,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="2"
- AdditionalIncludeDirectories="..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\source\blender\makesrna"
+ AdditionalIncludeDirectories="..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\zlib\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\source\blender\makesrna"
PreprocessorDefinitions="NDEBUG;WIN32;_LIB;WITH_OPENEXR"
BasicRuntimeChecks="0"
RuntimeLibrary="0"
diff --git a/projectfiles_vc9/blender/render/BRE_render.vcproj b/projectfiles_vc9/blender/render/BRE_render.vcproj
index 6349226363d..4b223ddcdc3 100644
--- a/projectfiles_vc9/blender/render/BRE_render.vcproj
+++ b/projectfiles_vc9/blender/render/BRE_render.vcproj
@@ -44,7 +44,7 @@
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\lib\windows\sdl\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\misc;..\..\..\source\blender\imbuf;..\..\..\source\blender\yafray;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\python;..\..\..\source\blender\blenkernel;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenloader;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\blender\render\intern\include;..\..\..\source\blender\render\extern\include;..\..\..\source\kernel;..\..\..\source\kernel\gen_messaging"
+ AdditionalIncludeDirectories="..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\pthreads\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\misc;..\..\..\source\blender\imbuf;..\..\..\source\blender\yafray;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\python;..\..\..\source\blender\blenkernel;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenloader;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\blender\render\intern\include;..\..\..\source\blender\render\extern\include;..\..\..\source\kernel;..\..\..\source\kernel\gen_messaging"
PreprocessorDefinitions="NDEBUG;WIN32;_LIB;WITH_QUICKTIME;WITH_OPENEXR"
StringPooling="true"
RuntimeLibrary="0"
@@ -119,7 +119,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\lib\windows\sdl\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\misc;..\..\..\source\blender\imbuf;..\..\..\source\blender\yafray;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\python;..\..\..\source\blender\blenkernel;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenloader;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\blender\render\intern\include;..\..\..\source\blender\render\extern\include;..\..\..\source\kernel;..\..\..\source\kernel\gen_messaging"
+ AdditionalIncludeDirectories="..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\pthreads\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\misc;..\..\..\source\blender\imbuf;..\..\..\source\blender\yafray;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\python;..\..\..\source\blender\blenkernel;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenloader;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\blender\render\intern\include;..\..\..\source\blender\render\extern\include;..\..\..\source\kernel;..\..\..\source\kernel\gen_messaging"
PreprocessorDefinitions="_DEBUG;WIN32;_LIB;WITH_QUICKTIME;WITH_OPENEXR;_USE_MATH_DEFINES"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
diff --git a/projectfiles_vc9/blender/windowmanager/windowmanager.vcproj b/projectfiles_vc9/blender/windowmanager/windowmanager.vcproj
index a074f66327d..805ad1f1cf3 100644
--- a/projectfiles_vc9/blender/windowmanager/windowmanager.vcproj
+++ b/projectfiles_vc9/blender/windowmanager/windowmanager.vcproj
@@ -43,7 +43,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\ghost\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\imbuf;..\..\..\source\blender\python;..\..\..\source\blender\blenkernel;..\..\..\source\blender\blenfont;..\..\..\source\blender\blenloader;..\..\..\source\blender\gpu;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\kernel\gen_system;..\..\..\source\kernel\gen_messaging;..\..\..\source\blender\windowmanager;..\..\..\source\blender\editors\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\radiosity\extern\include"
+ AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\ghost\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\imbuf;..\..\..\source\blender\python;..\..\..\source\blender\blenkernel;..\..\..\source\blender\blenfont;..\..\..\source\blender\blenloader;..\..\..\source\blender\gpu;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\kernel\gen_system;..\..\..\source\kernel\gen_messaging;..\..\..\source\blender\windowmanager;..\..\..\source\blender\editors\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\radiosity\extern\include"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
@@ -113,7 +113,7 @@
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\ghost\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\imbuf;..\..\..\source\blender\python;..\..\..\source\blender\blenkernel;..\..\..\source\blender\blenfont;..\..\..\source\blender\blenloader;..\..\..\source\blender\gpu;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\kernel\gen_system;..\..\..\source\kernel\gen_messaging;..\..\..\source\blender\windowmanager;..\..\..\source\blender\editors\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\radiosity\extern\include"
+ AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\ghost\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\imbuf;..\..\..\source\blender\python;..\..\..\source\blender\blenkernel;..\..\..\source\blender\blenfont;..\..\..\source\blender\blenloader;..\..\..\source\blender\gpu;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\kernel\gen_system;..\..\..\source\kernel\gen_messaging;..\..\..\source\blender\windowmanager;..\..\..\source\blender\editors\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\radiosity\extern\include"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS"
MinimalRebuild="true"
RuntimeLibrary="0"
diff --git a/release/scripts/io/export_3ds.py b/release/scripts/io/export_3ds.py
index 19c12146769..2c1999c3d45 100644
--- a/release/scripts/io/export_3ds.py
+++ b/release/scripts/io/export_3ds.py
@@ -559,14 +559,15 @@ def extract_triangles(mesh):
uf = mesh.active_uv_texture.data[i] if do_uv else None
if do_uv:
- f_uv = (uf.uv1, uf.uv2, uf.uv3, uf.uv4) if face.verts[3] else (uf.uv1, uf.uv2, uf.uv3)
+ f_uv = uf.uv
+ # f_uv = (uf.uv1, uf.uv2, uf.uv3, uf.uv4) if face.verts[3] else (uf.uv1, uf.uv2, uf.uv3)
# f_uv = face.uv
img = uf.image if uf else None
# img = face.image
if img: img = img.name
-
- if f_v[3] == 0:
- # if len(f_v)==3:
+
+ # if f_v[3] == 0:
+ if len(f_v)==3:
new_tri = tri_wrapper((f_v[0], f_v[1], f_v[2]), face.material_index, img)
# new_tri = tri_wrapper((f_v[0].index, f_v[1].index, f_v[2].index), face.mat, img)
if (do_uv): new_tri.faceuvs= uv_key(f_uv[0]), uv_key(f_uv[1]), uv_key(f_uv[2])
@@ -916,11 +917,11 @@ def save_3ds(filename, context):
if not filename.lower().endswith('.3ds'):
filename += '.3ds'
-
+
# XXX
# if not BPyMessages.Warning_SaveOver(filename):
# return
-
+
# XXX
time1 = time.clock()
# time1= Blender.sys.time()
@@ -992,7 +993,7 @@ def save_3ds(filename, context):
if mat: mat_name = mat.name
else: mat_name = None
# else there alredy set to none
-
+
img = uf.image
# img = f.image
if img: img_name = img.name
@@ -1016,7 +1017,7 @@ def save_3ds(filename, context):
if free:
free_derived_objects(ob)
-
+
# Make material chunks for all materials used in the meshes:
for mat_and_image in materialDict.values():
object_info.add_subchunk(make_material_chunk(mat_and_image[0], mat_and_image[1]))
@@ -1109,11 +1110,12 @@ class EXPORT_OT_3ds(bpy.types.Operator):
# to the class instance from the operator settings before calling.
__props__ = [
- bpy.props.StringProperty(attr="filename", name="File Name", description="File name used for exporting the 3DS file", maxlen= 1024, default= ""),
+ # bpy.props.StringProperty(attr="filename", name="File Name", description="File name used for exporting the 3DS file", maxlen= 1024, default= ""),
+ bpy.props.StringProperty(attr="path", name="File Path", description="File path used for exporting the 3DS file", maxlen= 1024, default= ""),
]
def execute(self, context):
- save_3ds(self.filename, context)
+ save_3ds(self.path, context)
return ('FINISHED',)
def invoke(self, context, event):
diff --git a/release/scripts/io/export_fbx.py b/release/scripts/io/export_fbx.py
index aa65473b8d6..21b1388ebfe 100644
--- a/release/scripts/io/export_fbx.py
+++ b/release/scripts/io/export_fbx.py
@@ -1211,13 +1211,13 @@ def write(filename, batch_objects = None, \
mat_colamb = world_amb
# mat_colamb = tuple([c for c in world_amb])
- mat_dif = mat.diffuse_reflection
+ mat_dif = mat.diffuse_intensity
# mat_dif = mat.ref
mat_amb = mat.ambient
# mat_amb = mat.amb
mat_hard = (float(mat.specular_hardness)-1)/5.10
# mat_hard = (float(mat.hard)-1)/5.10
- mat_spec = mat.specular_reflection/2.0
+ mat_spec = mat.specular_intensity/2.0
# mat_spec = mat.spec/2.0
mat_alpha = mat.alpha
mat_emit = mat.emit
@@ -1528,7 +1528,8 @@ def write(filename, batch_objects = None, \
file.write('\n\t\tPolygonVertexIndex: ')
i=-1
for f in me.faces:
- fi = [v_index for j, v_index in enumerate(f.verts) if v_index != 0 or j != 3]
+ fi = f.verts
+ # fi = [v_index for j, v_index in enumerate(f.verts) if v_index != 0 or j != 3]
# fi = [v.index for v in f]
# flip the last index, odd but it looks like
@@ -1637,10 +1638,7 @@ def write(filename, batch_objects = None, \
# returns a slice of data depending on number of face verts
# data is either a MeshTextureFace or MeshColor
def face_data(data, face):
- if f.verts[3] == 0:
- totvert = 3
- else:
- totvert = 4
+ totvert = len(f.verts)
return data[:totvert]
@@ -1740,12 +1738,9 @@ def write(filename, batch_objects = None, \
i = -1
ii = 0 # Count how many UVs we write
- for f, uf in zip(me.faces, uvlayer.data):
+ for uf in uvlayer.data:
# for f in me.faces:
- uvs = [uf.uv1, uf.uv2, uf.uv3, uf.uv4]
- uvs = face_data(uvs, f)
-
- for uv in uvs:
+ for uv in uf.uv:
# for uv in f.uv:
if i==-1:
file.write('%.6f,%.6f' % tuple(uv))
@@ -3356,7 +3351,8 @@ class EXPORT_OT_fbx(bpy.types.Operator):
# to the class instance from the operator settings before calling.
__props__ = [
- bpy.props.StringProperty(attr="filename", name="File Name", description="File name used for exporting the PLY file", maxlen= 1024, default=""),
+ bpy.props.StringProperty(attr="path", name="File Path", description="File path used for exporting the FBX file", maxlen= 1024, default= ""),
+
bpy.props.BoolProperty(attr="EXP_OBS_SELECTED", name="Selected Objects", description="Export selected objects on visible layers", default=True),
# bpy.props.BoolProperty(attr="EXP_OBS_SCENE", name="Scene Objects", description="Export all objects in this scene", default=True),
bpy.props.FloatProperty(attr="_SCALE", name="Scale", description="Scale all data, (Note! some imports dont support scaled armatures)", min=0.01, max=1000.0, soft_min=0.01, soft_max=1000.0, default=1.0),
@@ -3389,8 +3385,8 @@ class EXPORT_OT_fbx(bpy.types.Operator):
return context.active_object != None
def execute(self, context):
- if not self.filename:
- raise Exception("filename not set")
+ if not self.path:
+ raise Exception("path not set")
GLOBAL_MATRIX = mtx4_identity
GLOBAL_MATRIX[0][0] = GLOBAL_MATRIX[1][1] = GLOBAL_MATRIX[2][2] = self._SCALE
@@ -3398,7 +3394,7 @@ class EXPORT_OT_fbx(bpy.types.Operator):
if self._YROT90: GLOBAL_MATRIX = GLOBAL_MATRIX * mtx4_y90n
if self._ZROT90: GLOBAL_MATRIX = GLOBAL_MATRIX * mtx4_z90n
- write(self.filename,
+ write(self.path,
None, # XXX
context,
self.EXP_OBS_SELECTED,
diff --git a/release/scripts/io/export_obj.py b/release/scripts/io/export_obj.py
index e2ac78798bd..83b400816e3 100644
--- a/release/scripts/io/export_obj.py
+++ b/release/scripts/io/export_obj.py
@@ -153,7 +153,7 @@ def write_mtl(scene, filename, copy_images):
elif mat: # No face image. if we havea material search for MTex image.
for mtex in mat.textures:
- if mtex and mtex.texure.type == 'IMAGE':
+ if mtex and mtex.texture.type == 'IMAGE':
try:
filename = copy_image(mtex.texture.image)
# filename = mtex.texture.image.filename.split('\\')[-1].split('/')[-1]
@@ -330,7 +330,8 @@ def write(filename, objects, scene,
return round(v.x, 6), round(v.y, 6), round(v.z, 6)
def veckey2d(v):
- return round(v.x, 6), round(v.y, 6)
+ return round(v[0], 6), round(v[1], 6)
+ # return round(v.x, 6), round(v.y, 6)
def findVertexGroupName(face, vWeightMap):
"""
@@ -376,7 +377,7 @@ def write(filename, objects, scene,
# scn = Scene.GetCurrent()
file = open(filename, "w")
-
+
# Write Header
version = "2.5"
file.write('# Blender3D v%s OBJ File: %s\n' % (version, bpy.data.filename.split('/')[-1].split('\\')[-1] ))
@@ -593,11 +594,12 @@ def write(filename, objects, scene,
tface = uv_layer.data[f_index]
- uvs = [tface.uv1, tface.uv2, tface.uv3]
+ uvs = tface.uv
+ # uvs = [tface.uv1, tface.uv2, tface.uv3]
- # add another UV if it's a quad
- if f.verts[3] != 0:
- uvs.append(tface.uv4)
+ # # add another UV if it's a quad
+ # if len(f.verts) == 4:
+ # uvs.append(tface.uv4)
for uv_index, uv in enumerate(uvs):
uvkey = veckey2d(uv)
@@ -661,8 +663,8 @@ def write(filename, objects, scene,
for f_index, f in enumerate(faces):
f_v = [{"index": index, "vertex": me.verts[index]} for index in f.verts]
- if f.verts[3] == 0:
- f_v.pop()
+ # if f.verts[3] == 0:
+ # f_v.pop()
# f_v= f.v
f_smooth= f.smooth
@@ -673,9 +675,10 @@ def write(filename, objects, scene,
tface = me.active_uv_texture.data[face_index_pairs[f_index][1]]
f_image = tface.image
- f_uv= [tface.uv1, tface.uv2, tface.uv3]
- if f.verts[3] != 0:
- f_uv.append(tface.uv4)
+ f_uv = tface.uv
+ # f_uv= [tface.uv1, tface.uv2, tface.uv3]
+ # if len(f.verts) == 4:
+ # f_uv.append(tface.uv4)
# f_image = f.image
# f_uv= f.uv
@@ -918,7 +921,7 @@ class EXPORT_OT_obj(bpy.types.Operator):
# to the class instance from the operator settings before calling.
__props__ = [
- bpy.props.StringProperty(attr="filename", name="File Name", description="File name used for exporting the OBJ file", maxlen= 1024, default= ""),
+ bpy.props.StringProperty(attr="path", name="File Path", description="File path used for exporting the OBJ file", maxlen= 1024, default= ""),
# context group
bpy.props.BoolProperty(attr="use_selection", name="Selection Only", description="", default= False),
@@ -949,7 +952,7 @@ class EXPORT_OT_obj(bpy.types.Operator):
def execute(self, context):
- do_export(self.filename, context,
+ do_export(self.path, context,
EXPORT_TRI=self.use_triangles,
EXPORT_EDGES=self.use_edges,
EXPORT_NORMALS=self.use_normals,
diff --git a/release/scripts/io/export_x3d.py b/release/scripts/io/export_x3d.py
index f23ccf8d2dc..db29afc7d6d 100644
--- a/release/scripts/io/export_x3d.py
+++ b/release/scripts/io/export_x3d.py
@@ -604,7 +604,8 @@ class x3d_class:
for face in mesh.active_uv_texture.data:
# for face in mesh.faces:
- uvs = [face.uv1, face.uv2, face.uv3, face.uv4] if face.verts[3] else [face.uv1, face.uv2, face.uv3]
+ uvs = face.uv
+ # uvs = [face.uv1, face.uv2, face.uv3, face.uv4] if face.verts[3] else [face.uv1, face.uv2, face.uv3]
for uv in uvs:
# for uv in face.uv:
@@ -676,11 +677,11 @@ class x3d_class:
shininess = mat.specular_hardness/512.0
# shininess = mat.hard/512.0
- specR = (mat.specular_color[0]+0.001)/(1.25/(mat.specular_reflection+0.001))
+ specR = (mat.specular_color[0]+0.001)/(1.25/(mat.specular_intensity+0.001))
# specR = (mat.specCol[0]+0.001)/(1.25/(mat.spec+0.001))
- specG = (mat.specular_color[1]+0.001)/(1.25/(mat.specular_reflection+0.001))
+ specG = (mat.specular_color[1]+0.001)/(1.25/(mat.specular_intensity+0.001))
# specG = (mat.specCol[1]+0.001)/(1.25/(mat.spec+0.001))
- specB = (mat.specular_color[2]+0.001)/(1.25/(mat.specular_reflection+0.001))
+ specB = (mat.specular_color[2]+0.001)/(1.25/(mat.specular_intensity+0.001))
# specB = (mat.specCol[2]+0.001)/(1.25/(mat.spec+0.001))
transp = 1-mat.alpha
# matFlags = mat.getMode()
@@ -1213,7 +1214,7 @@ class EXPORT_OT_x3d(bpy.types.Operator):
# to the class instance from the operator settings before calling.
__props__ = [
- bpy.props.StringProperty(attr="filename", name="File Name", description="File name used for exporting the X3D file", maxlen=1024, default=""),
+ bpy.props.StringProperty(attr="path", name="File Path", description="File path used for exporting the X3D file", maxlen= 1024, default= ""),
bpy.props.BoolProperty(attr="apply_modifiers", name="Apply Modifiers", description="Use transformed mesh data from each object.", default=True),
bpy.props.BoolProperty(attr="triangulate", name="Triangulate", description="Triangulate quads.", default=False),
@@ -1221,7 +1222,7 @@ class EXPORT_OT_x3d(bpy.types.Operator):
]
def execute(self, context):
- x3d_export(self.filename, context, self.apply_modifiers, self.triangulate, self.compress)
+ x3d_export(self.path, context, self.apply_modifiers, self.triangulate, self.compress)
return ('FINISHED',)
def invoke(self, context, event):
diff --git a/release/scripts/io/import_3ds.py b/release/scripts/io/import_3ds.py
index 99825471764..339fac839ea 100644
--- a/release/scripts/io/import_3ds.py
+++ b/release/scripts/io/import_3ds.py
@@ -420,7 +420,7 @@ def process_next_chunk(file, previous_chunk, importedObjects, IMAGE_SEARCH):
# bmesh_verts.extend( [myContextMesh_vertls[i] for i in vertsToUse] )
# +1 because of DUMMYVERT
- bmesh.faces.foreach_set("verts", unpack_face_list([[myVertMapping[vindex] for vindex in myContextMesh_facels[fIdx]] for fIdx in faces]))
+ bmesh.faces.foreach_set("verts_raw", unpack_face_list([[myVertMapping[vindex] for vindex in myContextMesh_facels[fIdx]] for fIdx in faces]))
# face_mapping = bmesh.faces.extend( [ [ bmesh_verts[ myVertMapping[vindex]+1] for vindex in myContextMesh_facels[fIdx]] for fIdx in faces ], indexList=True )
if bmesh.faces and (contextMeshUV or img):
@@ -1140,14 +1140,15 @@ class IMPORT_OT_3ds(bpy.types.Operator):
# to the class instance from the operator settings before calling.
__props__ = [
- bpy.props.StringProperty(attr="filename", name="File Name", description="File name used for importing the 3DS file", maxlen=1024, default= ""),
+ bpy.props.StringProperty(attr="path", name="File Path", description="File path used for importing the 3DS file", maxlen= 1024, default= ""),
+
# bpy.props.FloatProperty(attr="size_constraint", name="Size Constraint", description="Scale the model by 10 until it reacehs the size constraint. Zero Disables.", min=0.0, max=1000.0, soft_min=0.0, soft_max=1000.0, default=10.0),
# bpy.props.BoolProperty(attr="search_images", name="Image Search", description="Search subdirectories for any assosiated images (Warning, may be slow)", default=True),
# bpy.props.BoolProperty(attr="apply_matrix", name="Transform Fix", description="Workaround for object transformations importing incorrectly", default=False),
]
def execute(self, context):
- load_3ds(self.filename, context, 0.0, False, False)
+ load_3ds(self.path, context, 0.0, False, False)
return ('FINISHED',)
def invoke(self, context, event):
diff --git a/release/scripts/io/import_obj.py b/release/scripts/io/import_obj.py
index 9a00dc1cc2a..a762005ae7d 100644
--- a/release/scripts/io/import_obj.py
+++ b/release/scripts/io/import_obj.py
@@ -87,11 +87,19 @@ def unpack_face_list(list_of_tuples):
l = []
for t in list_of_tuples:
face = [i for i in t]
+
if len(face) != 3 and len(face) != 4:
raise RuntimeError("{0} vertices in face.".format(len(face)))
+
+ # rotate indices if the 4th is 0
+ if len(face) == 4 and face[3] == 0:
+ face = [face[3], face[0], face[1], face[2]]
+
if len(face) == 3:
face.append(0)
+
l.extend(face)
+
return l
def BPyMesh_ngon(from_data, indices, PREF_FIX_LOOPS= True):
@@ -709,9 +717,9 @@ def create_mesh(scn, new_objects, has_ngons, CREATE_FGONS, CREATE_EDGES, verts_l
# me.verts.extend(verts_loc)
# faces is a list of (vert_indices, texco_indices, ...) tuples
- # XXX faces should not contain edges
+ # XXX faces should contain either 3 or 4 verts
# XXX no check for valid face indices
- me.faces.foreach_set("verts", unpack_face_list([f[0] for f in faces]))
+ me.faces.foreach_set("verts_raw", unpack_face_list([f[0] for f in faces]))
# face_mapping= me.faces.extend([f[0] for f in faces], indexList=True)
if verts_tex and me.faces:
@@ -1568,7 +1576,7 @@ class IMPORT_OT_obj(bpy.types.Operator):
# to the class instance from the operator settings before calling.
__props__ = [
- bpy.props.StringProperty(attr="filename", name="File Name", description="File name used for exporting the PLY file", maxlen= 1024, default= ""),
+ bpy.props.StringProperty(attr="path", name="File Path", description="File path used for importing the OBJ file", maxlen= 1024, default= ""),
bpy.props.BoolProperty(attr="CREATE_SMOOTH_GROUPS", name="Smooth Groups", description="Surround smooth groups by sharp edges", default= True),
bpy.props.BoolProperty(attr="CREATE_FGONS", name="NGons as FGons", description="Import faces with more then 4 verts as fgons", default= True),
@@ -1592,10 +1600,7 @@ class IMPORT_OT_obj(bpy.types.Operator):
def execute(self, context):
# print("Selected: " + context.active_object.name)
- if not self.filename:
- raise Exception("filename not set")
-
- load_obj(self.filename,
+ load_obj(self.path,
context,
self.CLAMP_SIZE,
self.CREATE_FGONS,
diff --git a/release/scripts/io/netrender/client.py b/release/scripts/io/netrender/client.py
index 65b2937867f..1897d1fd949 100644
--- a/release/scripts/io/netrender/client.py
+++ b/release/scripts/io/netrender/client.py
@@ -3,12 +3,12 @@ import sys, os, re
import http, http.client, http.server, urllib
import subprocess, shutil, time, hashlib
+import netrender.model
import netrender.slave as slave
import netrender.master as master
from netrender.utils import *
-
-def clientSendJob(conn, scene, anim = False, chunks = 5):
+def clientSendJob(conn, scene, anim = False):
netsettings = scene.network_render
job = netrender.model.RenderJob()
diff --git a/release/scripts/io/netrender/master.py b/release/scripts/io/netrender/master.py
index a3e186a9cfd..be23fda7a91 100644
--- a/release/scripts/io/netrender/master.py
+++ b/release/scripts/io/netrender/master.py
@@ -42,9 +42,10 @@ class MRenderSlave(netrender.model.RenderSlave):
self.job = None
class MRenderJob(netrender.model.RenderJob):
- def __init__(self, job_id, name, files, chunks = 1, priority = 1, blacklist = []):
+ def __init__(self, job_id, job_type, name, files, chunks = 1, priority = 1, blacklist = []):
super().__init__()
self.id = job_id
+ self.type = job_type
self.name = name
self.files = files
self.frames = []
@@ -53,6 +54,10 @@ class MRenderJob(netrender.model.RenderJob):
self.usage = 0.0
self.blacklist = blacklist
self.last_dispatched = time.time()
+
+ # force one chunk for process jobs
+ if self.type == netrender.model.JOB_PROCESS:
+ self.chunks = 1
# special server properties
self.last_update = 0
@@ -93,8 +98,8 @@ class MRenderJob(netrender.model.RenderJob):
if frame:
frame.log_path = log_path
- def addFrame(self, frame_number):
- frame = MRenderFrame(frame_number)
+ def addFrame(self, frame_number, command):
+ frame = MRenderFrame(frame_number, command)
self.frames.append(frame)
return frame
@@ -114,12 +119,14 @@ class MRenderJob(netrender.model.RenderJob):
return frames
class MRenderFrame(netrender.model.RenderFrame):
- def __init__(self, frame):
+ def __init__(self, frame, command):
super().__init__()
self.number = frame
self.slave = None
self.time = 0
self.status = QUEUED
+ self.command = command
+
self.log_path = None
def reset(self, all):
@@ -368,10 +375,10 @@ class RenderHandler(http.server.BaseHTTPRequestHandler):
job_id = self.server.nextJobID()
- job = MRenderJob(job_id, job_info.name, job_info.files, chunks = job_info.chunks, priority = job_info.priority, blacklist = job_info.blacklist)
+ job = MRenderJob(job_id, job_info.type, job_info.name, job_info.files, chunks = job_info.chunks, priority = job_info.priority, blacklist = job_info.blacklist)
for frame in job_info.frames:
- frame = job.addFrame(frame.number)
+ frame = job.addFrame(frame.number, frame.command)
self.server.addJob(job)
@@ -538,17 +545,18 @@ class RenderHandler(http.server.BaseHTTPRequestHandler):
frame = job[job_frame]
if frame:
- if job_result == DONE:
- length = int(self.headers['content-length'])
- buf = self.rfile.read(length)
- f = open(job.save_path + "%04d" % job_frame + ".exr", 'wb')
- f.write(buf)
- f.close()
+ if job.type == netrender.model.JOB_BLENDER:
+ if job_result == DONE:
+ length = int(self.headers['content-length'])
+ buf = self.rfile.read(length)
+ f = open(job.save_path + "%04d" % job_frame + ".exr", 'wb')
+ f.write(buf)
+ f.close()
- del buf
- elif job_result == ERROR:
- # blacklist slave on this job on error
- job.blacklist.append(slave.id)
+ del buf
+ elif job_result == ERROR:
+ # blacklist slave on this job on error
+ job.blacklist.append(slave.id)
self.server.stats("", "Receiving result")
diff --git a/release/scripts/io/netrender/master_html.py b/release/scripts/io/netrender/master_html.py
index 6a956a70e9f..545659e8dc4 100644
--- a/release/scripts/io/netrender/master_html.py
+++ b/release/scripts/io/netrender/master_html.py
@@ -32,9 +32,8 @@ def get(handler):
def endTable():
output("</table>")
- handler.send_head(content = "text/html")
-
if handler.path == "/html" or handler.path == "/":
+ handler.send_head(content = "text/html")
output("<html><head><title>NetRender</title></head><body>")
output("<h2>Master</h2>")
@@ -86,6 +85,7 @@ def get(handler):
output("</body></html>")
elif handler.path.startswith("/html/job"):
+ handler.send_head(content = "text/html")
job_id = handler.path[9:]
output("<html><head><title>NetRender</title></head><body>")
@@ -108,10 +108,9 @@ def get(handler):
output("</body></html>")
elif handler.path.startswith("/html/log"):
+ handler.send_head(content = "text/plain")
pattern = re.compile("([a-zA-Z0-9]+)_([0-9]+)")
- output("<html><head><title>NetRender</title></head><body>")
-
match = pattern.match(handler.path[9:])
if match:
job_id = match.groups()[0]
@@ -125,12 +124,8 @@ def get(handler):
if frame:
f = open(frame.log_path, 'rb')
- output("<pre>")
-
shutil.copyfileobj(f, handler.wfile)
- output("</pre>")
-
f.close()
else:
output("no such frame")
@@ -138,5 +133,3 @@ def get(handler):
output("no such job")
else:
output("malformed url")
-
- output("</body></html>")
diff --git a/release/scripts/io/netrender/model.py b/release/scripts/io/netrender/model.py
index be97f8d0a81..ca2a42d87f6 100644
--- a/release/scripts/io/netrender/model.py
+++ b/release/scripts/io/netrender/model.py
@@ -72,9 +72,18 @@ class RenderSlave:
return slave
+JOB_BLENDER = 1
+JOB_PROCESS = 2
+
+JOB_TYPES = {
+ JOB_BLENDER: "Blender",
+ JOB_PROCESS: "Process"
+ }
+
class RenderJob:
def __init__(self):
self.id = ""
+ self.type = JOB_BLENDER
self.name = ""
self.files = []
self.frames = []
@@ -87,8 +96,8 @@ class RenderJob:
def addFile(self, file_path, start=-1, end=-1):
self.files.append((file_path, start, end))
- def addFrame(self, frame_number):
- frame = RenderFrame(frame_number)
+ def addFrame(self, frame_number, command = ""):
+ frame = RenderFrame(frame_number, command)
self.frames.append(frame)
return frame
@@ -138,6 +147,7 @@ class RenderJob:
max_frame = max((f.number for f in frames)) if frames else -1
return {
"id": self.id,
+ "type": self.type,
"name": self.name,
"files": [f for f in self.files if f[1] == -1 or not frames or (f[1] <= min_frame <= f[2] or f[1] <= max_frame <= f[2])],
"frames": [f.serialize() for f in self.frames if not frames or f in frames],
@@ -155,6 +165,7 @@ class RenderJob:
job = RenderJob()
job.id = data["id"]
+ job.type = data["type"]
job.name = data["name"]
job.files = data["files"]
job.frames = [RenderFrame.materialize(f) for f in data["frames"]]
@@ -167,11 +178,12 @@ class RenderJob:
return job
class RenderFrame:
- def __init__(self, number = 0):
+ def __init__(self, number = 0, command = ""):
self.number = number
self.time = 0
self.status = QUEUED
self.slave = None
+ self.command = command
def statusText(self):
return STATUS_TEXT[self.status]
@@ -181,7 +193,8 @@ class RenderFrame:
"number": self.number,
"time": self.time,
"status": self.status,
- "slave": None if not self.slave else self.slave.serialize()
+ "slave": None if not self.slave else self.slave.serialize(),
+ "command": self.command
}
@staticmethod
@@ -194,5 +207,6 @@ class RenderFrame:
frame.time = data["time"]
frame.status = data["status"]
frame.slave = RenderSlave.materialize(data["slave"])
+ frame.command = data["command"]
return frame
diff --git a/release/scripts/io/netrender/slave.py b/release/scripts/io/netrender/slave.py
index 657e31001e0..15ca6faf297 100644
--- a/release/scripts/io/netrender/slave.py
+++ b/release/scripts/io/netrender/slave.py
@@ -99,37 +99,46 @@ def render_slave(engine, scene):
if not os.path.exists(JOB_PREFIX):
os.mkdir(JOB_PREFIX)
- job_path = job.files[0][0] # data in files have format (path, start, end)
- main_path, main_file = os.path.split(job_path)
-
- job_full_path = testFile(conn, job.id, slave_id, JOB_PREFIX, job_path)
- print("Fullpath", job_full_path)
- print("File:", main_file, "and %i other files" % (len(job.files) - 1,))
- engine.update_stats("", "Render File", main_file, "for job", job.id)
-
- for file_path, start, end in job.files[1:]:
- print("\t", file_path)
- testFile(conn, job.id, slave_id, JOB_PREFIX, file_path, main_path)
-
- frame_args = []
-
- for frame in job.frames:
- print("frame", frame.number)
- frame_args += ["-f", str(frame.number)]
+ if job.type == netrender.model.JOB_BLENDER:
+ job_path = job.files[0][0] # data in files have format (path, start, end)
+ main_path, main_file = os.path.split(job_path)
+
+ job_full_path = testFile(conn, job.id, slave_id, JOB_PREFIX, job_path)
+ print("Fullpath", job_full_path)
+ print("File:", main_file, "and %i other files" % (len(job.files) - 1,))
+ engine.update_stats("", "Render File", main_file, "for job", job.id)
+
+ for file_path, start, end in job.files[1:]:
+ print("\t", file_path)
+ testFile(conn, job.id, slave_id, JOB_PREFIX, file_path, main_path)
+
# announce log to master
logfile = netrender.model.LogFile(job.id, [frame.number for frame in job.frames])
conn.request("POST", "/log", bytes(repr(logfile.serialize()), encoding='utf8'), headers={"slave-id":slave_id})
response = conn.getresponse()
- first_frame = job.frames[0].number
+ first_frame = job.frames[0].number
+
# start render
start_t = time.time()
-
- val = SetErrorMode()
- process = subprocess.Popen([sys.argv[0], "-b", job_full_path, "-o", JOB_PREFIX + "######", "-E", "BLENDER_RENDER", "-F", "MULTILAYER"] + frame_args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
- RestoreErrorMode(val)
+
+ if job.type == netrender.model.JOB_BLENDER:
+ frame_args = []
+
+ for frame in job.frames:
+ print("frame", frame.number)
+ frame_args += ["-f", str(frame.number)]
+
+ val = SetErrorMode()
+ process = subprocess.Popen([sys.argv[0], "-b", job_full_path, "-o", JOB_PREFIX + "######", "-E", "BLENDER_RENDER", "-F", "MULTILAYER"] + frame_args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+ RestoreErrorMode(val)
+ elif job.type == netrender.model.JOB_PROCESS:
+ command = job.frames[0].command
+ val = SetErrorMode()
+ process = subprocess.Popen(command.split(" "), stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+ RestoreErrorMode(val)
headers = {"job-id":job.id, "slave-id":slave_id}
@@ -155,6 +164,9 @@ def render_slave(engine, scene):
if testCancel(conn, job.id, first_frame):
cancelled = True
+ # read leftovers if needed
+ stdout += process.stdout.read()
+
if cancelled:
# kill process if needed
if process.poll() == None:
@@ -182,11 +194,16 @@ def render_slave(engine, scene):
headers["job-result"] = str(DONE)
for frame in job.frames:
headers["job-frame"] = str(frame.number)
- # send result back to server
- f = open(JOB_PREFIX + "%06d" % frame.number + ".exr", 'rb')
- conn.request("PUT", "/render", f, headers=headers)
- f.close()
- response = conn.getresponse()
+
+ if job.type == netrender.model.JOB_BLENDER:
+ # send image back to server
+ f = open(JOB_PREFIX + "%06d" % frame.number + ".exr", 'rb')
+ conn.request("PUT", "/render", f, headers=headers)
+ f.close()
+ response = conn.getresponse()
+ elif job.type == netrender.model.JOB_PROCESS:
+ conn.request("PUT", "/render", headers=headers)
+ response = conn.getresponse()
else:
headers["job-result"] = str(ERROR)
for frame in job.frames:
diff --git a/release/scripts/modules/bpy_ops.py b/release/scripts/modules/bpy_ops.py
index 83c2e82bf6c..834a33d305d 100644
--- a/release/scripts/modules/bpy_ops.py
+++ b/release/scripts/modules/bpy_ops.py
@@ -139,3 +139,20 @@ class bpy_ops_submodule_op(object):
import bpy
bpy.ops = bpy_ops()
+
+# TODO, C macro's cant define settings :|
+
+class MESH_OT_delete_edgeloop(bpy.types.Operator):
+ '''Export a single object as a stanford PLY with normals, colours and texture coordinates.'''
+ __idname__ = "mesh.delete_edgeloop"
+ __label__ = "Export PLY"
+
+ def execute(self, context):
+ bpy.ops.tfm.edge_slide(value=1.0)
+ bpy.ops.mesh.select_more()
+ bpy.ops.mesh.remove_doubles()
+ return ('FINISHED',)
+
+
+bpy.ops.add(MESH_OT_delete_edgeloop)
+
diff --git a/release/scripts/ui/buttons_data_bone.py b/release/scripts/ui/buttons_data_bone.py
index 5971e4492ce..e8041cc7393 100644
--- a/release/scripts/ui/buttons_data_bone.py
+++ b/release/scripts/ui/buttons_data_bone.py
@@ -48,7 +48,7 @@ class BONE_PT_transform(BoneButtonsPanel):
else:
pchan = ob.pose.pose_channels[context.bone.name]
- layout.itemR(pchan, "rotation_mode")
+
row = layout.row()
col = row.column()
@@ -67,6 +67,8 @@ class BONE_PT_transform(BoneButtonsPanel):
col.itemR(pchan, "rotation_euler", text="Rotation")
row.column().itemR(pchan, "scale")
+
+ layout.itemR(pchan, "rotation_mode")
class BONE_PT_transform_locks(BoneButtonsPanel):
__label__ = "Transform Locks"
@@ -98,8 +100,8 @@ class BONE_PT_transform_locks(BoneButtonsPanel):
row.column().itemR(pchan, "lock_scale")
-class BONE_PT_bone(BoneButtonsPanel):
- __label__ = "Bone"
+class BONE_PT_relations(BoneButtonsPanel):
+ __label__ = "Relations"
def draw(self, context):
layout = self.layout
@@ -115,7 +117,17 @@ class BONE_PT_bone(BoneButtonsPanel):
pchan = ob.pose.pose_channels[context.bone.name]
split = layout.split()
-
+
+ col = split.column()
+ col.itemL(text="Layers:")
+ col.itemR(bone, "layer", text="")
+
+ col.itemS()
+
+ if ob and pchan:
+ col.itemL(text="Bone Group:")
+ col.item_pointerR(pchan, "bone_group", ob.pose, "bone_groups", text="")
+
col = split.column()
col.itemL(text="Parent:")
if context.bone:
@@ -123,119 +135,46 @@ class BONE_PT_bone(BoneButtonsPanel):
else:
col.item_pointerR(bone, "parent", arm, "edit_bones", text="")
- row = col.row()
- row.active = bone.parent != None
- row.itemR(bone, "connected")
+ sub = col.column()
+ sub.active = bone.parent != None
+ sub.itemR(bone, "connected")
+ sub.itemR(bone, "hinge", text="Inherit Rotation")
+ sub.itemR(bone, "inherit_scale", text="Inherit Scale")
+
+
+class BONE_PT_display(BoneButtonsPanel):
+ __label__ = "Display"
+
+ def poll(self, context):
+ return context.bone
+
+ def draw(self, context):
+ layout = self.layout
- col.itemL(text="Layers:")
- col.itemR(bone, "layer", text="")
+ ob = context.object
+ bone = context.bone
+ arm = context.armature
- col = split.column()
- col.itemL(text="Inherit:")
- col.itemR(bone, "hinge", text="Rotation")
- col.itemR(bone, "inherit_scale", text="Scale")
- col.itemL(text="Display:")
- col.itemR(bone, "draw_wire", text="Wireframe")
- col.itemR(bone, "hidden", text="Hide")
+ if not bone:
+ bone = context.edit_bone
+ pchan = None
+ else:
+ pchan = ob.pose.pose_channels[context.bone.name]
if ob and pchan:
- split = layout.split()
+ split = layout.split()
+
col = split.column()
- col.itemL(text="Bone Group:")
- col.item_pointerR(pchan, "bone_group", ob.pose, "bone_groups", text="")
+
+ col.itemR(bone, "draw_wire", text="Wireframe")
+ col.itemR(bone, "hidden", text="Hide")
col = split.column()
+
col.itemL(text="Custom Shape:")
col.itemR(pchan, "custom_shape", text="")
-class BONE_PT_inverse_kinematics(BoneButtonsPanel):
- __label__ = "Inverse Kinematics"
- __default_closed__ = True
-
- def poll(self, context):
- ob = context.object
- bone = context.bone
-
- if ob and context.bone:
- pchan = ob.pose.pose_channels[context.bone.name]
- return pchan.has_ik
-
- return False
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
- bone = context.bone
- pchan = ob.pose.pose_channels[context.bone.name]
-
- row = layout.row()
- row.itemR(ob.pose, "ik_solver")
-
- split = layout.split(percentage=0.25)
- split.itemR(pchan, "ik_dof_x", text="X")
- row = split.row()
- row.itemR(pchan, "ik_stiffness_x", text="Stiffness", slider=True)
- row.active = pchan.ik_dof_x
-
- split = layout.split(percentage=0.25)
- row = split.row()
- row.itemR(pchan, "ik_limit_x", text="Limit")
- row.active = pchan.ik_dof_x
- row = split.row(align=True)
- row.itemR(pchan, "ik_min_x", text="")
- row.itemR(pchan, "ik_max_x", text="")
- row.active = pchan.ik_dof_x and pchan.ik_limit_x
-
- split = layout.split(percentage=0.25)
- split.itemR(pchan, "ik_dof_y", text="Y")
- row = split.row()
- row.itemR(pchan, "ik_stiffness_y", text="Stiffness", slider=True)
- row.active = pchan.ik_dof_y
-
- split = layout.split(percentage=0.25)
- row = split.row()
- row.itemR(pchan, "ik_limit_y", text="Limit")
- row.active = pchan.ik_dof_y
- row = split.row(align=True)
- row.itemR(pchan, "ik_min_y", text="")
- row.itemR(pchan, "ik_max_y", text="")
- row.active = pchan.ik_dof_y and pchan.ik_limit_y
-
- split = layout.split(percentage=0.25)
- split.itemR(pchan, "ik_dof_z", text="Z")
- row = split.row()
- row.itemR(pchan, "ik_stiffness_z", text="Stiffness", slider=True)
- row.active = pchan.ik_dof_z
-
- split = layout.split(percentage=0.25)
- row = split.row()
- row.itemR(pchan, "ik_limit_z", text="Limit")
- row.active = pchan.ik_dof_z
- row = split.row(align=True)
- row.itemR(pchan, "ik_min_z", text="")
- row.itemR(pchan, "ik_max_z", text="")
- row.active = pchan.ik_dof_z and pchan.ik_limit_z
- split = layout.split()
- split.itemR(pchan, "ik_stretch", text="Stretch", slider=True)
- split.itemL()
-
- if ob.pose.ik_solver == "ITASC":
- layout.itemL(text="Joint constraint:")
- split = layout.split(percentage=0.3)
- row = split.row()
- row.itemR(pchan, "ik_rot_control", text="Rotation")
- row = split.row()
- row.itemR(pchan, "ik_rot_weight", text="Weight", slider=True)
- row.active = pchan.ik_rot_control
- # not supported yet
- #split = layout.split(percentage=0.3)
- #row = split.row()
- #row.itemR(pchan, "ik_lin_control", text="Size")
- #row = split.row()
- #row.itemR(pchan, "ik_lin_weight", text="Weight", slider=True)
- #row.active = pchan.ik_lin_control
class BONE_PT_deform(BoneButtonsPanel):
__label__ = "Deform"
@@ -285,65 +224,10 @@ class BONE_PT_deform(BoneButtonsPanel):
col.itemL(text="Offset:")
col.itemR(bone, "cyclic_offset")
-class BONE_PT_iksolver_itasc(BoneButtonsPanel):
- __idname__ = "BONE_PT_iksolver_itasc"
- __label__ = "iTaSC parameters"
- __default_closed__ = True
-
- def poll(self, context):
- ob = context.object
- bone = context.bone
-
- if ob and context.bone:
- pchan = ob.pose.pose_channels[context.bone.name]
- return pchan.has_ik and ob.pose.ik_solver == "ITASC" and ob.pose.ik_param
-
- return False
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
- itasc = ob.pose.ik_param
-
- layout.row().itemR(itasc, "simulation")
- if itasc.simulation:
- split = layout.split()
- row = split.row()
- row.itemR(itasc, "reiteration")
- row = split.row()
- if itasc.reiteration:
- itasc.initial_reiteration = True
- row.itemR(itasc, "initial_reiteration")
- row.active = not itasc.reiteration
-
- flow = layout.column_flow()
- flow.itemR(itasc, "precision")
- flow.itemR(itasc, "num_iter")
- flow.active = not itasc.simulation or itasc.initial_reiteration or itasc.reiteration
-
- if itasc.simulation:
- layout.itemR(itasc, "auto_step")
- row = layout.row()
- if itasc.auto_step:
- row.itemR(itasc, "min_step")
- row.itemR(itasc, "max_step")
- else:
- row.itemR(itasc, "num_step")
-
- layout.itemR(itasc, "solver")
- if itasc.simulation:
- layout.itemR(itasc, "feedback")
- layout.itemR(itasc, "max_velocity")
- if itasc.solver == "DLS":
- row = layout.row()
- row.itemR(itasc, "dampmax")
- row.itemR(itasc, "dampeps")
bpy.types.register(BONE_PT_context_bone)
bpy.types.register(BONE_PT_transform)
bpy.types.register(BONE_PT_transform_locks)
-bpy.types.register(BONE_PT_bone)
+bpy.types.register(BONE_PT_relations)
+bpy.types.register(BONE_PT_display)
bpy.types.register(BONE_PT_deform)
-bpy.types.register(BONE_PT_inverse_kinematics)
-bpy.types.register(BONE_PT_iksolver_itasc)
diff --git a/release/scripts/ui/buttons_data_lamp.py b/release/scripts/ui/buttons_data_lamp.py
index 86ca5beb9b5..2879da8d8d5 100644
--- a/release/scripts/ui/buttons_data_lamp.py
+++ b/release/scripts/ui/buttons_data_lamp.py
@@ -249,7 +249,7 @@ class DATA_PT_area(DataButtonsPanel):
split = layout.split()
col = split.column()
- col.itemR(lamp, "shape", text="")
+ col.row().itemR(lamp, "shape", expand=True)
sub = col.column(align=True)
if (lamp.shape == 'SQUARE'):
@@ -273,9 +273,9 @@ class DATA_PT_spot(DataButtonsPanel):
split = layout.split()
col = split.column()
- sub = col.column(align=True)
+ sub = col.column()
sub.itemR(lamp, "spot_size", text="Size")
- sub.itemR(lamp, "spot_blend", text="Blend")
+ sub.itemR(lamp, "spot_blend", text="Blend", slider=True)
col.itemR(lamp, "square")
col = split.column()
diff --git a/release/scripts/ui/buttons_material.py b/release/scripts/ui/buttons_material.py
index 448cb36e130..2415d636dab 100644
--- a/release/scripts/ui/buttons_material.py
+++ b/release/scripts/ui/buttons_material.py
@@ -609,6 +609,23 @@ class VolumeButtonsPanel(bpy.types.Panel):
mat = context.material
engine = context.scene.render_data.engine
return mat and (mat.type == 'VOLUME') and (engine in self.COMPAT_ENGINES)
+
+class MATERIAL_PT_volume_density(VolumeButtonsPanel):
+ __label__ = "Density"
+ __default_closed__ = False
+ COMPAT_ENGINES = set(['BLENDER_RENDER'])
+
+ def draw(self, context):
+ layout = self.layout
+
+ mat = context.material
+ vol = context.material.volume
+
+ split = layout.split()
+ row = split.row()
+ row.itemR(vol, "density")
+ row.itemR(vol, "density_scale")
+
class MATERIAL_PT_volume_shading(VolumeButtonsPanel):
__label__ = "Shading"
@@ -620,22 +637,23 @@ class MATERIAL_PT_volume_shading(VolumeButtonsPanel):
vol = context.material.volume
- row = layout.row()
- row.itemR(vol, "density")
- row.itemR(vol, "scattering")
-
split = layout.split()
col = split.column()
- col.itemR(vol, "absorption")
- col.itemR(vol, "absorption_color", text="")
-
+ col.itemR(vol, "scattering")
+ col.itemR(vol, "asymmetry")
+ col.itemR(vol, "transmission_color")
+
col = split.column()
- col.itemR(vol, "emission")
- col.itemR(vol, "emission_color", text="")
+ sub = col.column(align=True)
+ sub.itemR(vol, "emission")
+ sub.itemR(vol, "emission_color", text="")
+ sub = col.column(align=True)
+ sub.itemR(vol, "reflection")
+ sub.itemR(vol, "reflection_color", text="")
-class MATERIAL_PT_volume_scattering(VolumeButtonsPanel):
- __label__ = "Scattering"
+class MATERIAL_PT_volume_lighting(VolumeButtonsPanel):
+ __label__ = "Lighting"
__default_closed__ = False
COMPAT_ENGINES = set(['BLENDER_RENDER'])
@@ -647,25 +665,28 @@ class MATERIAL_PT_volume_scattering(VolumeButtonsPanel):
split = layout.split()
col = split.column()
- col.itemR(vol, "scattering_mode", text="")
- if vol.scattering_mode == 'SINGLE_SCATTERING':
+ col.itemR(vol, "lighting_mode", text="")
+
+ col = split.column()
+
+ if vol.lighting_mode == 'SHADED':
+ col.itemR(vol, "external_shadows")
col.itemR(vol, "light_cache")
sub = col.column()
sub.active = vol.light_cache
sub.itemR(vol, "cache_resolution")
- elif vol.scattering_mode in ('MULTIPLE_SCATTERING', 'SINGLE_PLUS_MULTIPLE_SCATTERING'):
+ elif vol.lighting_mode in ('MULTIPLE_SCATTERING', 'SHADED_PLUS_MULTIPLE_SCATTERING'):
+ sub = col.column()
+ sub.enabled = True
+ sub.active = False
+ sub.itemR(vol, "light_cache")
col.itemR(vol, "cache_resolution")
sub = col.column(align=True)
sub.itemR(vol, "ms_diffusion")
sub.itemR(vol, "ms_spread")
sub.itemR(vol, "ms_intensity")
-
- col = split.column()
- # col.itemL(text="Anisotropic Scattering:")
- col.itemR(vol, "phase_function", text="")
- if vol.phase_function in ('SCHLICK', 'HENYEY-GREENSTEIN'):
- col.itemR(vol, "asymmetry")
+
class MATERIAL_PT_volume_transp(VolumeButtonsPanel):
__label__= "Transparency"
@@ -693,16 +714,15 @@ class MATERIAL_PT_volume_integration(VolumeButtonsPanel):
col = split.column()
col.itemL(text="Step Calculation:")
col.itemR(vol, "step_calculation", text="")
- sub = col.column(align=True)
- sub.itemR(vol, "step_size")
- sub.itemR(vol, "shading_step_size")
+ col = col.column(align=True)
+ col.itemR(vol, "step_size")
col = split.column()
col.itemL()
col.itemR(vol, "depth_cutoff")
- col.itemR(vol, "density_scale")
+bpy.types.register(MATERIAL_PT_volume_density)
bpy.types.register(MATERIAL_PT_volume_shading)
-bpy.types.register(MATERIAL_PT_volume_scattering)
+bpy.types.register(MATERIAL_PT_volume_lighting)
bpy.types.register(MATERIAL_PT_volume_transp)
bpy.types.register(MATERIAL_PT_volume_integration)
diff --git a/release/scripts/ui/buttons_object.py b/release/scripts/ui/buttons_object.py
index c069572aa28..d546ddb8fd8 100644
--- a/release/scripts/ui/buttons_object.py
+++ b/release/scripts/ui/buttons_object.py
@@ -26,7 +26,7 @@ class OBJECT_PT_transform(ObjectButtonsPanel):
ob = context.object
- layout.itemR(ob, "rotation_mode")
+
row = layout.row()
@@ -43,6 +43,8 @@ class OBJECT_PT_transform(ObjectButtonsPanel):
row.column().itemR(ob, "scale")
+ layout.itemR(ob, "rotation_mode")
+
class OBJECT_PT_transform_locks(ObjectButtonsPanel):
__label__ = "Transform Locks"
__default_closed__ = True
diff --git a/release/scripts/ui/buttons_object_constraint.py b/release/scripts/ui/buttons_object_constraint.py
index e089cff264f..6be166e8af0 100644
--- a/release/scripts/ui/buttons_object_constraint.py
+++ b/release/scripts/ui/buttons_object_constraint.py
@@ -536,6 +536,145 @@ class OBJECT_PT_constraints(ConstraintButtonsPanel):
for con in ob.constraints:
self.draw_constraint(context, con)
+class BONE_PT_inverse_kinematics(ConstraintButtonsPanel):
+ __label__ = "Inverse Kinematics"
+ __default_closed__ = True
+ __context__ = "bone_constraint"
+
+ def poll(self, context):
+ ob = context.object
+ bone = context.bone
+
+ if ob and bone:
+ pchan = ob.pose.pose_channels[bone.name]
+ return pchan.has_ik
+
+ return False
+
+ def draw(self, context):
+ layout = self.layout
+
+ ob = context.object
+ bone = context.bone
+ pchan = ob.pose.pose_channels[bone.name]
+
+ row = layout.row()
+ row.itemR(ob.pose, "ik_solver")
+
+ split = layout.split(percentage=0.25)
+ split.itemR(pchan, "ik_dof_x", text="X")
+ row = split.row()
+ row.itemR(pchan, "ik_stiffness_x", text="Stiffness", slider=True)
+ row.active = pchan.ik_dof_x
+
+ split = layout.split(percentage=0.25)
+ row = split.row()
+ row.itemR(pchan, "ik_limit_x", text="Limit")
+ row.active = pchan.ik_dof_x
+ row = split.row(align=True)
+ row.itemR(pchan, "ik_min_x", text="")
+ row.itemR(pchan, "ik_max_x", text="")
+ row.active = pchan.ik_dof_x and pchan.ik_limit_x
+
+ split = layout.split(percentage=0.25)
+ split.itemR(pchan, "ik_dof_y", text="Y")
+ row = split.row()
+ row.itemR(pchan, "ik_stiffness_y", text="Stiffness", slider=True)
+ row.active = pchan.ik_dof_y
+
+ split = layout.split(percentage=0.25)
+ row = split.row()
+ row.itemR(pchan, "ik_limit_y", text="Limit")
+ row.active = pchan.ik_dof_y
+ row = split.row(align=True)
+ row.itemR(pchan, "ik_min_y", text="")
+ row.itemR(pchan, "ik_max_y", text="")
+ row.active = pchan.ik_dof_y and pchan.ik_limit_y
+
+ split = layout.split(percentage=0.25)
+ split.itemR(pchan, "ik_dof_z", text="Z")
+ row = split.row()
+ row.itemR(pchan, "ik_stiffness_z", text="Stiffness", slider=True)
+ row.active = pchan.ik_dof_z
+
+ split = layout.split(percentage=0.25)
+ row = split.row()
+ row.itemR(pchan, "ik_limit_z", text="Limit")
+ row.active = pchan.ik_dof_z
+ row = split.row(align=True)
+ row.itemR(pchan, "ik_min_z", text="")
+ row.itemR(pchan, "ik_max_z", text="")
+ row.active = pchan.ik_dof_z and pchan.ik_limit_z
+ split = layout.split()
+ split.itemR(pchan, "ik_stretch", text="Stretch", slider=True)
+ split.itemL()
+
+ if ob.pose.ik_solver == "ITASC":
+ layout.itemL(text="Joint constraint:")
+ split = layout.split(percentage=0.3)
+ row = split.row()
+ row.itemR(pchan, "ik_rot_control", text="Rotation")
+ row = split.row()
+ row.itemR(pchan, "ik_rot_weight", text="Weight", slider=True)
+ row.active = pchan.ik_rot_control
+ # not supported yet
+ #split = layout.split(percentage=0.3)
+ #row = split.row()
+ #row.itemR(pchan, "ik_lin_control", text="Size")
+ #row = split.row()
+ #row.itemR(pchan, "ik_lin_weight", text="Weight", slider=True)
+ #row.active = pchan.ik_lin_control
+
+class BONE_PT_iksolver_itasc(ConstraintButtonsPanel):
+ __label__ = "iTaSC parameters"
+ __default_closed__ = True
+ __context__ = "bone_constraint"
+
+ def poll(self, context):
+ ob = context.object
+ bone = context.bone
+
+ if ob and bone:
+ pchan = ob.pose.pose_channels[bone.name]
+ return pchan.has_ik and ob.pose.ik_solver == "ITASC" and ob.pose.ik_param
+
+ return False
+
+ def draw(self, context):
+ layout = self.layout
+
+ ob = context.object
+ itasc = ob.pose.ik_param
+
+ layout.itemR(itasc, "mode", expand=True)
+ simulation = itasc.mode == "SIMULATION"
+ if simulation:
+ layout.itemL(text="Reiteration:")
+ layout.itemR(itasc, "reiteration", expand=True)
+
+ flow = layout.column_flow()
+ flow.itemR(itasc, "precision", text="Prec")
+ flow.itemR(itasc, "num_iter", text="Iter")
+ flow.active = not simulation or itasc.reiteration != "NEVER"
+
+ if simulation:
+ layout.itemR(itasc, "auto_step")
+ row = layout.row()
+ if itasc.auto_step:
+ row.itemR(itasc, "min_step", text="Min")
+ row.itemR(itasc, "max_step", text="Max")
+ else:
+ row.itemR(itasc, "num_step")
+
+ layout.itemR(itasc, "solver")
+ if simulation:
+ layout.itemR(itasc, "feedback")
+ layout.itemR(itasc, "max_velocity")
+ if itasc.solver == "DLS":
+ row = layout.row()
+ row.itemR(itasc, "dampmax", text="Damp", slider=True)
+ row.itemR(itasc, "dampeps", text="Eps", slider=True)
+
class BONE_PT_constraints(ConstraintButtonsPanel):
__label__ = "Constraints"
__context__ = "bone_constraint"
@@ -558,4 +697,6 @@ class BONE_PT_constraints(ConstraintButtonsPanel):
self.draw_constraint(context, con)
bpy.types.register(OBJECT_PT_constraints)
+bpy.types.register(BONE_PT_iksolver_itasc)
+bpy.types.register(BONE_PT_inverse_kinematics)
bpy.types.register(BONE_PT_constraints)
diff --git a/release/scripts/ui/buttons_particle.py b/release/scripts/ui/buttons_particle.py
index e72bd38e563..81ddab40ec9 100644
--- a/release/scripts/ui/buttons_particle.py
+++ b/release/scripts/ui/buttons_particle.py
@@ -1,6 +1,11 @@
import bpy
+from buttons_physics_common import point_cache_ui
+from buttons_physics_common import effector_weights_ui
+from buttons_physics_common import basic_force_field_settings_ui
+from buttons_physics_common import basic_force_field_falloff_ui
+
def particle_panel_enabled(psys):
return psys.point_cache.baked==False and psys.edited==False
@@ -10,72 +15,6 @@ def particle_panel_poll(context):
if psys.settings==None: return False
return psys.settings.type in ('EMITTER', 'REACTOR', 'HAIR')
-def point_cache_ui(self, cache, enabled, particles, smoke):
- layout = self.layout
- layout.set_context_pointer("PointCache", cache)
-
- row = layout.row()
- row.template_list(cache, "point_cache_list", cache, "active_point_cache_index", rows=2 )
- col = row.column(align=True)
- col.itemO("ptcache.add_new", icon='ICON_ZOOMIN', text="")
- col.itemO("ptcache.remove", icon='ICON_ZOOMOUT', text="")
-
- row = layout.row()
- row.itemL(text="File Name:")
- if particles:
- row.itemR(cache, "external")
-
- if cache.external:
- split = layout.split(percentage=0.80)
- split.itemR(cache, "name", text="")
- split.itemR(cache, "index", text="")
-
- layout.itemL(text="File Path:")
- layout.itemR(cache, "filepath", text="")
-
- layout.itemL(text=cache.info)
- else:
- layout.itemR(cache, "name", text="")
-
- if not particles:
- row = layout.row()
- row.enabled = enabled
- row.itemR(cache, "start_frame")
- row.itemR(cache, "end_frame")
-
- row = layout.row()
-
- if cache.baked == True:
- row.itemO("ptcache.free_bake", text="Free Bake")
- else:
- row.item_booleanO("ptcache.bake", "bake", True, text="Bake")
-
- sub = row.row()
- sub.enabled = (cache.frames_skipped or cache.outdated) and enabled
- sub.itemO("ptcache.bake", "bake", False, text="Calculate to Current Frame")
-
- row = layout.row()
- row.enabled = enabled
- row.itemO("ptcache.bake_from_cache", text="Current Cache to Bake")
- if not smoke:
- row.itemR(cache, "step");
-
- if not smoke:
- row = layout.row()
- sub = row.row()
- sub.enabled = enabled
- sub.itemR(cache, "quick_cache")
- row.itemR(cache, "disk_cache")
-
- layout.itemL(text=cache.info)
-
- layout.itemS()
-
- row = layout.row()
- row.item_booleanO("ptcache.bake_all", "bake", True, text="Bake All Dynamics")
- row.itemO("ptcache.free_bake_all", text="Free All Bakes")
- layout.itemO("ptcache.bake_all", "bake", False, text="Update All Dynamics to current frame")
-
class ParticleButtonsPanel(bpy.types.Panel):
__space_type__ = 'PROPERTIES'
@@ -182,17 +121,19 @@ class PARTICLE_PT_emission(ParticleButtonsPanel):
layout.enabled = particle_panel_enabled(psys) and not psys.multiple_caches
row = layout.row()
+ row.active = part.distribution != 'GRID'
row.itemR(part, "amount")
- split = layout.split()
-
- col = split.column(align=True)
- col.itemR(part, "start")
- col.itemR(part, "end")
+ if part.type != 'HAIR':
+ split = layout.split()
+
+ col = split.column(align=True)
+ col.itemR(part, "start")
+ col.itemR(part, "end")
- col = split.column(align=True)
- col.itemR(part, "lifetime")
- col.itemR(part, "random_lifetime", slider=True)
+ col = split.column(align=True)
+ col.itemR(part, "lifetime")
+ col.itemR(part, "random_lifetime", slider=True)
layout.row().itemL(text="Emit From:")
@@ -245,23 +186,22 @@ class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel):
split = layout.split()
col = split.column()
- col.itemL(text="Quality:")
- col.itemR(cloth, "quality", text="Steps",slider=True)
- col.itemL(text="Gravity:")
- col.itemR(cloth, "gravity", text="")
-
- col = split.column()
col.itemL(text="Material:")
sub = col.column(align=True)
sub.itemR(cloth, "pin_stiffness", text="Stiffness")
sub.itemR(cloth, "mass")
sub.itemR(cloth, "bending_stiffness", text="Bending")
+ sub.itemR(cloth, "internal_friction", slider="True")
+
+ col = split.column()
+
col.itemL(text="Damping:")
sub = col.column(align=True)
sub.itemR(cloth, "spring_damping", text="Spring")
sub.itemR(cloth, "air_damping", text="Air")
- layout.itemR(cloth, "internal_friction", slider="True")
+ col.itemL(text="Quality:")
+ col.itemR(cloth, "quality", text="Steps",slider=True)
class PARTICLE_PT_cache(ParticleButtonsPanel):
__label__ = "Cache"
@@ -283,7 +223,7 @@ class PARTICLE_PT_cache(ParticleButtonsPanel):
point_cache_ui(self, psys.point_cache, particle_panel_enabled(psys), not psys.hair_dynamics, 0)
-class PARTICLE_PT_initial(ParticleButtonsPanel):
+class PARTICLE_PT_velocity(ParticleButtonsPanel):
__label__ = "Velocity"
def poll(self, context):
@@ -300,48 +240,66 @@ class PARTICLE_PT_initial(ParticleButtonsPanel):
part = psys.settings
layout.enabled = particle_panel_enabled(psys)
-
- layout.row().itemL(text="Direction:")
split = layout.split()
sub = split.column()
+ sub.itemL(text="Emitter Geometry:")
sub.itemR(part, "normal_factor")
+ subsub = sub.column(align=True)
+ subsub.itemR(part, "tangent_factor")
+ subsub.itemR(part, "tangent_phase", slider=True)
+
+ sub = split.column()
+ sub.itemL(text="Emitter Object")
+ sub.itemR(part, "object_aligned_factor", text="")
+
+ layout.row().itemL(text="Other:")
+ split = layout.split()
+ sub = split.column()
if part.emit_from=='PARTICLE':
sub.itemR(part, "particle_factor")
else:
sub.itemR(part, "object_factor", slider=True)
+ sub = split.column()
sub.itemR(part, "random_factor")
- sub.itemR(part, "tangent_factor")
- sub.itemR(part, "tangent_phase", slider=True)
- sub = split.column()
- sub.itemL(text="TODO:")
- sub.itemL(text="Object aligned")
- sub.itemL(text="direction: X, Y, Z")
+ #if part.type=='REACTOR':
+ # sub.itemR(part, "reactor_factor")
+ # sub.itemR(part, "reaction_shape", slider=True)
- if part.type=='REACTOR':
- sub.itemR(part, "reactor_factor")
- sub.itemR(part, "reaction_shape", slider=True)
+class PARTICLE_PT_rotation(ParticleButtonsPanel):
+ __label__ = "Rotation"
+
+ def poll(self, context):
+ if particle_panel_poll(context):
+ psys = context.particle_system
+ return psys.settings.physics_type != 'BOIDS' and not psys.point_cache.external
else:
- sub.itemL(text="")
+ return False
+
+ def draw(self, context):
+ layout = self.layout
+
+ psys = context.particle_system
+ part = psys.settings
- layout.row().itemL(text="Rotation:")
- split = layout.split()
-
- sub = split.column()
+ layout.enabled = particle_panel_enabled(psys)
- sub.itemR(part, "rotation_mode", text="Axis")
+ split = layout.split()
+ split.itemL(text="Initial Rotation:")
+ split.itemR(part, "rotation_dynamic")
split = layout.split()
- sub = split.column()
- sub.itemR(part, "rotation_dynamic")
- sub.itemR(part, "random_rotation_factor", slider=True)
- sub = split.column()
+ sub = split.column(align=True)
+ sub.itemR(part, "rotation_mode", text="")
+ sub.itemR(part, "random_rotation_factor", slider=True, text="Random")
+
+ sub = split.column(align=True)
sub.itemR(part, "phase_factor", slider=True)
sub.itemR(part, "random_phase_factor", text="Random", slider=True)
- layout.row().itemL(text="Angular velocity:")
+ layout.row().itemL(text="Angular Velocity:")
layout.row().itemR(part, "angular_velocity_mode", expand=True)
split = layout.split()
@@ -385,9 +343,11 @@ class PARTICLE_PT_physics(ParticleButtonsPanel):
sub.itemR(part, "brownian_factor")
sub.itemR(part, "drag_factor", slider=True)
sub.itemR(part, "damp_factor", slider=True)
- sub.itemR(part, "integrator")
sub = split.column()
- sub.itemR(part, "acceleration")
+ sub.itemR(part, "size_deflect")
+ sub.itemR(part, "die_on_collision")
+ sub.itemR(part, "integrator")
+ sub.itemR(part, "time_tweak")
elif part.physics_type == 'KEYED':
split = layout.split()
@@ -445,14 +405,10 @@ class PARTICLE_PT_physics(ParticleButtonsPanel):
col = row.column()
col.itemL(text="Misc:")
- col.itemR(part, "gravity")
col.itemR(boids, "banking", slider=True)
col.itemR(boids, "height", slider=True)
- if part.physics_type=='NEWTON':
- sub.itemR(part, "size_deflect")
- sub.itemR(part, "die_on_collision")
- elif part.physics_type=='KEYED' or part.physics_type=='BOIDS':
+ if part.physics_type=='KEYED' or part.physics_type=='BOIDS':
if part.physics_type=='BOIDS':
layout.itemL(text="Relations:")
@@ -505,18 +461,18 @@ class PARTICLE_PT_boidbrain(ParticleButtonsPanel):
boids = context.particle_system.settings.boids
layout = self.layout
- layout.enabled = particle_panel_enabled(psys)
+ layout.enabled = particle_panel_enabled(context.particle_system)
# Currently boids can only use the first state so these are commented out for now.
#row = layout.row()
#row.template_list(boids, "states", boids, "active_boid_state_index", compact="True")
#col = row.row()
#subrow = col.row(align=True)
- #subrow.itemO("boid.boidstate_add", icon='ICON_ZOOMIN', text="")
- #subrow.itemO("boid.boidstate_del", icon='ICON_ZOOMOUT', text="")
+ #subrow.itemO("boid.state_add", icon='ICON_ZOOMIN', text="")
+ #subrow.itemO("boid.state_del", icon='ICON_ZOOMOUT', text="")
#subrow = row.row(align=True)
- #subrow.itemO("boid.boidstate_move_up", icon='VICON_MOVE_UP', text="")
- #subrow.itemO("boid.boidstate_move_down", icon='VICON_MOVE_DOWN', text="")
+ #subrow.itemO("boid.state_move_up", icon='VICON_MOVE_UP', text="")
+ #subrow.itemO("boid.state_move_down", icon='VICON_MOVE_DOWN', text="")
state = boids.active_boid_state
@@ -535,12 +491,12 @@ class PARTICLE_PT_boidbrain(ParticleButtonsPanel):
col = row.column()
subrow = col.row()
subcol = subrow.column(align=True)
- subcol.item_menu_enumO("boid.boidrule_add", "type", icon='ICON_ZOOMIN', text="")
- subcol.itemO("boid.boidrule_del", icon='ICON_ZOOMOUT', text="")
+ subcol.item_menu_enumO("boid.rule_add", "type", icon='ICON_ZOOMIN', text="")
+ subcol.itemO("boid.rule_del", icon='ICON_ZOOMOUT', text="")
subrow = col.row()
subcol = subrow.column(align=True)
- subcol.itemO("boid.boidrule_move_up", icon='VICON_MOVE_UP', text="")
- subcol.itemO("boid.boidrule_move_down", icon='VICON_MOVE_DOWN', text="")
+ subcol.itemO("boid.rule_move_up", icon='VICON_MOVE_UP', text="")
+ subcol.itemO("boid.rule_move_down", icon='VICON_MOVE_DOWN', text="")
rule = state.active_boid_rule
@@ -671,16 +627,37 @@ class PARTICLE_PT_render(ParticleButtonsPanel):
elif part.ren_as == 'OBJECT':
sub.itemR(part, "dupli_object")
+ sub.itemR(part, "use_global_dupli")
elif part.ren_as == 'GROUP':
sub.itemR(part, "dupli_group")
split = layout.split()
sub = split.column()
sub.itemR(part, "whole_group")
+ colsub = sub.column()
+ colsub.active = part.whole_group == False
+ colsub.itemR(part, "use_group_count")
+
sub = split.column()
colsub = sub.column()
colsub.active = part.whole_group == False
+ colsub.itemR(part, "use_global_dupli")
colsub.itemR(part, "rand_group")
+ if part.use_group_count and not part.whole_group:
+ row = layout.row()
+ row.template_list(part, "dupliweights", part, "active_dupliweight_index")
+
+ col = row.column()
+ subrow = col.row()
+ subcol = subrow.column(align=True)
+ subcol.itemO("particle.dupliob_move_up", icon='VICON_MOVE_UP', text="")
+ subcol.itemO("particle.dupliob_move_down", icon='VICON_MOVE_DOWN', text="")
+
+ weight = part.active_dupliweight
+ if weight:
+ row = layout.row()
+ row.itemR(weight, "count")
+
elif part.ren_as == 'BILLBOARD':
sub.itemL(text="Align:")
@@ -857,30 +834,41 @@ class PARTICLE_PT_children(ParticleButtonsPanel):
sub = split.column()
sub.itemR(part, "kink_shape", slider=True)
-class PARTICLE_PT_effectors(ParticleButtonsPanel):
- __label__ = "Effectors"
+class PARTICLE_PT_field_weights(ParticleButtonsPanel):
+ __label__ = "Field Weights"
+ __default_closed__ = True
+
+ def draw(self, context):
+ part = context.particle_system.settings
+ effector_weights_ui(self, part.effector_weights)
+
+ if part.type == 'HAIR':
+ self.layout.itemR(part.effector_weights, "do_growing_hair")
+
+class PARTICLE_PT_force_fields(ParticleButtonsPanel):
+ __label__ = "Force Field Settings"
__default_closed__ = True
def draw(self, context):
layout = self.layout
-
- psys = context.particle_system
- part = psys.settings
+ part = context.particle_system.settings
- layout.itemR(part, "effector_group")
+ layout.itemR(part, "self_effect")
- layout.itemR(part, "eweight_all", slider=True)
+ split = layout.split(percentage=0.2)
+ split.itemL(text="Type 1:")
+ split.itemR(part.force_field_1, "type",text="")
+ basic_force_field_settings_ui(self, part.force_field_1)
+ basic_force_field_falloff_ui(self, part.force_field_1)
- layout.itemS()
- layout.itemR(part, "eweight_spherical", slider=True)
- layout.itemR(part, "eweight_vortex", slider=True)
- layout.itemR(part, "eweight_magnetic", slider=True)
- layout.itemR(part, "eweight_wind", slider=True)
- layout.itemR(part, "eweight_curveguide", slider=True)
- layout.itemR(part, "eweight_texture", slider=True)
- layout.itemR(part, "eweight_harmonic", slider=True)
- layout.itemR(part, "eweight_charge", slider=True)
- layout.itemR(part, "eweight_lennardjones", slider=True)
+ if part.force_field_1.type != 'NONE':
+ layout.itemL(text="")
+
+ split = layout.split(percentage=0.2)
+ split.itemL(text="Type 2:")
+ split.itemR(part.force_field_2, "type",text="")
+ basic_force_field_settings_ui(self, part.force_field_2)
+ basic_force_field_falloff_ui(self, part.force_field_2)
class PARTICLE_PT_vertexgroups(ParticleButtonsPanel):
__label__ = "Vertexgroups"
@@ -951,11 +939,13 @@ bpy.types.register(PARTICLE_PT_particles)
bpy.types.register(PARTICLE_PT_hair_dynamics)
bpy.types.register(PARTICLE_PT_cache)
bpy.types.register(PARTICLE_PT_emission)
-bpy.types.register(PARTICLE_PT_initial)
+bpy.types.register(PARTICLE_PT_velocity)
+bpy.types.register(PARTICLE_PT_rotation)
bpy.types.register(PARTICLE_PT_physics)
bpy.types.register(PARTICLE_PT_boidbrain)
bpy.types.register(PARTICLE_PT_render)
bpy.types.register(PARTICLE_PT_draw)
bpy.types.register(PARTICLE_PT_children)
-bpy.types.register(PARTICLE_PT_effectors)
+bpy.types.register(PARTICLE_PT_field_weights)
+bpy.types.register(PARTICLE_PT_force_fields)
bpy.types.register(PARTICLE_PT_vertexgroups)
diff --git a/release/scripts/ui/buttons_physics_cloth.py b/release/scripts/ui/buttons_physics_cloth.py
index f6493951a34..e25497b3713 100644
--- a/release/scripts/ui/buttons_physics_cloth.py
+++ b/release/scripts/ui/buttons_physics_cloth.py
@@ -1,7 +1,8 @@
import bpy
-from buttons_particle import point_cache_ui
+from buttons_physics_common import point_cache_ui
+from buttons_physics_common import effector_weights_ui
def cloth_panel_enabled(md):
return md.point_cache.baked==False
@@ -49,10 +50,11 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel):
split = layout.split()
col = split.column()
- col.itemL(text="Quality:")
- col.itemR(cloth, "quality", text="Steps",slider=True)
- col.itemL(text="Gravity:")
- col.itemR(cloth, "gravity", text="")
+ col.itemL(text="Material:")
+ sub = col.column(align=True)
+ sub.itemR(cloth, "mass")
+ sub.itemR(cloth, "structural_stiffness", text="Structural")
+ sub.itemR(cloth, "bending_stiffness", text="Bending")
col.itemR(cloth, "pin_cloth", text="Pin")
sub = col.column(align=True)
@@ -61,18 +63,18 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel):
sub.item_pointerR(cloth, "mass_vertex_group", ob, "vertex_groups", text="")
col = split.column()
- col.itemL(text="Presets...")
- col.itemL(text="TODO!")
- col.itemL(text="Material:")
- sub = col.column(align=True)
- sub.itemR(cloth, "mass")
- sub.itemR(cloth, "structural_stiffness", text="Structural")
- sub.itemR(cloth, "bending_stiffness", text="Bending")
+
col.itemL(text="Damping:")
sub = col.column(align=True)
sub.itemR(cloth, "spring_damping", text="Spring")
sub.itemR(cloth, "air_damping", text="Air")
+ col.itemL(text="Presets...")
+ col.itemL(text="TODO!")
+
+ col.itemL(text="Quality:")
+ col.itemR(cloth, "quality", text="Steps",slider=True)
+
# Disabled for now
"""
if cloth.mass_vertex_group:
@@ -165,8 +167,20 @@ class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel):
sub = col.column(align=True)
sub.itemR(cloth, "bending_stiffness_max", text="Max")
sub.item_pointerR(cloth, "bending_vertex_group", ob, "vertex_groups", text="")
+
+class PHYSICS_PT_cloth_field_weights(PhysicButtonsPanel):
+ __label__ = "Cloth Field Weights"
+ __default_closed__ = True
+
+ def poll(self, context):
+ return (context.cloth)
+
+ def draw(self, context):
+ cloth = context.cloth.settings
+ effector_weights_ui(self, cloth.effector_weights)
bpy.types.register(PHYSICS_PT_cloth)
bpy.types.register(PHYSICS_PT_cloth_cache)
bpy.types.register(PHYSICS_PT_cloth_collision)
bpy.types.register(PHYSICS_PT_cloth_stiffness)
+bpy.types.register(PHYSICS_PT_cloth_field_weights)
diff --git a/release/scripts/ui/buttons_physics_common.py b/release/scripts/ui/buttons_physics_common.py
new file mode 100644
index 00000000000..17ac1b2bbaa
--- /dev/null
+++ b/release/scripts/ui/buttons_physics_common.py
@@ -0,0 +1,154 @@
+import bpy
+
+def point_cache_ui(self, cache, enabled, particles, smoke):
+ layout = self.layout
+ layout.set_context_pointer("PointCache", cache)
+
+ row = layout.row()
+ row.template_list(cache, "point_cache_list", cache, "active_point_cache_index", rows=2 )
+ col = row.column(align=True)
+ col.itemO("ptcache.add_new", icon='ICON_ZOOMIN', text="")
+ col.itemO("ptcache.remove", icon='ICON_ZOOMOUT', text="")
+
+ row = layout.row()
+ row.itemL(text="File Name:")
+ if particles:
+ row.itemR(cache, "external")
+
+ if cache.external:
+ split = layout.split(percentage=0.80)
+ split.itemR(cache, "name", text="")
+ split.itemR(cache, "index", text="")
+
+ layout.itemL(text="File Path:")
+ layout.itemR(cache, "filepath", text="")
+
+ layout.itemL(text=cache.info)
+ else:
+ layout.itemR(cache, "name", text="")
+
+ if not particles:
+ row = layout.row()
+ row.enabled = enabled
+ row.itemR(cache, "start_frame")
+ row.itemR(cache, "end_frame")
+
+ row = layout.row()
+
+ if cache.baked == True:
+ row.itemO("ptcache.free_bake", text="Free Bake")
+ else:
+ row.item_booleanO("ptcache.bake", "bake", True, text="Bake")
+
+ sub = row.row()
+ sub.enabled = (cache.frames_skipped or cache.outdated) and enabled
+ sub.itemO("ptcache.bake", "bake", False, text="Calculate to Current Frame")
+
+ row = layout.row()
+ row.enabled = enabled
+ row.itemO("ptcache.bake_from_cache", text="Current Cache to Bake")
+ if not smoke:
+ row.itemR(cache, "step");
+
+ if not smoke:
+ row = layout.row()
+ sub = row.row()
+ sub.enabled = enabled
+ sub.itemR(cache, "quick_cache")
+ row.itemR(cache, "disk_cache")
+
+ layout.itemL(text=cache.info)
+
+ layout.itemS()
+
+ row = layout.row()
+ row.item_booleanO("ptcache.bake_all", "bake", True, text="Bake All Dynamics")
+ row.itemO("ptcache.free_bake_all", text="Free All Bakes")
+ layout.itemO("ptcache.bake_all", "bake", False, text="Update All Dynamics to current frame")
+
+def effector_weights_ui(self, weights):
+ layout = self.layout
+
+ layout.itemR(weights, "group")
+
+ split = layout.split()
+ split.itemR(weights, "gravity", slider=True)
+ split.itemR(weights, "all", slider=True)
+
+ layout.itemS()
+
+ flow = layout.column_flow()
+ flow.itemR(weights, "force", slider=True)
+ flow.itemR(weights, "vortex", slider=True)
+ flow.itemR(weights, "magnetic", slider=True)
+ flow.itemR(weights, "wind", slider=True)
+ flow.itemR(weights, "curveguide", slider=True)
+ flow.itemR(weights, "texture", slider=True)
+ flow.itemR(weights, "harmonic", slider=True)
+ flow.itemR(weights, "charge", slider=True)
+ flow.itemR(weights, "lennardjones", slider=True)
+ flow.itemR(weights, "turbulence", slider=True)
+ flow.itemR(weights, "drag", slider=True)
+ flow.itemR(weights, "boid", slider=True)
+
+def basic_force_field_settings_ui(self, field):
+ layout = self.layout
+ split = layout.split()
+
+ if not field or field.type == 'NONE':
+ return
+
+ col = split.column()
+
+ if field.type == 'DRAG':
+ col.itemR(field, "linear_drag", text="Linear")
+ else:
+ col.itemR(field, "strength")
+
+ if field.type == 'TURBULENCE':
+ col.itemR(field, "size")
+ col.itemR(field, "flow")
+ elif field.type == 'HARMONIC':
+ col.itemR(field, "harmonic_damping", text="Damping")
+ elif field.type == 'VORTEX' and field.shape != 'POINT':
+ col.itemR(field, "inflow")
+ elif field.type == 'DRAG':
+ col.itemR(field, "quadratic_drag", text="Quadratic")
+ else:
+ col.itemR(field, "flow")
+
+ col = split.column()
+ col.itemR(field, "noise")
+ col.itemR(field, "seed")
+ if field.type == 'TURBULENCE':
+ col.itemR(field, "global_coordinates", text="Global")
+
+ row = layout.row()
+ row.itemL(text="Effect point:")
+ row.itemR(field, "do_location")
+ row.itemR(field, "do_rotation")
+
+
+def basic_force_field_falloff_ui(self, field):
+ layout = self.layout
+ split = layout.split(percentage=0.35)
+
+ if not field or field.type == 'NONE':
+ return
+
+ col = split.column()
+ col.itemR(field, "z_direction", text="")
+ col.itemR(field, "use_min_distance", text="Use Minimum")
+ col.itemR(field, "use_max_distance", text="Use Maximum")
+ col.itemR(field, "do_absorption")
+
+ col = split.column()
+ col.itemR(field, "falloff_power", text="Power")
+
+ sub = col.column()
+ sub.active = field.use_min_distance
+ sub.itemR(field, "minimum_distance", text="Distance")
+
+ sub = col.column()
+ sub.active = field.use_max_distance
+ sub.itemR(field, "maximum_distance", text="Distance") \ No newline at end of file
diff --git a/release/scripts/ui/buttons_physics_field.py b/release/scripts/ui/buttons_physics_field.py
index 7d14690856a..9aec0404ab1 100644
--- a/release/scripts/ui/buttons_physics_field.py
+++ b/release/scripts/ui/buttons_physics_field.py
@@ -1,6 +1,9 @@
import bpy
+from buttons_physics_common import basic_force_field_settings_ui
+from buttons_physics_common import basic_force_field_falloff_ui
+
class PhysicButtonsPanel(bpy.types.Panel):
__space_type__ = 'PROPERTIES'
__region_type__ = 'WINDOW'
@@ -12,61 +15,55 @@ class PhysicButtonsPanel(bpy.types.Panel):
class PHYSICS_PT_field(PhysicButtonsPanel):
__label__ = "Force Fields"
- __default_closed__ = True
def draw(self, context):
layout = self.layout
ob = context.object
field = ob.field
-
- #layout.active = field.enabled
split = layout.split(percentage=0.2)
-
split.itemL(text="Type:")
split.itemR(field, "type",text="")
+
+ if field.type not in ('NONE', 'GUIDE', 'TEXTURE'):
+ split = layout.split(percentage=0.2)
+ #split = layout.row()
+ split.itemL(text="Shape:")
+ split.itemR(field, "shape", text="")
split = layout.split()
- if field.type == 'GUIDE':
- layout.itemR(field, "guide_path_add")
-
- elif field.type == 'WIND':
- split.itemR(field, "strength")
-
+ if field.type == 'NONE':
+ return # nothing to draw
+ elif field.type == 'GUIDE':
col = split.column()
- col.itemR(field, "noise")
- col.itemR(field, "seed")
-
- elif field.type == 'VORTEX':
- split.itemR(field, "strength")
- split.itemL()
-
- elif field.type in ('SPHERICAL', 'CHARGE', 'LENNARDJ'):
- split.itemR(field, "strength")
+ col.itemR(field, "guide_minimum")
+ col.itemR(field, "guide_free")
+ col.itemR(field, "falloff_power")
+ col.itemR(field, "guide_path_add")
col = split.column()
- col.itemR(field, "planar")
- col.itemR(field, "surface")
-
- elif field.type == 'BOID':
- split.itemR(field, "strength")
- split.itemR(field, "surface")
+ col.itemL(text="Clumping:")
+ col.itemR(field, "guide_clump_amount")
+ col.itemR(field, "guide_clump_shape")
- elif field.type == 'MAGNET':
- split.itemR(field, "strength")
- split.itemR(field, "planar")
-
- elif field.type == 'HARMONIC':
- col = split.column()
- col.itemR(field, "strength")
- col.itemR(field, "harmonic_damping", text="Damping")
-
- col = split.column()
- col.itemR(field, "planar")
- col.itemR(field, "surface")
+ row = layout.row()
+ row.itemR(field, "use_max_distance")
+ sub = row.row()
+ sub.active = field.use_max_distance
+ sub.itemR(field, "maximum_distance")
+ layout.itemS()
+
+ layout.itemR(field, "guide_kink_type")
+ if (field.guide_kink_type != "NONE"):
+ layout.itemR(field, "guide_kink_axis")
+
+ flow = layout.column_flow()
+ flow.itemR(field, "guide_kink_frequency")
+ flow.itemR(field, "guide_kink_shape")
+ flow.itemR(field, "guide_kink_amplitude")
elif field.type == 'TEXTURE':
col = split.column()
col.itemR(field, "strength")
@@ -78,29 +75,15 @@ class PHYSICS_PT_field(PhysicButtonsPanel):
col.itemR(field, "use_coordinates")
col.itemR(field, "root_coordinates")
col.itemR(field, "force_2d")
+ else :
+ basic_force_field_settings_ui(self, field)
- if field.type in ('HARMONIC', 'SPHERICAL', 'CHARGE', 'WIND', 'VORTEX', 'TEXTURE', 'MAGNET', 'BOID'):
+ if field.type not in ('NONE', 'GUIDE'):
layout.itemL(text="Falloff:")
layout.itemR(field, "falloff_type", expand=True)
- split = layout.split(percentage=0.35)
-
- col = split.column()
- col.itemR(field, "positive_z", text="Positive Z")
- col.itemR(field, "use_min_distance", text="Use Minimum")
- col.itemR(field, "use_max_distance", text="Use Maximum")
-
- col = split.column()
- col.itemR(field, "falloff_power", text="Power")
-
- sub = col.column()
- sub.active = field.use_min_distance
- sub.itemR(field, "minimum_distance", text="Distance")
-
- sub = col.column()
- sub.active = field.use_max_distance
- sub.itemR(field, "maximum_distance", text="Distance")
+ basic_force_field_falloff_ui(self, field)
if field.falloff_type == 'CONE':
layout.itemS()
@@ -143,21 +126,10 @@ class PHYSICS_PT_field(PhysicButtonsPanel):
sub = col.column()
sub.active = field.use_radial_max
sub.itemR(field, "radial_maximum", text="Distance")
-
- #if ob.type in 'CURVE':
- #if field.type == 'GUIDE':
- #colsub = col.column(align=True)
-
- #if field.type != 'NONE':
- #layout.itemR(field, "strength")
-
- #if field.type in ('HARMONIC', 'SPHERICAL', 'CHARGE', "LENNARDj"):
- #if ob.type in ('MESH', 'SURFACE', 'FONT', 'CURVE'):
- #layout.itemR(field, "surface")
class PHYSICS_PT_collision(PhysicButtonsPanel):
__label__ = "Collision"
- __default_closed__ = True
+ #__default_closed__ = True
def poll(self, context):
ob = context.object
@@ -182,16 +154,18 @@ class PHYSICS_PT_collision(PhysicButtonsPanel):
#row.itemR(md, "render", text="")
#row.itemR(md, "realtime", text="")
- settings = md.settings
+ coll = md.settings
else:
# add modifier
split.item_enumO("object.modifier_add", "type", 'COLLISION', text="Add")
split.itemL()
- settings = None
+ coll = None
- if settings:
+ if coll:
+ settings = context.object.collision
+
layout.active = settings.enabled
split = layout.split()
diff --git a/release/scripts/ui/buttons_physics_softbody.py b/release/scripts/ui/buttons_physics_softbody.py
index 3bdbb1b8b90..cd66df00044 100644
--- a/release/scripts/ui/buttons_physics_softbody.py
+++ b/release/scripts/ui/buttons_physics_softbody.py
@@ -1,7 +1,8 @@
import bpy
-from buttons_particle import point_cache_ui
+from buttons_physics_common import point_cache_ui
+from buttons_physics_common import effector_weights_ui
def softbody_panel_enabled(md):
return md.point_cache.baked==False
@@ -55,7 +56,6 @@ class PHYSICS_PT_softbody(PhysicButtonsPanel):
col = split.column()
col.itemL(text="Simulation:")
- col.itemR(softbody, "gravity")
col.itemR(softbody, "speed")
class PHYSICS_PT_softbody_cache(PhysicButtonsPanel):
@@ -222,6 +222,18 @@ class PHYSICS_PT_softbody_solver(PhysicButtonsPanel):
layout.itemL(text="Diagnostics:")
layout.itemR(softbody, "diagnose")
+
+class PHYSICS_PT_softbody_field_weights(PhysicButtonsPanel):
+ __label__ = "Soft Body Field Weights"
+ __default_closed__ = True
+
+ def poll(self, context):
+ return (context.soft_body)
+
+ def draw(self, context):
+ md = context.soft_body
+ softbody = md.settings
+ effector_weights_ui(self, softbody.effector_weights)
bpy.types.register(PHYSICS_PT_softbody)
bpy.types.register(PHYSICS_PT_softbody_cache)
@@ -229,3 +241,4 @@ bpy.types.register(PHYSICS_PT_softbody_goal)
bpy.types.register(PHYSICS_PT_softbody_edge)
bpy.types.register(PHYSICS_PT_softbody_collision)
bpy.types.register(PHYSICS_PT_softbody_solver)
+bpy.types.register(PHYSICS_PT_softbody_field_weights)
diff --git a/release/scripts/ui/buttons_scene.py b/release/scripts/ui/buttons_scene.py
index 69cf79ddc85..666bbacea50 100644
--- a/release/scripts/ui/buttons_scene.py
+++ b/release/scripts/ui/buttons_scene.py
@@ -1,6 +1,14 @@
import bpy
+class SceneButtonsPanel(bpy.types.Panel):
+ __space_type__ = 'PROPERTIES'
+ __region_type__ = 'WINDOW'
+ __context__ = "scene"
+
+ def poll(self, context):
+ return (context.scene != None)
+
class RenderButtonsPanel(bpy.types.Panel):
__space_type__ = 'PROPERTIES'
__region_type__ = 'WINDOW'
@@ -455,7 +463,102 @@ class SCENE_PT_unit(RenderButtonsPanel):
row.active = (unit.system != 'NONE')
row.itemR(unit, "scale_length", text="Scale")
row.itemR(unit, "use_separate")
+
+class SCENE_PT_keying_sets(SceneButtonsPanel):
+ __label__ = "Keying Sets"
+ __default_closed__ = True
+
+ def draw(self, context):
+ layout = self.layout
+
+ scene = context.scene
+
+ row = layout.row()
+
+ col = row.column()
+ col.template_list(scene, "keying_sets", scene, "active_keying_set_index", rows=2)
+
+ col = row.column(align=True)
+ col.itemO("anim.keying_set_add", icon='ICON_ZOOMIN', text="")
+ col.itemO("anim.keying_set_remove", icon='ICON_ZOOMOUT', text="")
+
+ ks = scene.active_keying_set
+ if ks:
+ row = layout.row()
+
+ col = row.column()
+ col.itemR(ks, "name")
+ col.itemR(ks, "absolute")
+
+ col = row.column()
+ col.itemL(text="Keyframing Settings:")
+ col.itemR(ks, "insertkey_needed", text="Needed")
+ col.itemR(ks, "insertkey_visual", text="Visual")
+
+class SCENE_PT_keying_set_paths(SceneButtonsPanel):
+ __label__ = "Active Keying Set"
+ __default_closed__ = True
+
+ def poll(self, context):
+ return (context.scene != None) and (context.scene.active_keying_set != None)
+
+ def draw(self, context):
+ layout = self.layout
+
+ scene = context.scene
+ ks = scene.active_keying_set
+
+ row = layout.row()
+
+ col = row.column()
+ col.template_list(ks, "paths", ks, "active_path_index", rows=2)
+
+ col = row.column(align=True)
+ col.itemO("anim.keying_set_path_add", icon='ICON_ZOOMIN', text="")
+ col.itemO("anim.keying_set_path_remove", icon='ICON_ZOOMOUT', text="")
+
+ ksp = ks.active_path
+ if ksp:
+ col = layout.column()
+ col.itemL(text="Target:")
+ col.itemR(ksp, "id")
+ col.itemR(ksp, "rna_path")
+
+
+ row = layout.row()
+
+ col = row.column()
+ col.itemL(text="Array Target:")
+ col.itemR(ksp, "entire_array")
+ if ksp.entire_array == False:
+ col.itemR(ksp, "array_index")
+
+ col = row.column()
+ col.itemL(text="F-Curve Grouping:")
+ col.itemR(ksp, "grouping")
+ if ksp.grouping == 'NAMED':
+ col.itemR(ksp, "group")
+
+
+
+
+class SCENE_PT_physics(RenderButtonsPanel):
+ __label__ = "Gravity"
+ COMPAT_ENGINES = set(['BLENDER_RENDER'])
+ def draw_header(self, context):
+ self.layout.itemR(context.scene, "use_gravity", text="")
+
+ def draw(self, context):
+ layout = self.layout
+
+ scene = context.scene
+
+ layout.active = scene.use_gravity
+
+ layout.itemR(scene, "gravity", text="")
+
+
bpy.types.register(SCENE_PT_render)
bpy.types.register(SCENE_PT_layers)
bpy.types.register(SCENE_PT_dimensions)
@@ -467,3 +570,6 @@ bpy.types.register(SCENE_PT_performance)
bpy.types.register(SCENE_PT_post_processing)
bpy.types.register(SCENE_PT_stamp)
bpy.types.register(SCENE_PT_unit)
+bpy.types.register(SCENE_PT_keying_sets)
+bpy.types.register(SCENE_PT_keying_set_paths)
+bpy.types.register(SCENE_PT_physics)
diff --git a/release/scripts/ui/buttons_texture.py b/release/scripts/ui/buttons_texture.py
index c95fa266aaa..c4866edcaaa 100644
--- a/release/scripts/ui/buttons_texture.py
+++ b/release/scripts/ui/buttons_texture.py
@@ -99,8 +99,13 @@ class TEXTURE_PT_colors(TextureButtonsPanel):
layout.template_color_ramp(tex, "color_ramp", expand=True)
split = layout.split()
-
- split.itemR(tex, "rgb_factor", text="Multiply RGB")
+
+ col = split.column()
+ col.itemL(text="RGB Multiply:")
+ sub = col.column(align=True)
+ sub.itemR(tex, "factor_red", text="R")
+ sub.itemR(tex, "factor_green", text="G")
+ sub.itemR(tex, "factor_blue", text="B")
col = split.column()
col.itemL(text="Adjust:")
@@ -175,14 +180,14 @@ class TEXTURE_PT_mapping(TextureSlotPanel):
row.itemR(tex, "z_mapping", text="")
if br:
- layout.itemR(tex, "brush_map_mode", expand=True)
+ layout.itemR(tex, "map_mode", expand=True)
row = layout.row()
- row.active = tex.brush_map_mode in ('FIXED', 'TILED')
+ row.active = tex.map_mode in ('FIXED', 'TILED')
row.itemR(tex, "angle")
row = layout.row()
- row.active = tex.brush_map_mode in ('TILED', '3D')
+ row.active = tex.map_mode in ('TILED', '3D')
row.column().itemR(tex, "size")
else:
row = layout.row()
@@ -246,13 +251,14 @@ class TEXTURE_PT_influence(TextureSlotPanel):
col = split.column()
factor_but(col, tex.map_density, "map_density", "density_factor", "Density")
factor_but(col, tex.map_emission, "map_emission", "emission_factor", "Emission")
- factor_but(col, tex.map_absorption, "map_absorption", "absorption_factor", "Absorption")
factor_but(col, tex.map_scattering, "map_scattering", "scattering_factor", "Scattering")
+ factor_but(col, tex.map_reflection, "map_reflection", "reflection_factor", "Reflection")
col = split.column()
col.itemL(text=" ")
factor_but(col, tex.map_alpha, "map_coloremission", "coloremission_factor", "Emission Color")
- factor_but(col, tex.map_colorabsorption, "map_colorabsorption", "colorabsorption_factor", "Absorption Color")
+ factor_but(col, tex.map_colortransmission, "map_colortransmission", "colortransmission_factor", "Transmission Color")
+ factor_but(col, tex.map_colorreflection, "map_colorreflection", "colorreflection_factor", "Reflection Color")
elif la:
row = layout.row()
@@ -642,6 +648,7 @@ class TEXTURE_PT_voxeldata(TextureButtonsPanel):
row.itemR(vd, "still_frame_number")
layout.itemR(vd, "interpolation")
+ layout.itemR(vd, "extension")
layout.itemR(vd, "intensity")
class TEXTURE_PT_pointdensity(TextureButtonsPanel):
diff --git a/release/scripts/ui/space_info.py b/release/scripts/ui/space_info.py
index c1a2b1f4275..49261981ac2 100644
--- a/release/scripts/ui/space_info.py
+++ b/release/scripts/ui/space_info.py
@@ -144,6 +144,10 @@ class INFO_MT_add(bpy.types.Menu):
layout.item_enumO("object.add", "type", 'CAMERA', icon='ICON_OUTLINER_OB_CAMERA')
layout.item_menu_enumO("object.lamp_add", "type", 'LAMP', text="Lamp", icon='ICON_OUTLINER_OB_LAMP')
+
+ layout.itemS()
+
+ layout.item_menu_enumO("object.effector_add", "type", 'EMPTY', text="Force Field", icon='ICON_OUTLINER_OB_EMPTY')
class INFO_MT_game(bpy.types.Menu):
__space_type__ = 'INFO'
diff --git a/release/scripts/ui/space_userpref.py b/release/scripts/ui/space_userpref.py
index 9798e0ccab6..a9126d2c7f1 100644
--- a/release/scripts/ui/space_userpref.py
+++ b/release/scripts/ui/space_userpref.py
@@ -314,6 +314,7 @@ class USERPREF_PT_system(bpy.types.Panel):
sub1.itemL(text="OpenGL:")
sub1.itemR(system, "clip_alpha", slider=True)
sub1.itemR(system, "use_mipmaps")
+ sub1.itemR(system, "use_vbos")
sub1.itemL(text="Window Draw Method:")
sub1.row().itemR(system, "window_draw_method", expand=True)
sub1.itemL(text="Textures:")
diff --git a/release/scripts/ui/space_view3d.py b/release/scripts/ui/space_view3d.py
index 23f3b8a10ac..a270e053126 100644
--- a/release/scripts/ui/space_view3d.py
+++ b/release/scripts/ui/space_view3d.py
@@ -1285,6 +1285,26 @@ class VIEW3D_PT_background_image(bpy.types.Panel):
col.itemR(bg, "offset_x", text="X")
col.itemR(bg, "offset_y", text="Y")
+class VIEW3D_PT_transform_orientations(bpy.types.Panel):
+ __space_type__ = 'VIEW_3D'
+ __region_type__ = 'UI'
+ __label__ = "Transform Orientations"
+ __default_closed__ = True
+
+ def poll(self, context):
+ view = context.space_data
+ return (view)
+
+ def draw(self, context):
+ layout = self.layout
+
+ view = context.space_data
+
+ col = layout.column()
+ col.itemO("TFM_OT_select_orientation", text="Select")
+ col.itemO("TFM_OT_create_orientation", text="Create")
+ col.itemO("TFM_OT_delete_orientation", text="Delete")
+
bpy.types.register(VIEW3D_HT_header) # Header
bpy.types.register(VIEW3D_MT_view) #View Menus
@@ -1360,3 +1380,4 @@ bpy.types.register(VIEW3D_PT_3dview_display)
bpy.types.register(VIEW3D_PT_3dview_meshdisplay)
bpy.types.register(VIEW3D_PT_3dview_curvedisplay)
bpy.types.register(VIEW3D_PT_background_image)
+bpy.types.register(VIEW3D_PT_transform_orientations) \ No newline at end of file
diff --git a/source/Makefile b/source/Makefile
index 5a071a10a9c..45a15e822dc 100644
--- a/source/Makefile
+++ b/source/Makefile
@@ -249,7 +249,7 @@ PULIB += $(OCGDIR)/blender/ed_graph/$(DEBUG_DIR)libed_graph.a
PULIB += $(OCGDIR)/blender/ed_node/$(DEBUG_DIR)libed_node.a
PULIB += $(OCGDIR)/blender/ed_outliner/$(DEBUG_DIR)libed_outliner.a
PULIB += $(OCGDIR)/blender/ed_time/$(DEBUG_DIR)libed_time.a
-PULIB += $(OCGDIR)/blender/ed_preview/$(DEBUG_DIR)libed_preview.a
+PULIB += $(OCGDIR)/blender/ed_render/$(DEBUG_DIR)libed_render.a
PULIB += $(OCGDIR)/blender/ed_view3d/$(DEBUG_DIR)libed_view3d.a
PULIB += $(OCGDIR)/blender/ed_interface/$(DEBUG_DIR)libed_interface.a
PULIB += $(OCGDIR)/blender/ed_object/$(DEBUG_DIR)libed_object.a
diff --git a/source/blender/blenkernel/BKE_DerivedMesh.h b/source/blender/blenkernel/BKE_DerivedMesh.h
index 06103596be1..076747cb845 100644
--- a/source/blender/blenkernel/BKE_DerivedMesh.h
+++ b/source/blender/blenkernel/BKE_DerivedMesh.h
@@ -58,6 +58,7 @@ struct ModifierData;
struct MCol;
struct ColorBand;
struct GPUVertexAttribs;
+struct GPUDrawObject;
/* number of sub-elements each mesh element has (for interpolation) */
#define SUB_ELEMS_VERT 0
@@ -72,6 +73,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_blender.h b/source/blender/blenkernel/BKE_blender.h
index d60737d62fe..a79bf43c354 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 5
#define BLENDER_MINVERSION 250
#define BLENDER_MINSUBVERSION 0
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 e0df75f41b9..5ca8ad892ac 100644
--- a/source/blender/blenkernel/BKE_collision.h
+++ b/source/blender/blenkernel/BKE_collision.h
@@ -141,6 +141,15 @@ void interpolateOnTriangle ( float to[3], float v1[3], float v2[3], float v3[3],
/////////////////////////////////////////////////
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_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_image.h b/source/blender/blenkernel/BKE_image.h
index 47ab6f324d3..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);
@@ -135,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_node.h b/source/blender/blenkernel/BKE_node.h
index ea1707c19bf..b1e7dcaff02 100644
--- a/source/blender/blenkernel/BKE_node.h
+++ b/source/blender/blenkernel/BKE_node.h
@@ -426,7 +426,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_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 5850ddaca08..e9285782a1e 100644
--- a/source/blender/blenkernel/BKE_particle.h
+++ b/source/blender/blenkernel/BKE_particle.h
@@ -76,39 +76,18 @@ typedef struct ParticleSimulationData {
struct Object *ob;
struct ParticleSystem *psys;
struct ParticleSystemModifierData *psmd;
- float timestep;
+ struct ListBase *colliders;
} ParticleSimulationData;
-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;
-
- short type, psys_nbr;
-
- struct Object obcopy; /* for restoring transformation data */
- struct RNG *rng; /* random noise generator for e.g. wind */
-} ParticleEffectorCache;
-
-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 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 */
@@ -185,8 +164,8 @@ typedef struct 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
@@ -222,6 +201,8 @@ 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);
+void psys_check_group_weights(struct ParticleSettings *part);
+
/* free */
void psys_free_settings(struct ParticleSettings *part);
void psys_free_path_cache(struct ParticleSystem *psys, struct PTCacheEdit *edit);
@@ -244,7 +225,6 @@ 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);
void psys_reset(struct ParticleSystem *psys, int mode);
@@ -254,7 +234,8 @@ void psys_find_parents(struct ParticleSimulationData *sim);
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 ParticleSimulationData *sim, float cfra, int editupdate);
-int do_guide(struct Scene *scene, struct ParticleKey *state, int pa_num, float time, struct ListBase *lb);
+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);
@@ -273,9 +254,7 @@ void psys_make_billboard(ParticleBillboardData *bb, float xvec[3], float yvec[3]
/* particle_system.c */
struct ParticleSystem *psys_get_target_system(struct Object *ob, struct ParticleTarget *pt);
void psys_count_keyed_targets(struct ParticleSimulationData *sim);
-//void psys_get_reactor_target(struct ParticleSimulationData *sim, struct Object **target_ob, struct ParticleSystem **target_psys);
-
-int psys_update_effectors(ParticleSimulationData *sim, float cfra, int precalc);
+void psys_update_particle_tree(struct ParticleSystem *psys, float cfra);
void psys_make_temp_pointcache(struct Object *ob, struct ParticleSystem *psys);
void psys_get_pointcache_start_end(struct Scene *scene, ParticleSystem *psys, int *sfra, int *efra);
@@ -316,29 +295,17 @@ void psys_particle_on_dm(struct DerivedMesh *dm, int from, int index, int index_
/* particle_system.c */
void initialize_particle(struct ParticleSimulationData *sim, struct ParticleData *pa, int p);
-
-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(struct ParticleSimulationData *sim, int pa_no, struct ParticleData *pa, struct ParticleKey *state, float *texco, float *force_field, float *vel,float framestep, float cfra);
-void psys_end_effectors(struct ParticleSystem *psys);
-
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 ParticleSimulationData *sim, struct ParticleData *pa, float dtime, float cfra);
-
/* psys_reset */
#define PSYS_RESET_ALL 1
#define PSYS_RESET_DEPSGRAPH 2
#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/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c
index 43b9a63a2c1..86c272e3799 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.c
+++ b/source/blender/blenkernel/intern/DerivedMesh.c
@@ -84,6 +84,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"
@@ -218,7 +219,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);
@@ -491,14 +492,55 @@ static void emDM_drawMappedEdges(DerivedMesh *dm, int (*setDrawOptions)(void *us
}
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 = 0;
+ float *varray;
+ if( setDrawOptions == 0 ) {
+ 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(DerivedMesh *dm, int drawLooseEdges)
@@ -627,8 +669,8 @@ static void emDM_drawMappedFaces(DerivedMesh *dm, int (*setDrawOptions)(void *us
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);
@@ -659,41 +701,135 @@ static void emDM_drawMappedFaces(DerivedMesh *dm, int (*setDrawOptions)(void *us
}
}
} 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/action.c b/source/blender/blenkernel/intern/action.c
index b8dc9fd049d..7be763eae9d 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -511,16 +511,21 @@ void copy_pose (bPose **dst, bPose *src, int copycon)
outPose= MEM_callocN(sizeof(bPose), "pose");
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;
@@ -535,7 +540,7 @@ void init_pose_itasc(bItasc *itasc)
itasc->numiter = 100;
itasc->numstep = 4;
itasc->precision = 0.005f;
- itasc->flag = ITASC_AUTO_STEP|ITASC_INITIAL_REITERATION|ITASC_SIMULATION;
+ itasc->flag = ITASC_AUTO_STEP|ITASC_INITIAL_REITERATION;
itasc->feedback = 20.f;
itasc->maxvel = 50.f;
itasc->solver = ITASC_SOLVER_SDLS;
diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c
index e943d92a0b5..5cd901066f8 100644
--- a/source/blender/blenkernel/intern/anim.c
+++ b/source/blender/blenkernel/intern/anim.c
@@ -280,17 +280,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)
@@ -766,6 +776,7 @@ 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;
@@ -773,7 +784,7 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
ParticleKey state;
ParticleCacheKey *cache;
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;
@@ -803,6 +814,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)
@@ -821,18 +834,37 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
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 {
@@ -926,11 +958,18 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
else {
/* to give ipos in object correct offset */
where_is_object_time(scene, ob, ctime-pa_time);
+
+ 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
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c
index 07b7b6dc30c..47f5dd116d7 100644
--- a/source/blender/blenkernel/intern/anim_sys.c
+++ b/source/blender/blenkernel/intern/anim_sys.c
@@ -187,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);
@@ -213,7 +211,7 @@ static void make_local_strips(ListBase *strips)
for (strip=strips->first; strip; strip=strip->next) {
if (strip->act) make_local_action(strip->act);
- //if (strip->remap && strip->remap->target) make_local_action(strip->remap->target);
+ if (strip->remap && strip->remap->target) make_local_action(strip->remap->target);
make_local_strips(&strip->strips);
}
@@ -1466,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
@@ -1623,9 +1625,10 @@ 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);
diff --git a/source/blender/blenkernel/intern/boids.c b/source/blender/blenkernel/intern/boids.c
index 7c3f3a7876f..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->sim->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->sim->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->sim->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->sim->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->sim->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->sim->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) {
@@ -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->sim->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->sim->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->sim->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 */
@@ -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->sim->psys->particles;
set_boid_values(&val, boids, pa);
@@ -1208,7 +1181,8 @@ void boid_body(BoidBrainData *bbd, ParticleData *pa)
}
/* account for effectors */
- do_effectors(bbd->sim, p, pa, &pa->state, 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/bvhutils.c b/source/blender/blenkernel/intern/bvhutils.c
index d9e005811d0..f2526231d50 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 b20da0962a7..b9aa842b6dc 100644
--- a/source/blender/blenkernel/intern/cdderivedmesh.c
+++ b/source/blender/blenkernel/intern/cdderivedmesh.c
@@ -60,6 +60,7 @@
#include "MEM_guardedalloc.h"
+#include "gpu_buffers.h"
#include "GPU_draw.h"
#include "GPU_extensions.h"
#include "GPU_material.h"
@@ -176,10 +177,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)
@@ -190,28 +200,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();
}
}
@@ -221,16 +268,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)
@@ -240,14 +319,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))
@@ -266,58 +376,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)
@@ -341,43 +466,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);
@@ -390,85 +536,172 @@ static void cdDM_drawFacesTex_common(DerivedMesh *dm,
{
CDDerivedMesh *cddm = (CDDerivedMesh*) dm;
MVert *mv = cddm->mvert;
- MFace *mf = cddm->mface;
- MCol *mcol = dm->getFaceDataArray(dm, CD_MCOL);
+ MFace *mf = DM_get_face_data_layer(dm, CD_MFACE);
+ MCol *realcol = dm->getFaceDataArray(dm, CD_TEXTURE_MCOL);
float *nors= dm->getFaceDataArray(dm, CD_NORMAL);
MTFace *tf = DM_get_face_data_layer(dm, CD_MTFACE);
- int i, orig, *index = DM_get_face_data_layer(dm, CD_ORIGINDEX);
+ int i, j, orig, *index = DM_get_face_data_layer(dm, CD_ORIGINDEX);
+ int startFace = 0, lastFlag = 0xdeadbeef;
+ MCol *mcol = dm->getFaceDataArray(dm, CD_WEIGHT_MCOL);
+ if(!mcol)
+ mcol = dm->getFaceDataArray(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? &mcol[i*4]: 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->getNumFaces(dm)*4*3*sizeof(unsigned char), "cdDM_drawFacesTex_common");
+ for( i=0; i < dm->getNumFaces(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;
+ unsigned char *cp = NULL;
+
+ 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 );
}
}
@@ -486,79 +719,131 @@ static void cdDM_drawMappedFaces(DerivedMesh *dm, int (*setDrawOptions)(void *us
float *nors= dm->getFaceDataArray(dm, CD_NORMAL);
int i, orig, *index = DM_get_face_data_layer(dm, CD_ORIGINDEX);
- mc = DM_get_face_data_layer(dm, CD_WEIGHT_MCOL);
+
+ mc = DM_get_face_data_layer(dm, CD_ID_MCOL);
+ if(!mc)
+ mc = DM_get_face_data_layer(dm, CD_WEIGHT_MCOL);
if(!mc)
mc = DM_get_face_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();
}
}
@@ -586,106 +871,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(orig == ORIGINDEX_NONE)
+ continue;
+ else if(!setDrawOptions(userData, orig))
+ continue;
+ }
- if(tf) {
- new_transp = tf[a].transp;
+ if(tf) {
+ new_transp = tf[a].transp;
- if(new_transp != transp) {
- glEnd();
+ if(new_transp != transp) {
+ glEnd();
- if(new_transp == GPU_BLEND_SOLID && orig_transp != GPU_BLEND_SOLID)
- GPU_set_material_blend_mode(orig_transp);
- else
- GPU_set_material_blend_mode(new_transp);
- transp = new_transp;
+ 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);
+ 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 5cfbd5c18dc..74f88a77e63 100644
--- a/source/blender/blenkernel/intern/cloth.c
+++ b/source/blender/blenkernel/intern/cloth.c
@@ -153,6 +153,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)
@@ -402,6 +405,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();
@@ -411,6 +416,8 @@ static int do_step_cloth(Object *ob, ClothModifierData *clmd, DerivedMesh *resul
tend();
+ pdEndEffectors(&effectors);
+
// printf ( "%f\n", ( float ) tval() );
return ret;
diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c
index aa4aae2422c..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"
@@ -1392,6 +1392,97 @@ Object **get_collisionobjects(Scene *scene, Object *self, int *numcollobj)
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;
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c
index 705d0b66d7f..28aaadea9c3 100644
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@ -726,6 +726,10 @@ const LayerTypeInfo LAYERTYPEINFO[CD_NUMTYPES] = {
layerFree_mdisps, layerInterp_mdisps, layerSwap_mdisps, NULL},
{sizeof(MCol)*4, "MCol", 4, "WeightCol", NULL, NULL, layerInterp_mcol,
layerSwap_mcol, layerDefault_mcol},
+ {sizeof(MCol)*4, "MCol", 4, "IDCol", NULL, NULL, layerInterp_mcol,
+ layerSwap_mcol, layerDefault_mcol},
+ {sizeof(MCol)*4, "MCol", 4, "TexturedCol", 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 4c2b2f3ec12..a8cec6070a0 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,14 +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;
- ParticleSimulationData sim = {scene, ob, psys, NULL};
ParticleSettings *part= psys->part;
+ ListBase *effectors = NULL;
+ EffectorCache *eff;
dag_add_relation(dag, node, node, DAG_RL_OB_DATA, "Particle-Object Relation");
@@ -593,33 +593,17 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, O
}
}
- psys_update_effectors(&sim, 0.0, 0);
+ 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)
{
@@ -2202,7 +2201,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) {
@@ -2239,6 +2238,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 */
diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c
index acf906e3163..9b648e2c05c 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,27 +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)
{
- Object **collobjs = NULL;
- int numcollobj = 0, i;
+ ListBase *colls = colliders;
+ ColliderCache *col;
float norm[3], len = 0.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)
{
- Object *collob= collobjs[i];
- CollisionModifierData *collmd = (CollisionModifierData*)modifiers_findByType(collob, eModifierType_Collision);
+ CollisionModifierData *collmd = col->collmd;
+
+ if(col->ob == eff->ob)
+ continue;
if(collmd->bvhtree)
{
@@ -286,9 +452,9 @@ 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= (collob->pd)? collob->pd->absorption: 0.0f;
+ absorption= col->ob->pd->absorption;
// visibility is only between 0 and 1, calculated from 1-absorption
visibility *= CLAMPIS(1.0f-absorption, 0.0f, 1.0f);
@@ -298,8 +464,9 @@ static float eff_calc_visibility(Scene *scene, Object *ob, float *co, float *dir
}
}
}
-
- MEM_freeN(collobjs);
+
+ if(!colliders)
+ free_collider_cache(&colls);
return visibility;
}
@@ -347,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;
+ float temp[3];
+ float falloff = weights ? weights->weight[0] * weights->weight[eff->pd->forcefield] : 1.0f;
+ float fac, r_fac;
- if(pd->forcefield==PFIELD_LENNARDJ)
- return falloff; /* Lennard-Jones field has it's own falloff built in */
+ fac = Inpf(efd->nor, efd->vec_to_point2);
- VecCopyf(eff_dir,eff_velocity);
- Normalize(eff_dir);
-
- 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;
}
@@ -391,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_face(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() --------
@@ -528,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
@@ -543,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/image.c b/source/blender/blenkernel/intern/image.c
index 9953540bbcf..09d150341b2 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -1564,15 +1564,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)
@@ -1873,16 +1880,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);
@@ -1893,6 +1909,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 {
@@ -1907,7 +1924,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;
@@ -1954,10 +1971,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;
@@ -2011,8 +2032,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};
@@ -2028,6 +2050,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)
@@ -2103,8 +2128,9 @@ ImBuf *BKE_image_get_ibuf(Image *ima, ImageUser *iuser)
}
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 */
@@ -2126,6 +2152,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)
{
diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c
index ae2acd6aef7..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"
@@ -1482,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);
@@ -1525,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++)
@@ -1656,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);
@@ -1741,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 811a2658ae3..6717f5560be 100644
--- a/source/blender/blenkernel/intern/ipo.c
+++ b/source/blender/blenkernel/intern/ipo.c
@@ -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;
@@ -1233,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
@@ -1302,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 */
@@ -1325,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))
@@ -1347,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/lattice.c b/source/blender/blenkernel/intern/lattice.c
index 730a12bea09..a957be4704c 100644
--- a/source/blender/blenkernel/intern/lattice.c
+++ b/source/blender/blenkernel/intern/lattice.c
@@ -524,30 +524,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);
@@ -555,7 +538,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
@@ -579,9 +562,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;
@@ -597,22 +581,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 45869a317e8..0f65be207d9 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;
}
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c
index 1667bd97102..7e742dc5631 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;
diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c
index b9b9ea6b4f3..55fb9f45bb3 100644
--- a/source/blender/blenkernel/intern/modifier.c
+++ b/source/blender/blenkernel/intern/modifier.c
@@ -5971,6 +5971,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;
@@ -5992,8 +5994,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);
@@ -6206,7 +6211,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);
@@ -6293,7 +6299,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);
}
}
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..aa12894feb9 100644
--- a/source/blender/blenkernel/intern/node.c
+++ b/source/blender/blenkernel/intern/node.c
@@ -1953,6 +1953,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 7e2ec106062..579466ea626 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"
@@ -298,11 +299,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);
@@ -1069,6 +1067,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;
}
@@ -1129,11 +1130,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);
@@ -1268,7 +1267,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]);
@@ -1278,6 +1277,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);
@@ -1922,31 +1923,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);
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index e18e7f54e49..011d5c3f134 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"
@@ -61,7 +62,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"
@@ -96,8 +99,7 @@ int count_particles(ParticleSystem *psys){
int tot=0;
LOOP_SHOWN_PARTICLES {
- if(pa->alive == PARS_KILLED);
- else if(pa->alive == PARS_UNBORN && (part->flag & PART_UNBORN)==0);
+ if(pa->alive == PARS_UNBORN && (part->flag & PART_UNBORN)==0);
else if(pa->alive == PARS_DEAD && (part->flag & PART_DIED)==0);
else tot++;
}
@@ -109,8 +111,7 @@ int count_particles_mod(ParticleSystem *psys, int totgr, int cur){
int tot=0;
LOOP_SHOWN_PARTICLES {
- if(pa->alive == PARS_KILLED);
- else if(pa->alive == PARS_UNBORN && (part->flag & PART_UNBORN)==0);
+ if(pa->alive == PARS_UNBORN && (part->flag & PART_UNBORN)==0);
else if(pa->alive == PARS_DEAD && (part->flag & PART_DIED)==0);
else if(p%totgr==cur) tot++;
}
@@ -297,20 +298,72 @@ int psys_check_enabled(Object *ob, ParticleSystem *psys)
return 1;
}
+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);
}
@@ -428,21 +481,26 @@ void psys_free_particles(ParticleSystem *psys)
}
void psys_free_pdd(ParticleSystem *psys)
{
- if(psys->pdd->cdata)
- MEM_freeN(psys->pdd->cdata);
- psys->pdd->cdata = NULL;
+ 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->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->ndata)
+ MEM_freeN(psys->pdd->ndata);
+ psys->pdd->ndata = NULL;
- if(psys->pdd->vedata)
- MEM_freeN(psys->pdd->vedata);
- psys->pdd->vedata = 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)
@@ -465,9 +523,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){
@@ -493,10 +548,11 @@ 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);
@@ -1896,124 +1952,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;
-
- effect[0]=effect[1]=effect[2]=0.0;
+ 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];
- 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;
+ if(effectors) for(eff = effectors->first; eff; eff=eff->next) {
+ pd = eff->pd;
- 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;
}
@@ -2041,26 +2108,30 @@ 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(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= sim->psys->particles+i;
- do_effectors(sim, i, pa, &eff_key, 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 * sim->psys->part->eff_hair) / (float)steps);
@@ -2777,9 +2848,9 @@ void psys_cache_paths(ParticleSimulationData *sim, float cfra)
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(sim->scene, (ParticleKey*)ca, p, (float)k/(float)steps, &psys->effectors);
+ do_guides(sim->psys->effectors, (ParticleKey*)ca, p, (float)k/(float)steps);
/* apply lattice */
if(psys->lattice)
@@ -3187,8 +3258,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;
@@ -3199,7 +3268,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;
@@ -3227,6 +3296,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;
@@ -3249,10 +3321,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
@@ -3261,6 +3329,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);
}
@@ -3348,24 +3419,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);
- }
-}
/************************************************/
/* Textures */
@@ -3421,9 +3474,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))
@@ -3438,18 +3489,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); }
@@ -3473,10 +3524,8 @@ void psys_get_texture(ParticleSimulationData *sim, Material *ma, ParticleData *p
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(sim->psys->part->from, PART_FROM_FACE, PART_FROM_VOLUME)) {
if(!get_particle_uv(sim->psmd->dm, pa, 0, pa->fuv, mtex->uvname, texco)) {
@@ -3493,29 +3542,31 @@ void psys_get_texture(ParticleSimulationData *sim, Material *ma, ParticleData *p
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); }
@@ -3646,7 +3697,7 @@ static void do_child_modifiers(ParticleSimulationData *sim, ParticleTexture *pte
if(part->flag & PART_CHILD_EFFECT)
/* state is safe to cast, since only co and vel are used */
- guided = do_guide(sim->scene, (ParticleKey*)state, cpa->parent, t, &(sim->psys->effectors));
+ guided = do_guides(sim->psys->effectors, (ParticleKey*)state, cpa->parent, t);
if(guided==0){
if(part->kink)
@@ -3716,8 +3767,8 @@ void psys_get_particle_on_path(ParticleSimulationData *sim, int p, ParticleKey *
Mat4MulVecfl(hairmat, state->co);
Mat4Mul3Vecfl(hairmat, state->vel);
- if(psys->effectors.first && (part->flag & PART_CHILD_GUIDE)==0) {
- do_guide(sim->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 */
}
@@ -3801,6 +3852,7 @@ void psys_get_particle_on_path(ParticleSimulationData *sim, int p, ParticleKey *
/* 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 */
@@ -3869,6 +3921,7 @@ int psys_get_particle_state(ParticleSimulationData *sim, int p, ParticleKey *sta
ChildParticle *cpa = NULL;
float cfra;
int totpart = psys->totpart;
+ float timestep = psys_get_timestep(sim);
/* negative time means "use current time" */
cfra = state->time > 0 ? state->time : bsystem_time(sim->scene, 0, (float)sim->scene->r.cfra, 0.0);
@@ -3905,8 +3958,6 @@ int psys_get_particle_state(ParticleSimulationData *sim, int p, ParticleKey *sta
}
if(pa) {
- if(pa->alive == PARS_KILLED) return 0;
-
if(!always)
if((pa->alive==PARS_UNBORN && (part->flag & PART_UNBORN)==0)
|| (pa->alive==PARS_DEAD && (part->flag & PART_DIED)==0))
@@ -3939,13 +3990,14 @@ int psys_get_particle_state(ParticleSimulationData *sim, int p, ParticleKey *sta
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 = sim->scene->r.frs_sec;
@@ -3964,13 +4016,13 @@ int psys_get_particle_state(ParticleSimulationData *sim, int p, ParticleKey *sta
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);
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index 1b6d56e6459..45050127582 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"
@@ -132,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;
@@ -186,6 +183,8 @@ static void realloc_particles(ParticleSimulationData *sim, int 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);
@@ -218,13 +217,12 @@ static void realloc_particles(ParticleSimulationData *sim, int new_totpart)
}
psys->particles=newpars;
+ psys->totpart=totpart;
if(newboids) {
LOOP_PARTICLES
pa->boid = newboids++;
}
-
- psys->totpart=totpart;
}
if(psys->child) {
@@ -1663,7 +1661,7 @@ void reset_particle(ParticleSimulationData *sim, ParticleData *pa, float dtime,
ParticleKey state;
//IpoCurve *icu=0; // XXX old animation system
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],p_vel[3]={0.0,0.0,0.0};
+ 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], r_phase;
int p = pa - psys->particles;
@@ -1776,7 +1774,7 @@ void reset_particle(ParticleSimulationData *sim, ParticleData *pa, float dtime,
}
}
- 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];
@@ -1796,8 +1794,9 @@ void reset_particle(ParticleSimulationData *sim, ParticleData *pa, float dtime,
/* 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];
+ 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);
@@ -1841,6 +1840,23 @@ void reset_particle(ParticleSimulationData *sim, ParticleData *pa, float dtime,
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 */
@@ -1936,8 +1952,12 @@ void reset_particle(ParticleSimulationData *sim, ParticleData *pa, float dtime,
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;
}
@@ -2203,556 +2223,37 @@ 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_SHOWN_PARTICLES {
- if(pa->alive == PARS_ALIVE)
- 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;
-
- 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(ParticleSimulationData *sim, ListBase *lb, Object *ob)
-{
- ParticleEffectorCache *ec;
- PartDeflect *pd= ob->pd;
- short type=0,i;
-
- if(pd && ob != sim->ob){
- 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(sim->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!=sim->psys || (sim->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)==sim->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(ParticleSimulationData *sim, Object *ob, ListBase *listb, int level)
-{
- Group *group;
- GroupObject *go;
- unsigned int layer= sim->ob->lay;
-
- if(level>MAX_DUPLI_RECUR) return;
-
- if(ob->lay & layer) {
- if(ob->pd || ob->particlesystem.first)
- add_to_effectors(sim, listb, ob);
-
- if(ob->dup_group) {
- group= ob->dup_group;
- for(go= group->gobject.first; go; go= go->next)
- psys_init_effectors_recurs(sim, go->ob, listb, level+1);
- }
- }
-}
-
-static void psys_init_effectors(ParticleSimulationData *sim, Group *group)
-{
- ListBase *listb= &sim->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(sim, go->ob, listb, 0);
- }
- else {
- for(base = sim->scene->base.first; base; base= base->next)
- psys_init_effectors_recurs(sim, base->object, 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);
-}
-
-/* precalcs effectors and returns 1 if there were any collision object
- * so collision checks can be avoided as quickly as possible */
-static int precalc_effectors(ParticleSimulationData *sim, float cfra)
-{
- ParticleSystem *psys = sim->psys;
- ListBase *lb=&psys->effectors;
- ParticleEffectorCache *ec;
- ParticleSettings *part=psys->part;
- PARTICLE_P;
- int totpart, collision = 0;
- 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);
- }
+ 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(sim->psmd,part->from,pa->num,pa->num_dmcache,pa->fuv,pa->foffset,loc,0,0,0,0,0);
-
- Mat4MulVecfl(sim->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){
- ParticleSimulationData esim = {sim->scene, ec->ob, BLI_findlink(&ec->ob->particlesystem, ec->psys_nbr), NULL};
- ParticleSettings *epart = esim.psys->part;
- ParticleData *epa;
- int p, totepart = esim.psys->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=esim.psys->particles; p<totepart; p++,epa++)
- if(epa->alive==PARS_ALIVE && psys_get_particle_state(&esim,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);
- collision = 1;
- }
+ psys->tree_frame = psys->cfra;
}
}
-
- return collision;
}
-/* updates particle effectors and returns if any collision objects were found */
-int psys_update_effectors(ParticleSimulationData *sim, float cfra, int precalc)
-{
- psys_end_effectors(sim->psys);
- psys_init_effectors(sim, sim->psys->part->eff_group);
- return (precalc ? precalc_effectors(sim, cfra) : 0);
-}
-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_face(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(ParticleSimulationData *sim, int pa_no, ParticleData *pa, ParticleKey *state, float *rootco, float *force_field, float *vel,float framestep, float cfra)
-{
- Object *eob;
- ParticleSystem *psys = sim->psys;
- 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(sim->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(sim));
- VecAddf(pco, state->co, velocity);
- }
- else
- VECCOPY(pco, state->co);
-
- effector_find_co(sim->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(sim->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){
- ParticleSimulationData esim = {sim->scene, eob, BLI_findlink(&eob->particlesystem,ec->psys_nbr), NULL};
- int totepart, i;
-
- epart = esim.psys->part;
- pd = epart->pd;
- totepart = esim.psys->totpart;
-
- if(totepart <= 0)
- continue;
-
- if(pd && pd->forcefield==PFIELD_HARMONIC){
- /* every particle is mapped to only one harmonic effector particle */
- p= pa_no%esim.psys->totpart;
- totepart= p+1;
- }
- else{
- p=0;
- }
-
- esim.psys->lattice= psys_get_lattice(sim);
-
- for(; p<totepart; p++){
- /* particle skips itself as effector */
- if(esim.psys == psys && p == pa_no) continue;
-
- epa = esim.psys->particles + p;
- estate.time = cfra;
- if(psys_get_particle_state(&esim, 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(sim->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(&esim, p, &estate, 1);
- VECADD(vel, vel, estate.vel);
- /* TODO: add rotation handling here too */
- }
- }
-
- if(esim.psys->lattice){
- end_latt_deform(esim.psys->lattice);
- esim.psys->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);
}
/************************************************/
@@ -2763,9 +2264,10 @@ static void apply_particle_forces(ParticleSimulationData *sim, int p, float dfra
{
ParticleSettings *part = sim->psys->part;
ParticleData *pa = sim->psys->particles + p;
+ EffectedPoint epoint;
ParticleKey states[5], tkey;
float timestep = psys_get_timestep(sim);
- float force[3],tvel[3],dx[4][3],dv[4][3];
+ 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;
@@ -2791,10 +2293,11 @@ static void apply_particle_forces(ParticleSimulationData *sim, int p, float dfra
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(sim, p, pa, states+i, 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){
@@ -2813,10 +2316,17 @@ static void apply_particle_forces(ParticleSimulationData *sim, int p, float dfra
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:
@@ -2889,6 +2399,8 @@ static void apply_particle_forces(ParticleSimulationData *sim, int p, float dfra
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);
@@ -2898,7 +2410,7 @@ static void apply_particle_forces(ParticleSimulationData *sim, int p, float dfra
tkey.time=pa->state.time;
if(part->type != PART_HAIR) {
- if(do_guide(sim->scene, &tkey, p, time, &sim->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);
@@ -3129,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;
}
}
}
@@ -3146,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;
}
}
}
@@ -3163,13 +2677,11 @@ void particle_intersect_face(void *userdata, int index, const BVHTreeRay *ray, B
/* 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(ParticleSimulationData *sim, int p, float dfra, float cfra){
- Object *ob = NULL, *skip_ob = NULL;
+ Object *ground_ob = NULL;
ParticleSettings *part = sim->psys->part;
- ListBase *lb=&sim->psys->effectors;
- ParticleEffectorCache *ec;
- ParticleKey reaction_state;
- ParticleCollision col;
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;
@@ -3185,11 +2697,11 @@ static void deflect_particle(ParticleSimulationData *sim, int p, float dfra, flo
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);
@@ -3201,32 +2713,25 @@ static void deflect_particle(ParticleSimulationData *sim, int p, float dfra, flo
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==sim->ob && pa->time < cfra && pa->time >= sim->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(sim->scene, sim->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 */
@@ -3253,9 +2758,6 @@ static void deflect_particle(ParticleSimulationData *sim, int p, float dfra, flo
/* 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];
@@ -3416,7 +2918,7 @@ static void psys_update_path_cache(ParticleSimulationData *sim, float cfra)
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)
@@ -3555,8 +3057,11 @@ static void do_hair_dynamics(ParticleSimulationData *sim)
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->clmd->sim_parms->effector_weights = NULL;
}
static void hair_step(ParticleSimulationData *sim, float cfra)
{
@@ -3586,7 +3091,7 @@ static void hair_step(ParticleSimulationData *sim, float cfra)
if(psys->part->type==PART_HAIR && psys->flag & PSYS_HAIR_DYNAMICS)
do_hair_dynamics(sim);
- psys_update_effectors(sim, cfra, 1);
+ psys_update_effectors(sim);
psys_update_path_cache(sim, cfra);
@@ -3648,12 +3153,12 @@ 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
+ //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;
- int totpart, check_collisions = 0;
+ int totpart;
/* current time */
float ctime, ipotime; // XXX old animation system
/* frame & time changes */
@@ -3665,7 +3170,7 @@ static void dynamics_step(ParticleSimulationData *sim, float cfra)
totpart=psys->totpart;
- timestep=psys_get_timestep(sim);
+ timestep = psys_get_timestep(sim);
dtime= dfra*timestep;
ctime= cfra*timestep;
ipotime= cfra; // XXX old animation system
@@ -3703,15 +3208,6 @@ static void dynamics_step(ParticleSimulationData *sim, float cfra)
}
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;
}
}
@@ -3721,7 +3217,10 @@ static void dynamics_step(ParticleSimulationData *sim, float cfra)
else{
BLI_srandom(31415926 + (int)cfra + psys->seed);
- psys_update_effectors(sim, cfra, 1);
+ 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;
@@ -3731,13 +3230,13 @@ static void dynamics_step(ParticleSimulationData *sim, float 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);
}
}
@@ -3798,7 +3297,7 @@ static void dynamics_step(ParticleSimulationData *sim, float cfra)
apply_particle_forces(sim, p, pa_dfra, cfra);
/* deflection */
- if(check_collisions)
+ if(sim->colliders)
deflect_particle(sim, p, pa_dfra, cfra);
/* rotations */
@@ -3812,7 +3311,8 @@ static void dynamics_step(ParticleSimulationData *sim, float cfra)
boid_body(&bbd, pa);
/* deflection */
- deflect_particle(sim, p, pa_dfra, cfra);
+ if(sim->colliders)
+ deflect_particle(sim, p, pa_dfra, cfra);
}
break;
}
@@ -3837,9 +3337,9 @@ static void dynamics_step(ParticleSimulationData *sim, float cfra)
//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);
@@ -3850,7 +3350,7 @@ static void cached_step(ParticleSimulationData *sim, float cfra)
{
ParticleSystem *psys = sim->psys;
ParticleSettings *part = psys->part;
- IpoCurve *icu_esize = NULL; //=find_ipocurve(part->ipo,PART_EMIT_SIZE); // XXX old animation system
+ //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
@@ -3860,7 +3360,7 @@ static void cached_step(ParticleSimulationData *sim, float cfra)
if(part->from!=PART_FROM_PARTICLE)
vg_size= psys_cache_vgroup(sim->psmd->dm,psys,PSYS_VG_SIZE);
- psys_update_effectors(sim, cfra, 1);
+ psys_update_effectors(sim);
disp= (float)get_current_display_percentage(psys)/100.0f;
@@ -4195,6 +3695,13 @@ static void system_step(ParticleSimulationData *sim, float cfra)
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 */
@@ -4226,7 +3733,7 @@ static void system_step(ParticleSimulationData *sim, float cfra)
if(alloc) {
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, sim->ob, psys);
}
@@ -4286,7 +3793,7 @@ static void system_step(ParticleSimulationData *sim, float cfra)
pa->alive = PARS_ALIVE;
}
}
- else if(sim->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;
@@ -4383,7 +3890,7 @@ 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)
{
- ParticleSimulationData sim = {scene, ob, psys, NULL};
+ ParticleSimulationData sim = {scene, ob, psys, NULL, NULL};
float cfra;
/* drawdata is outdated after ANY change */
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index 3915a6901a0..fa0d5cba604 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -269,7 +269,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)
@@ -292,13 +292,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);
@@ -591,7 +611,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)
@@ -2266,6 +2287,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/scene.c b/source/blender/blenkernel/intern/scene.c
index 4de9ff3b6d9..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;
@@ -778,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/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 62463b3d555..f1fae4fa678 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -126,6 +126,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 +280,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->getFaceArray(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->getFaceArray(dm), dm->getNumFaces(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->getFaceArray(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->getNumFaces(dm); i++)
+ {
+ if(mface[i].v4)
+ quads++;
+ }
- // printf("divs: %d\n", divs);
+ calcTriangleDivs(ob, mvert, dm->getNumVerts(dm), mface, dm->getNumFaces(dm), dm->getNumFaces(dm) + quads, &tridivs, cell_len);
- scs->points = MEM_callocN(sizeof(float) * (dm->getNumVerts(dm) + divs) * 3, "SmokeCollPoints");
+ // 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);
+ }
+
+ // printf("divs: %d\n", divs);
- for(i = 0; i < dm->getNumVerts(dm); i++)
+ scs->points = MEM_callocN(sizeof(float) * (dm->getNumVerts(dm) + divs) * 3, "SmokeCollPoints");
+
+ 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->getNumFaces(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)
+ if(uf+vf > 1.0)
{
- 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
- {
- 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->getFaceArray(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 */
@@ -832,8 +839,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);
@@ -1184,7 +1190,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 +1205,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 450a64d72eb..089f2a5ebfb 100644
--- a/source/blender/blenkernel/intern/softbody.c
+++ b/source/blender/blenkernel/intern/softbody.c
@@ -1550,11 +1550,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);
}
@@ -1589,14 +1592,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)
@@ -1614,7 +1616,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)
@@ -1661,9 +1663,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);
}
@@ -2226,19 +2227,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);
@@ -2341,6 +2345,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;
@@ -2381,7 +2386,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;
@@ -2401,7 +2406,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];
@@ -2414,7 +2419,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);
}
@@ -2443,8 +2448,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;
@@ -2460,7 +2465,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);
@@ -2473,7 +2481,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];
@@ -2631,16 +2639,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);
@@ -2819,7 +2828,7 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa
}
/* cleanup */
#endif
- if(do_effector) pdEndEffectors(do_effector);
+ pdEndEffectors(&do_effector);
}
}
@@ -3635,6 +3644,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;
}
@@ -3644,6 +3656,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);
}
@@ -3684,6 +3698,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/texture.c b/source/blender/blenkernel/intern/texture.c
index d7616ec8a9a..3b8ae9a6c7f 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;
}
@@ -984,6 +1014,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/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/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/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/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 b1539d22909..f6fa4f1ebd2 100644
--- a/source/blender/blenlib/intern/util.c
+++ b/source/blender/blenlib/intern/util.c
@@ -902,16 +902,16 @@ static int gethome_path_local(char *targetpath, char *folder_name)
s = BLI_last_slash(bprogname);
i = s - bprogname + 1;
BLI_strncpy(bprogdir, bprogname, i);
-
- /* try ./.blender/folder_name */
- if(test_data_path(targetpath, bprogdir, ".blender", folder_name))
+
+ /* try release/folder_name (CWD relative) */
+ if(test_data_path(targetpath, BLI_getwdN(cwd), "release", folder_name))
return 1;
-
+
if(test_data_path(targetpath, bprogdir, "release", folder_name))
return 1;
-
- /* try release/folder_name (CWD relative) */
- if(test_data_path(targetpath, BLI_getwdN(cwd), "release", folder_name))
+
+ /* try ./.blender/folder_name */
+ if(test_data_path(targetpath, bprogdir, ".blender", folder_name))
return 1;
return 0;
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 114ec9095b1..989e2b3fa9e 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -3033,6 +3033,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) {
@@ -3044,6 +3045,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;
@@ -3079,6 +3088,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) {
@@ -3155,18 +3171,17 @@ 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;
@@ -3642,12 +3657,24 @@ static void lib_link_object(FileData *fd, Main *main)
smd->domain->fluid_group = newlibadr_us(fd, ob->id.lib, smd->domain->fluid_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);
+ }
+ }
/* texture field */
if(ob->pd)
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);
}
@@ -3727,6 +3754,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) {
@@ -3767,12 +3799,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) {
@@ -3874,7 +3909,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->disp.first=ob->disp.last= NULL;
ob->adt= newdataadr(fd, ob->adt);
@@ -3948,6 +3986,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;
@@ -3965,6 +4005,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);
@@ -6154,7 +6199,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)
{
@@ -9573,16 +9681,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;
}
@@ -9699,10 +9804,15 @@ 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)
@@ -9716,7 +9826,28 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
/* 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)
@@ -9728,6 +9859,52 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
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;
+
+ 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 */
+ {
}
/* WATCH IT!!!: pointers from libdata have not been converted yet here! */
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index fda35d28d0e..c92c0909d3b 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -610,6 +610,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 +621,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;
@@ -1101,7 +1107,7 @@ static void write_pose(WriteData *wd, bPose *pose)
/* write IK param */
if (pose->ikparam) {
- const char *structname = get_ikparam_name(pose);
+ char *structname = (char *)get_ikparam_name(pose);
if (structname)
writestruct(wd, DATA, structname, 1, pose->ikparam);
}
@@ -1140,6 +1146,7 @@ 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) {
@@ -1149,10 +1156,8 @@ static void write_modifiers(WriteData *wd, ListBase *modbase)
writestruct(wd, DATA, "SmokeDomainSettings", 1, smd->domain);
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)
{
@@ -1227,7 +1232,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);
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..b310bcb95ec 100644
--- a/source/blender/blenpluginapi/SConscript
+++ b/source/blender/blenpluginapi/SConscript
@@ -11,4 +11,11 @@ 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/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 8f8700cc43b..427fa47923f 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -909,7 +909,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 */
@@ -953,7 +952,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 */
diff --git a/source/blender/editors/animation/anim_intern.h b/source/blender/editors/animation/anim_intern.h
index 462ef76ea8d..853aeb6c8f3 100644
--- a/source/blender/editors/animation/anim_intern.h
+++ b/source/blender/editors/animation/anim_intern.h
@@ -39,4 +39,44 @@ 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);
+
#endif // ANIM_INTERN_H
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c
index bed534ae070..6c44086af41 100644
--- a/source/blender/editors/animation/anim_markers.c
+++ b/source/blender/editors/animation/anim_markers.c
@@ -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 a4038028062..4317204f347 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 ***************************/
@@ -395,15 +397,21 @@ 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_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)
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/keyingsets.c b/source/blender/editors/animation/keyingsets.c
index 81259ae7ced..99cdf0a86f4 100644
--- a/source/blender/editors/animation/keyingsets.c
+++ b/source/blender/editors/animation/keyingsets.c
@@ -78,6 +78,215 @@
#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);
+ scene->active_keyingset= 0;
+
+ 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) + 1;
+
+ 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);
+ }
+
+ /* fix active path index */
+ ks->active_path= 0;
+ }
+ 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 ------------------------ */
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_ops.c b/source/blender/editors/armature/armature_ops.c
index fae0b093551..d465c1f8c9a 100644
--- a/source/blender/editors/armature/armature_ops.c
+++ b/source/blender/editors/armature/armature_ops.c
@@ -248,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);
@@ -280,6 +281,7 @@ 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);
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/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_image.h b/source/blender/editors/include/ED_image.h
index a4263f7bd77..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);
diff --git a/source/blender/editors/include/ED_keyframing.h b/source/blender/editors/include/ED_keyframing.h
index d30fccfe4de..92dda4162cc 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
@@ -155,12 +135,6 @@ 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);
-
/* ************ Drivers ********************** */
/* Returns whether there is a driver in the copy/paste buffer to paste */
@@ -187,12 +161,6 @@ short ANIM_copy_driver(struct ID *id, const char rna_path[], int array_index, sh
*/
short ANIM_paste_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);
-void ANIM_OT_copy_driver_button(struct wmOperatorType *ot);
-void ANIM_OT_paste_driver_button(struct wmOperatorType *ot);
-
/* ************ Auto-Keyframing ********************** */
/* Notes:
* - All the defines for this (User-Pref settings and Per-Scene settings)
diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h
index 634a3bc278b..fd88f9889ae 100644
--- a/source/blender/editors/include/ED_mesh.h
+++ b/source/blender/editors/include/ED_mesh.h
@@ -38,6 +38,7 @@ struct EditFace;
struct bContext;
struct wmOperator;
struct wmWindowManager;
+struct ReportList;
struct EditSelection;
struct ViewContext;
struct bDeformGroup;
@@ -49,6 +50,8 @@ struct MCol;
struct UvVertMap;
struct UvMapVert;
struct CustomData;
+struct Material;
+struct Object;
#define EM_FGON_DRAW 1 // face flag
#define EM_FGON 2 // edge and face flag both
@@ -89,9 +92,9 @@ void ED_keymap_mesh(struct wmWindowManager *wm);
void ED_spacetypes_init(void);
void ED_keymap_mesh(struct wmWindowManager *wm);
-void make_editMesh(struct Scene *scene, Object *ob);
-void load_editMesh(struct Scene *scene, Object *ob);
-void remake_editMesh(struct Scene *scene, Object *ob);
+void make_editMesh(struct Scene *scene, struct Object *ob);
+void load_editMesh(struct Scene *scene, struct Object *ob);
+void remake_editMesh(struct Scene *scene, struct Object *ob);
void free_editMesh(struct EditMesh *em);
void recalc_editnormals(struct EditMesh *em);
@@ -184,5 +187,18 @@ 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 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_particle.h b/source/blender/editors/include/ED_particle.h
index 28807caa255..a052142102d 100644
--- a/source/blender/editors/include/ED_particle.h
+++ b/source/blender/editors/include/ED_particle.h
@@ -38,6 +38,7 @@ struct RadialControl;
struct rcti;
struct wmWindowManager;
struct PTCacheEdit;
+struct Scene;
/* particle edit mode */
void PE_free_ptcache_edit(struct PTCacheEdit *edit);
@@ -46,7 +47,7 @@ int PE_start_edit(struct PTCacheEdit *edit);
/* access */
struct PTCacheEdit *PE_get_current(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 +60,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..ee340c54e7d 100644
--- a/source/blender/editors/include/ED_physics.h
+++ b/source/blender/editors/include/ED_physics.h
@@ -31,11 +31,8 @@
#define ED_PHYSICS_H
/* operators */
-
-void ED_operatortypes_boids(void);
-void ED_operatortypes_pointcache(void);
-void ED_operatortypes_fluid(void);
-//void ED_keymap_pointcache(struct wmWindowManager *wm);
+void ED_operatortypes_physics(void);
+void ED_keymap_physics(struct wmWindowManager *wm);
#endif /* ED_PHYSICS_H */
diff --git a/source/blender/editors/include/ED_previewrender.h b/source/blender/editors/include/ED_render.h
index 7e0d71db7e1..be93bf92e5e 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 {
@@ -72,7 +79,7 @@ void ED_preview_init_dbase(void);
void ED_preview_free_dbase(void);
void ED_preview_shader_job(const struct bContext *C, void *owner, struct ID *id, 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_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_transform.h b/source/blender/editors/include/ED_transform.h
index bf3111de5dc..7f08e95aceb 100644
--- a/source/blender/editors/include/ED_transform.h
+++ b/source/blender/editors/include/ED_transform.h
@@ -111,10 +111,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);
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index dc4744c9832..7fea4b10ed9 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -424,6 +424,7 @@ 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);
@@ -669,6 +670,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/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 1b05958b679..3e5cc0e6d67 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -3064,6 +3064,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)
{
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index b5de855cb80..c60c94a9c4d 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -3271,7 +3271,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 */
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 885005ba06e..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,
@@ -450,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);
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index e3c392a145e..11dfc44906a 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -492,7 +492,7 @@ 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;
}
@@ -1021,7 +1021,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;
@@ -1030,7 +1029,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);
@@ -1183,8 +1182,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, "");
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index af4a4c13c80..5b93f9ee06d 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -40,7 +40,7 @@
#include "BKE_utildefines.h"
#include "ED_screen.h"
-#include "ED_previewrender.h"
+#include "ED_render.h"
#include "RNA_access.h"
@@ -94,7 +94,6 @@ static void id_search_call_cb(bContext *C, void *arg_template, void *item)
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;
@@ -102,7 +101,7 @@ static void id_search_cb(const bContext *C, void *arg_template, char *str, uiSea
/* 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;
@@ -154,6 +153,36 @@ static uiBlock *search_menu(bContext *C, ARegion *ar, void *arg_litem)
/************************ ID Template ***************************/
+/* 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)
{
TemplateID *template= (TemplateID*)arg_litem;
@@ -168,11 +197,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));
@@ -292,7 +317,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_EXEC_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 {
@@ -308,7 +333,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 {
@@ -1842,6 +1867,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);
@@ -1854,7 +1909,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;
@@ -1901,7 +1956,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 */
@@ -1921,15 +1976,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);
@@ -1953,6 +2000,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)
@@ -2006,6 +2054,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)
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index ac8750f84e6..007a57fb67a 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);
@@ -902,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 {
@@ -913,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);
@@ -1973,7 +1973,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)
@@ -2209,13 +2221,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;
@@ -2405,7 +2421,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:
@@ -2562,7 +2581,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 87026bd1a5d..ee7db07f3c8 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -1259,6 +1259,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/mesh/SConscript b/source/blender/editors/mesh/SConscript
index df1f297698d..00391b3474a 100644
--- a/source/blender/editors/mesh/SConscript
+++ b/source/blender/editors/mesh/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_mesh', sources, Split(incs), [], libtype=['core'], priority=[45] )
diff --git a/source/blender/editors/mesh/editface.c b/source/blender/editors/mesh/editface.c
index a6c5e5beccf..f65ab7ddd67 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->getFaceArray(dm);
+ totface = dm->getNumFaces(dm);
+
+ index_array = dm->getFaceDataArray(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,18 @@ 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) {
+ View3D *v3d= sa->spacedata.first;
+ RegionView3D *rv3d= ar->regiondata;
+
+ /* 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 +762,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_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 510f6ab464b..88d08efe95e 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -1305,8 +1305,12 @@ static int delete_mesh_exec(bContext *C, wmOperator *op)
{
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
+ int type= RNA_enum_get(op->ptr, "type");
- delete_mesh(obedit, em, op, RNA_enum_get(op->ptr, "type"));
+ if(type==6)
+ return WM_operator_name_call(C, "MESH_OT_delete_edgeloop", WM_OP_EXEC_DEFAULT, NULL);
+
+ delete_mesh(obedit, em, op, type);
DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
diff --git a/source/blender/editors/mesh/loopcut.c b/source/blender/editors/mesh/loopcut.c
index d1ef4ebc233..e58025ac6ce 100644
--- a/source/blender/editors/mesh/loopcut.c
+++ b/source/blender/editors/mesh/loopcut.c
@@ -50,6 +50,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"
@@ -249,22 +250,22 @@ 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) {
EditMesh *em = BKE_mesh_get_editmesh(lcd->ob->data);
- esubdivideflag(lcd->ob, em, SELECT, 0.0f,
- 0.0f, 0, 1, SUBDIV_SELECT_LOOPCUT);
+ esubdivideflag(lcd->ob, em, SELECT, 0.0f, 0.0f, 0, cuts, SUBDIV_SELECT_LOOPCUT);
DAG_id_flush_update(lcd->ob->data, OB_RECALC_DATA);
}
@@ -340,7 +341,7 @@ static int ringsel_invoke (bContext *C, wmOperator *op, wmEvent *evt)
edge = 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;
@@ -368,7 +369,7 @@ static int ringcut_invoke (bContext *C, wmOperator *op, wmEvent *evt)
edge = 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;
@@ -376,10 +377,12 @@ 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
@@ -395,6 +398,20 @@ static int ringsel_modal (bContext *C, wmOperator *op, wmEvent *event)
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 */
int dist = 75;
EditEdge *edge;
@@ -405,12 +422,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 */
@@ -451,4 +468,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 a36c7a56b7c..43e1dd417a6 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,9 +45,13 @@
#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 "BLI_arithb.h"
#include "BLI_editVert.h"
+#include "BLI_edgehash.h"
#include "RNA_access.h"
#include "RNA_define.h"
@@ -150,19 +156,8 @@ static void delete_customdata_layer(bContext *C, Object *ob, CustomDataLayer *la
}
}
-/*********************** UV texture operators ************************/
-
-static int layers_poll(bContext *C)
+int ED_mesh_uv_texture_add(bContext *C, Scene *scene, 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);
-}
-
-static int uv_texture_add_exec(bContext *C, wmOperator *op)
-{
- Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
- Mesh *me= ob->data;
EditMesh *em;
int layernum;
@@ -193,28 +188,11 @@ static int uv_texture_add_exec(bContext *C, wmOperator *op)
DAG_id_flush_update(&me->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, me);
- return OPERATOR_FINISHED;
+ return 1;
}
-void MESH_OT_uv_texture_add(wmOperatorType *ot)
+int ED_mesh_uv_texture_remove(bContext *C, Object *ob, Mesh *me)
{
- /* identifiers */
- ot->name= "Add UV Texture";
- ot->description= "Add UV texture layer.";
- ot->idname= "MESH_OT_uv_texture_add";
-
- /* api callbacks */
- ot->poll= layers_poll;
- ot->exec= uv_texture_add_exec;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-}
-
-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;
int index;
@@ -222,38 +200,17 @@ static int uv_texture_remove_exec(bContext *C, wmOperator *op)
cdl= (index == -1)? NULL: &me->fdata.layers[index];
if(!cdl)
- return OPERATOR_CANCELLED;
+ 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 OPERATOR_FINISHED;
-}
-
-void MESH_OT_uv_texture_remove(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Remove UV Texture";
- ot->description= "Remove UV texture layer.";
- ot->idname= "MESH_OT_uv_texture_remove";
-
- /* api callbacks */
- ot->poll= layers_poll;
- ot->exec= uv_texture_remove_exec;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ return 1;
}
-/*********************** vertex color operators ************************/
-
-static int vertex_color_add_exec(bContext *C, wmOperator *op)
+int ED_mesh_color_add(bContext *C, Scene *scene, Object *ob, Mesh *me)
{
- Scene *scene= CTX_data_scene(C);
- Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
- Mesh *me= ob->data;
EditMesh *em;
MCol *mcol;
int layernum;
@@ -263,7 +220,7 @@ static int vertex_color_add_exec(bContext *C, wmOperator *op)
layernum= CustomData_number_of_layers(&em->fdata, CD_MCOL);
if(layernum >= MAX_MCOL)
- return OPERATOR_CANCELLED;
+ return 0;
EM_add_data_layer(em, &em->fdata, CD_MCOL);
CustomData_set_layer_active(&em->fdata, CD_MCOL, layernum);
@@ -271,7 +228,7 @@ static int vertex_color_add_exec(bContext *C, wmOperator *op)
else {
layernum= CustomData_number_of_layers(&me->fdata, CD_MCOL);
if(layernum >= MAX_MCOL)
- return OPERATOR_CANCELLED;
+ return 0;
mcol= me->mcol;
@@ -290,6 +247,100 @@ static int vertex_color_add_exec(bContext *C, wmOperator *op)
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->fdata, CD_MCOL);
+ cdl= (index == -1)? NULL: &me->fdata.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;
+}
+
+void MESH_OT_uv_texture_add(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Add UV Texture";
+ ot->description= "Add UV texture layer.";
+ ot->idname= "MESH_OT_uv_texture_add";
+
+ /* api callbacks */
+ ot->poll= layers_poll;
+ ot->exec= uv_texture_add_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+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;
+
+ if(!ED_mesh_uv_texture_remove(C, ob, me))
+ return OPERATOR_CANCELLED;
+
+ return OPERATOR_FINISHED;
+}
+
+void MESH_OT_uv_texture_remove(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Remove UV Texture";
+ ot->description= "Remove UV texture layer.";
+ ot->idname= "MESH_OT_uv_texture_remove";
+
+ /* api callbacks */
+ ot->poll= layers_poll;
+ ot->exec= uv_texture_remove_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/*********************** vertex color operators ************************/
+
+static int vertex_color_add_exec(bContext *C, wmOperator *op)
+{
+ Scene *scene= CTX_data_scene(C);
+ Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
+ Mesh *me= ob->data;
+
+ if(!ED_mesh_color_add(C, scene, ob, me))
+ return OPERATOR_CANCELLED;
+
return OPERATOR_FINISHED;
}
@@ -312,20 +363,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->fdata, CD_MCOL);
- cdl= (index == -1)? NULL: &me->fdata.layers[index];
- if(!cdl)
+ if(!ED_mesh_color_remove(C, ob, me))
return OPERATOR_CANCELLED;
- 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 OPERATOR_FINISHED;
}
@@ -409,3 +450,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)
+{
+ if(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_mesh) {
+ 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_ops.c b/source/blender/editors/mesh/mesh_ops.c
index 21148e59153..13d73faeb98 100644
--- a/source/blender/editors/mesh/mesh_ops.c
+++ b/source/blender/editors/mesh/mesh_ops.c
@@ -434,6 +434,7 @@ void ED_keymap_mesh(wmWindowManager *wm)
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);
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index 05905cd42a4..7188368a95f 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -38,6 +38,7 @@
#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"
@@ -56,6 +57,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"
@@ -190,6 +192,90 @@ void OBJECT_OT_add(wmOperatorType *ot)
RNA_def_enum(ot->srna, "type", object_type_items, 0, "Type", "");
}
+/********************* 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}};
+
+void add_effector_draw(Scene *scene, View3D *v3d, int type) /* for toolbox or menus, only non-editmode stuff */
+{
+ /* 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;
+
+ /* for as long scene has editmode... */
+ if (CTX_data_edit_object(C))
+ ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR); /* freedata, and undo */
+
+ /* deselects all, sets scene->basact */
+ 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);
+ }
+ else
+ ob= add_object(scene, OB_EMPTY);
+
+ 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_effector_add(wmOperatorType *ot)
+{
+ /* identifiers */
+ 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= effector_add_exec;
+
+ ot->poll= ED_operator_scene_editable;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ RNA_def_enum(ot->srna, "type", field_type_items, 0, "Type", "");
+}
+
/* ***************** add primitives *************** */
/* ****** work both in and outside editmode ****** */
@@ -616,6 +702,8 @@ static int object_primitive_add_invoke(bContext *C, wmOperator *op, wmEvent *eve
uiItemS(layout);
uiItemEnumO(layout, NULL, ICON_OUTLINER_OB_CAMERA, "OBJECT_OT_add", "type", OB_CAMERA);
uiItemMenuEnumO(layout, "Lamp", ICON_OUTLINER_OB_LAMP, "OBJECT_OT_lamp_add", "type");
+ uiItemS(layout);
+ uiItemMenuEnumO(layout, "Force Field", ICON_OUTLINER_OB_EMPTY, "OBJECT_OT_effector_add", "type");
uiPupMenuEnd(C, pup);
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index c734a7c606d..54df3ae92da 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -332,7 +332,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) {
ListBase pidlist;
PTCacheID *pid;
@@ -346,6 +346,7 @@ void ED_object_exit_editmode(bContext *C, int flag)
if(pid->type != PTCACHE_TYPE_PARTICLES) /* particles don't need reset on geometry change */
pid->cache->flag |= PTCACHE_OUTDATED;
}
+ BLI_freelistN(&pidlist);
BKE_ptcache_object_reset(scene, obedit, PTCACHE_RESET_OUTDATED);
@@ -357,10 +358,10 @@ void ED_object_exit_editmode(bContext *C, int flag)
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);
+ }
}
diff --git a/source/blender/editors/object/object_intern.h b/source/blender/editors/object/object_intern.h
index 87c4560916d..474715c593b 100644
--- a/source/blender/editors/object/object_intern.h
+++ b/source/blender/editors/object/object_intern.h
@@ -91,6 +91,7 @@ void OBJECT_OT_text_add(struct wmOperatorType *ot);
void OBJECT_OT_armature_add(struct wmOperatorType *ot);
void OBJECT_OT_lamp_add(struct wmOperatorType *ot);
void OBJECT_OT_primitive_add(struct wmOperatorType *ot); /* only used as menu */
+void OBJECT_OT_effector_add(struct wmOperatorType *ot);
void OBJECT_OT_duplicates_make_real(struct wmOperatorType *ot);
void OBJECT_OT_duplicate(struct wmOperatorType *ot);
@@ -175,5 +176,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_modifier.c b/source/blender/editors/object/object_modifier.c
index cc8cc420bf7..7f0f1876417 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -110,7 +110,7 @@ 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 +159,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);
}
diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c
index 7397cead505..9bfd6a4201c 100644
--- a/source/blender/editors/object/object_ops.c
+++ b/source/blender/editors/object/object_ops.c
@@ -117,6 +117,7 @@ void ED_operatortypes_object(void)
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_effector_add);
WM_operatortype_append(OBJECT_OT_primitive_add);
WM_operatortype_append(OBJECT_OT_mesh_add);
WM_operatortype_append(OBJECT_OT_metaball_add);
@@ -176,6 +177,9 @@ 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);
/* macros */
ot= WM_operatortype_append_macro("OBJECT_OT_duplicate_move", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
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 a5e169eba06..ac47ddebc1f 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;
@@ -675,6 +672,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 +803,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 +844,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,6 +1000,9 @@ 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);
@@ -1079,7 +1088,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 {
@@ -2444,6 +2453,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);
@@ -3948,61 +3959,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)
-{
- wmKeyMap *keymap;
-
- keymap= WM_keymap_find(wm, "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);
-}
-
diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c
new file mode 100644
index 00000000000..1dc08a162b7
--- /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_face(dm,nearest.index);
+
+ VecCopyf(v[0], CDDM_get_vert(dm,mface->v1)->co);
+ VecCopyf(v[1], CDDM_get_vert(dm,mface->v2)->co);
+ VecCopyf(v[2], CDDM_get_vert(dm,mface->v3)->co);
+ if(mface->v4) {
+ VecCopyf(v[3], CDDM_get_vert(dm,mface->v4)->co);
+ MeanValueWeights(v, 4, nearest.co, pa->fuv);
+ }
+ else
+ MeanValueWeights(v, 3, nearest.co, pa->fuv);
+
+ pa->num = nearest.index;
+ pa->num_dmcache = psys_particle_dm_face_lookup(ob,psmd->dm,pa->num,pa->fuv,NULL);
+
+ psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, pa, hairmat);
+ Mat4Invert(imat,hairmat);
+
+ VECSUB(vec, nearest.co, key->co);
+
+ if(point) {
+ ekey = point->keys;
+ point++;
+ }
+
+ for(k=0,key=pa->hair; k<pa->totkey; k++,key++) {
+ VECADD(key->co, key->co, vec);
+ Mat4MulVecfl(imat,key->co);
+
+ if(ekey) {
+ ekey->flag |= PEK_USE_WCO;
+ ekey++;
+ }
+ }
+ }
+
+ free_bvhtree_from_mesh(&bvhtree);
+ 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..ddc5fb9c9b6
--- /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(wmWindowManager *wm)
+{
+ wmKeyMap *keymap;
+
+ keymap= WM_keymap_find(wm, "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(wmWindowManager *wm)
+{
+ keymap_particle(wm);
+ //keymap_pointcache(wm);
+}
+
+
+
diff --git a/source/blender/editors/physics/ed_pointcache.c b/source/blender/editors/physics/physics_pointcache.c
index ed3aaf0cfd1..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)
-//{
-// 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);
-//}
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/preview/SConscript b/source/blender/editors/render/SConscript
index 922232822ff..bddc5ed10e0 100644
--- a/source/blender/editors/preview/SConscript
+++ b/source/blender/editors/render/SConscript
@@ -9,4 +9,11 @@ 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] )
+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/preview/previewrender_intern.h b/source/blender/editors/render/render_intern.h
index 74a3aeee754..dccc2d36002 100644
--- a/source/blender/editors/preview/previewrender_intern.h
+++ b/source/blender/editors/render/render_intern.h
@@ -26,12 +26,24 @@
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef PREVIEWRENDER_INTERN_H
-#define PREVIEWRENDER_INTERN_H
+#ifndef RENDER_INTERN_H
+#define RENDER_INTERN_H
-/* internal exports only */
+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 MATERIAL_OT_new(struct wmOperatorType *ot);
+void TEXTURE_OT_new(struct wmOperatorType *ot);
+void WORLD_OT_new(struct wmOperatorType *ot);
-#endif /* PREVIEWRENDER_INTERN_H */
+void SCENE_OT_render_layer_add(struct wmOperatorType *ot);
+void SCENE_OT_render_layer_remove(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..8b60582d466
--- /dev/null
+++ b/source/blender/editors/render/render_ops.c
@@ -0,0 +1,54 @@
+/**
+ * $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(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);
+}
+
diff --git a/source/blender/editors/preview/previewrender.c b/source/blender/editors/render/render_preview.c
index 7a4cc1c7865..4a671e4d2ba 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) {
@@ -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);
@@ -426,6 +446,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 +471,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 +484,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;
}
@@ -509,6 +534,12 @@ void ED_preview_draw(const bContext *C, void *idp, void *parentp, void *slotp, r
}
}
+/* ******************************** 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)
@@ -819,7 +850,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)
@@ -906,7 +937,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 */
@@ -919,7 +950,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;
@@ -944,63 +975,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;
- if(GS(id->name) == ID_TE) {
- ntreeTexSetPreviewFlag(1);
+ /* 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;
}
- steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), owner);
+ 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);
+}
+
+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)
{
+ 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= PR_DO_RENDER;
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..56605ad0970
--- /dev/null
+++ b/source/blender/editors/render/render_shading.c
@@ -0,0 +1,645 @@
+/**
+ * $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 "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) {
+ EditMesh *em= ((Mesh*)ob->data)->edit_mesh;
+ EditFace *efa;
+
+ if(em) {
+ for(efa= em->faces.first; efa; efa=efa->next)
+ if(efa->f & 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= ((Mesh*)ob->data)->edit_mesh;
+
+ 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;
+}
+
+/********************** 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;
+}
+
diff --git a/source/blender/editors/screen/SConscript b/source/blender/editors/screen/SConscript
index a4f73cfea7e..847a1cddfb4 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 87901d75494..fb782837d5e 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -958,17 +958,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);
+ }
}
}
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_ops.c b/source/blender/editors/screen/screen_ops.c
index ae3f74403f2..7f2084d5a76 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -2703,18 +2703,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... */
@@ -2814,6 +2809,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;
@@ -2897,7 +2904,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);
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 d223c423690..7596191e781 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;
@@ -2934,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->getFaceArray(ps->dm);
ps->dm_mtface= ps->dm->getFaceDataArray(ps->dm, CD_MTFACE);
@@ -3402,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. */
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 64af39ea497..01a2ff3fdee 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>
@@ -304,21 +305,35 @@ static void calc_area_normal(Sculpt *sd, SculptSession *ss, float out[3], const
static void do_draw_brush(Sculpt *sd, SculptSession *ss, const ListBase* active_verts)
{
float area_normal[3];
+ int j;
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 +383,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 +396,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 +442,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 +452,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 +474,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 +482,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 +498,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 +533,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 +607,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 +619,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 +647,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 +982,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 +1000,32 @@ 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);
+ }
+
+ //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)
@@ -1004,9 +1114,10 @@ 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->mvert = dm->getVertDataArray(dm, CD_MVERT);
@@ -1021,6 +1132,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);
@@ -1332,16 +1449,27 @@ static void sculpt_restore_mesh(Sculpt *sd, SculptSession *ss)
{
StrokeCache *cache = ss->cache;
Brush *brush = paint_brush(&sd->paint);
+ float *buffer;
int i;
-
+
/* Restore the mesh before continuing with anchored stroke */
if((brush->flag & BRUSH_ANCHORED) && ss->mesh_co_orig) {
+ buffer = buffer = ss->drawobject!=0?(float *)GPU_buffer_lock( ss->drawobject->normals ):0;
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;
diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c
index 865d072d938..0bcf4b037cb 100644
--- a/source/blender/editors/space_action/action_edit.c
+++ b/source/blender/editors/space_action/action_edit.c
@@ -86,6 +86,8 @@
#include "WM_api.h"
#include "WM_types.h"
+#include "UI_interface.h"
+
#include "action_intern.h"
/* ************************************************************************** */
@@ -96,14 +98,25 @@
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");
- /* combined with RNA property, this will assign & increase user,
- so decrease here to compensate for that */
- action->id.us--;
-
+ /* 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);
diff --git a/source/blender/editors/space_api/spacetypes.c b/source/blender/editors/space_api/spacetypes.c
index 18bc7ec9555..8c563c98d9b 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,15 +92,13 @@ 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();
@@ -127,7 +125,7 @@ void ED_spacetypes_keymap(wmWindowManager *wm)
ED_keymap_uvedit(wm);
ED_keymap_curve(wm);
ED_keymap_armature(wm);
- ED_keymap_particle(wm);
+ ED_keymap_physics(wm);
ED_keymap_metaball(wm);
ED_keymap_paint(wm);
ED_marker_keymap(wm);
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 4387da19341..2d961f78243 100644
--- a/source/blender/editors/space_buttons/buttons_ops.c
+++ b/source/blender/editors/space_buttons/buttons_ops.c
@@ -30,53 +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 "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"
@@ -85,953 +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) {
- EditMesh *em= ((Mesh*)ob->data)->edit_mesh;
- EditFace *efa;
-
- if(em) {
- for(efa= em->faces.first; efa; efa=efa->next)
- if(efa->f & 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= ((Mesh*)ob->data)->edit_mesh;
-
- 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;
-}
-
-/********************** 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;
- 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_face(dm,nearest.index);
-
- VecCopyf(v[0], CDDM_get_vert(dm,mface->v1)->co);
- VecCopyf(v[1], CDDM_get_vert(dm,mface->v2)->co);
- VecCopyf(v[2], CDDM_get_vert(dm,mface->v3)->co);
- if(mface->v4) {
- VecCopyf(v[3], CDDM_get_vert(dm,mface->v4)->co);
- MeanValueWeights(v, 4, nearest.co, pa->fuv);
- }
- else
- MeanValueWeights(v, 3, nearest.co, pa->fuv);
-
- pa->num = nearest.index;
- pa->num_dmcache = psys_particle_dm_face_lookup(ob,psmd->dm,pa->num,pa->fuv,NULL);
-
- psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, pa, hairmat);
- Mat4Invert(imat,hairmat);
-
- VECSUB(vec, nearest.co, key->co);
-
- if(point) {
- ekey = point->keys;
- point++;
- }
-
- for(k=0,key=pa->hair; k<pa->totkey; k++,key++) {
- VECADD(key->co, key->co, vec);
- Mat4MulVecfl(imat,key->co);
-
- if(ekey) {
- ekey->flag |= PEK_USE_WCO;
- ekey++;
- }
- }
- }
-
- free_bvhtree_from_mesh(&bvhtree);
- 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)
diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c
index 48acaffd580..6ffbb79f273 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
@@ -185,33 +185,6 @@ 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);
}
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 5d02e096228..77a1b671054 100644
--- a/source/blender/editors/space_file/file_draw.c
+++ b/source/blender/editors/space_file/file_draw.c
@@ -313,16 +313,16 @@ static int get_file_icon(struct direntry *file)
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);
}
diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c
index ed0d998ef40..77f50d91e77 100644
--- a/source/blender/editors/space_file/space_file.c
+++ b/source/blender/editors/space_file/space_file.c
@@ -377,6 +377,7 @@ 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_find(wm, "FileMain", SPACE_FILE, 0);
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_utils.c b/source/blender/editors/space_graph/graph_utils.c
index 25087441b6a..ee4e371e1f1 100644
--- a/source/blender/editors/space_graph/graph_utils.c
+++ b/source/blender/editors/space_graph/graph_utils.c
@@ -292,7 +292,6 @@ int graphop_selected_fcurve_poll (bContext *C)
ListBase anim_data = {NULL, NULL};
ScrArea *sa= CTX_wm_area(C);
int filter, items;
- short found = 0;
/* firstly, check if in Graph Editor */
// TODO: also check for region?
@@ -311,7 +310,7 @@ int graphop_selected_fcurve_poll (bContext *C)
/* cleanup and return findings */
BLI_freelistN(&anim_data);
- return found;
+ return 1;
}
/* ************************************************************** */
diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c
index bdf3e9416b9..67fb95b1f6b 100644
--- a/source/blender/editors/space_image/image_buttons.c
+++ b/source/blender/editors/space_image/image_buttons.c
@@ -204,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;
@@ -497,9 +493,8 @@ void brush_buttons(const bContext *C, uiBlock *block, short fromsima,
static int image_panel_poll(const bContext *C, PanelType *pt)
{
SpaceImage *sima= CTX_wm_space_image(C);
- ImBuf *ibuf= ED_space_image_buffer(sima);
- return (ibuf != NULL);
+ return ED_space_image_has_buffer(sima);
}
static void image_panel_curves(const bContext *C, Panel *pa)
@@ -509,8 +504,9 @@ static void image_panel_curves(const bContext *C, Panel *pa)
ImBuf *ibuf;
PointerRNA simaptr;
int levels;
+ void *lock;
- ibuf= ED_space_image_buffer(sima);
+ ibuf= ED_space_image_acquire_buffer(sima, &lock);
if(ibuf) {
if(sima->cumap==NULL)
@@ -522,6 +518,8 @@ static void image_panel_curves(const bContext *C, Panel *pa)
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
@@ -923,6 +921,7 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, char *propn
uiBlock *block;
uiBut *but;
char str[128];
+ void *lock;
if(!ptr->data)
return;
@@ -953,8 +952,9 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, char *propn
uiBlockSetNFunc(block, rna_update_cb, MEM_dupallocN(cb), NULL);
if(ima->source == IMA_SRC_VIEWER) {
- ibuf= BKE_image_get_ibuf(ima, iuser);
+ 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);
@@ -981,7 +981,10 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, char *propn
}
else if(ima->type==IMA_TYPE_R_RESULT) {
/* browse layer/passes */
- uiblock_layer_pass_arrow_buttons(layout, RE_GetResult(RE_GetRender(scene->id.name)), iuser);
+ Render *re= RE_GetRender(scene->id.name);
+ RenderResult *rr= RE_AcquireResultRead(re);
+ uiblock_layer_pass_arrow_buttons(layout, rr, iuser);
+ RE_ReleaseResult(re);
}
}
else {
@@ -1010,8 +1013,9 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, char *propn
uiblock_layer_pass_arrow_buttons(layout, ima->rr, iuser);
}
else if(ima->source != IMA_SRC_GENERATED) {
- ibuf= BKE_image_get_ibuf(ima, iuser);
+ ibuf= BKE_image_acquire_ibuf(ima, iuser, &lock);
image_info(ima, ibuf, str);
+ BKE_image_release_ibuf(ima, lock);
uiItemL(layout, str, 0);
}
@@ -1081,10 +1085,12 @@ void uiTemplateImageLayers(uiLayout *layout, bContext *C, Image *ima, ImageUser
/* render layers and passes */
if(ima && iuser) {
- rr= BKE_image_get_renderresult(scene, ima);
+ rr= BKE_image_acquire_renderresult(scene, ima);
if(rr)
uiblock_layer_pass_buttons(layout, rr, iuser, 160);
+
+ BKE_image_release_renderresult(scene, ima);
}
}
diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c
index fa736a29ce8..a42fec30c45 100644
--- a/source/blender/editors/space_image/image_draw.c
+++ b/source/blender/editors/space_image/image_draw.c
@@ -533,11 +533,14 @@ 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... */
@@ -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 317a058d20e..91316fba4d0 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -112,7 +112,7 @@ 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 +121,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;
}
@@ -388,7 +393,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 +402,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 +448,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 +458,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,27 +616,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;
+ }
- /* already set later */
- ima->id.us--;
+ 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 */
+ 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);
- if(sima)
- ED_space_image_set(C, sima, scene, obedit, ima);
+
+ MEM_freeN(op->customdata);
return OPERATOR_FINISHED;
}
@@ -648,6 +683,8 @@ 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);
+
image_filesel(C, op, path);
return OPERATOR_RUNNING_MODAL;
@@ -662,6 +699,7 @@ void IMAGE_OT_open(wmOperatorType *ot)
/* api callbacks */
ot->exec= open_exec;
ot->invoke= open_invoke;
+ ot->cancel= open_cancel;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -730,7 +768,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) {
@@ -751,7 +790,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);
@@ -765,6 +804,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));
@@ -792,6 +832,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)
@@ -816,8 +858,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);
@@ -826,6 +869,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))
@@ -842,10 +887,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;
}
@@ -874,12 +923,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 */
@@ -888,14 +941,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;
}
@@ -1037,6 +1097,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;
@@ -1055,12 +1117,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);
- ima->id.us--; /* already set later */
- if(sima) { // XXX other users?
- 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;
}
@@ -1110,9 +1187,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))
@@ -1133,8 +1209,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");
@@ -1294,6 +1370,7 @@ typedef struct ImageSampleInfo {
ARegionType *art;
void *draw_handle;
int x, y;
+ int channels;
char col[4];
float colf[4];
@@ -1310,14 +1387,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);
}
@@ -1325,13 +1397,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;
@@ -1348,6 +1423,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;
@@ -1424,6 +1500,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));
}
@@ -1440,10 +1517,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");
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index 55b910cf6b4..4cf59c9a28e 100644
--- a/source/blender/editors/space_image/space_image.c
+++ b/source/blender/editors/space_image/space_image.c
@@ -328,7 +328,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;
@@ -336,24 +336,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;
@@ -431,9 +416,12 @@ 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);
@@ -621,7 +609,7 @@ 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;
@@ -631,7 +619,7 @@ ImBuf *ED_space_image_buffer(SpaceImage *sima)
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;
@@ -640,11 +628,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;
@@ -654,24 +663,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_node/SConscript b/source/blender/editors/space_node/SConscript
index 5453aa7dd44..fd0dfe83852 100644
--- a/source/blender/editors/space_node/SConscript
+++ b/source/blender/editors/space_node/SConscript
@@ -14,5 +14,12 @@ if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
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/node_draw.c b/source/blender/editors/space_node/node_draw.c
index 1d57f4e0d4c..3fc91fea914 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -48,8 +48,9 @@
#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"
@@ -187,6 +188,8 @@ static void node_update(const bContext *C, bNodeTree *ntree, bNode *node)
/* 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;
@@ -222,6 +225,8 @@ static void node_update(const bContext *C, bNodeTree *ntree, 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 */
@@ -685,7 +690,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) {
@@ -693,21 +698,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 */
@@ -720,7 +722,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);
}
@@ -839,9 +841,12 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
}
/* 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);
+ BLI_unlock_thread(LOCK_PREVIEW);
+ }
uiEndBlock(C, node->block);
uiDrawBlock(C, node->block);
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index 5fc09408229..50a99650ec0 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -62,7 +62,7 @@
#include "BKE_scene.h"
#include "BKE_utildefines.h"
-#include "ED_previewrender.h"
+#include "ED_render.h"
#include "BIF_gl.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);
diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c
index 12a5f33e119..2cfd9d99123 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"
diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c
index a1fdbab9ccc..e62c1dedb1b 100644
--- a/source/blender/editors/space_outliner/outliner.c
+++ b/source/blender/editors/space_outliner/outliner.c
@@ -4324,7 +4324,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 +4579,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 +4597,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 +4812,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;
@@ -4924,7 +4924,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;
@@ -5139,7 +5139,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;
@@ -5217,7 +5217,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/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c
index e7e6c2d0128..eb0e9dafbaa 100644
--- a/source/blender/editors/space_outliner/space_outliner.c
+++ b/source/blender/editors/space_outliner/space_outliner.c
@@ -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_text/text_ops.c b/source/blender/editors/space_text/text_ops.c
index 8e81336912b..44f7a097a18 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 */
diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c
index da67bd8707e..a4d7ae802f6 100644
--- a/source/blender/editors/space_view3d/drawmesh.c
+++ b/source/blender/editors/space_view3d/drawmesh.c
@@ -70,6 +70,7 @@
#include "UI_resources.h"
#include "UI_interface_icons.h"
+#include "gpu_buffers.h"
#include "GPU_extensions.h"
#include "GPU_draw.h"
@@ -398,8 +399,7 @@ static void draw_textured_end()
glPopMatrix();
}
-
-static int draw_tface__set_draw(MTFace *tface, MCol *mcol, int matnr)
+static int draw_tface__set_draw_legacy(MTFace *tface, MCol *mcol, int matnr)
{
if (tface && (tface->mode&TF_INVISIBLE)) return 0;
@@ -421,6 +421,87 @@ static int draw_tface__set_draw(MTFace *tface, MCol *mcol, 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_get_face_data_layer(dm, CD_MFACE);
+ MCol *finalCol;
+ int i,j;
+ MCol *mcol = dm->getFaceDataArray(dm, CD_WEIGHT_MCOL);
+ if(!mcol)
+ mcol = dm->getFaceDataArray(dm, CD_MCOL);
+
+ finalCol = MEM_mallocN(sizeof(MCol)*4*dm->getNumFaces(dm),"add_tface_color_layer");
+ for(i=0;i<dm->getNumFaces(dm);i++) {
+ if (tface && (tface->mode&TF_INVISIBLE)) {
+ 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)
{
@@ -561,6 +642,7 @@ void draw_mesh_textured(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *o
draw_textured_begin(scene, v3d, rv3d, ob);
if(ob == scene->obedit) {
+ glColor4f(1.0f,1.0f,1.0f,1.0f);
dm->drawMappedFacesTex(dm, draw_em_tf_mapped__set_draw, me->edit_mesh);
} else if(faceselect) {
if(ob->mode & OB_MODE_WEIGHT_PAINT)
@@ -569,7 +651,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 60ae91e7a89..1bad1b3215c 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -102,6 +102,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"
@@ -113,6 +114,7 @@
#include "UI_interface_icons.h"
#include "WM_api.h"
+#include "wm_subwindow.h"
#include "BLF_api.h"
#include "view3d_intern.h" // own include
@@ -1550,15 +1552,83 @@ 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(DerivedMesh *dm, int sel, EditVert *eve_act)
{
struct { int sel; EditVert *eve_act; } data;
+ //GPUBuffer *buffer;
+ //float *varray;
data.sel = sel;
data.eve_act = eve_act;
-
- 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 */
@@ -1626,12 +1696,59 @@ static void draw_dm_edges_sel_interp__setDrawInterpOptions(void *userData, int i
col0[2] + (col1[2]-col0[2])*t,
col0[3] + (col1[3]-col0[3])*t);
}
+
static void draw_dm_edges_sel_interp(DerivedMesh *dm, unsigned char *baseCol, unsigned char *selCol)
{
- unsigned char *cols[2];
- cols[0] = baseCol;
- cols[1] = selCol;
- dm->drawMappedEdgesInterp(dm, draw_dm_edges_sel_interp__setDrawOptions, draw_dm_edges_sel_interp__setDrawInterpOptions, cols);
+ unsigned char *cols[2] = {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 */
@@ -1685,12 +1802,236 @@ static int draw_dm_faces_sel__setDrawOptions(void *userData, int index, int *dra
static void draw_dm_faces_sel(DerivedMesh *dm, unsigned char *baseCol, unsigned char *selCol, unsigned char *actCol, EditFace *efa_act)
{
struct { unsigned char *cols[3]; EditFace *efa_act; } data;
+ //EditMeshDerivedMesh *emdm = (EditMeshDerivedMesh *)dm;
+ EditFace *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.cols[1] = selCol;
data.cols[2] = actCol;
data.efa_act = efa_act;
-
- dm->drawMappedFaces(dm, draw_dm_faces_sel__setDrawOptions, &data, 0);
+
+
+ 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 {
+ dm->drawMappedFaces(dm, draw_dm_faces_sel__setDrawOptions, &data, 0);
+ }
+ GPU_buffer_free( buffer, 0 );
}
static int draw_dm_creases__setDrawOptions(void *userData, int index)
@@ -2103,12 +2444,115 @@ 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->totface*3*2, 0 );
+ float *varray;
+ EditFace *efa;
+ 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, 0, 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,efa= em->faces.first; efa; i++,efa= efa->next) {
+ int drawSmooth = (efa->flag & ME_SMOOTH);
+ if( efa->h == 0 ) {
+ 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],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++;
+ }
+ }
+ }
+ 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);
@@ -2926,7 +3370,30 @@ static int drawDispList(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *bas
}
/* *********** drawing for particles ************* */
+static void draw_particle_arrays(int draw_as, int totpoint, int ob_dt, int select)
+{
+ /* 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);
+ glDrawArrays(GL_QUADS, 0, 4*totpoint);
+ break;
+ default:
+ glDrawArrays(GL_POINTS, 0, totpoint);
+ break;
+ }
+}
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];
@@ -2969,7 +3436,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);
}
@@ -3120,7 +3587,13 @@ 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);
@@ -3150,23 +3623,21 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
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;
+ }
+ else
+ cpack(0);
+ if(pdd) {
pdd->ma_r = &ma_r;
pdd->ma_g = &ma_g;
pdd->ma_b = &ma_b;
-
- create_cdata = 1;
}
- else
- cpack(0);
timestep= psys_get_timestep(&sim);
@@ -3178,11 +3649,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);
@@ -3212,6 +3678,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)
@@ -3259,9 +3728,15 @@ 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");
@@ -3271,37 +3746,36 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
psys_make_temp_pointcache(ob, psys);
}
+ 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(draw_as!=PART_DRAW_CIRC) {
- switch(draw_as) {
- case PART_DRAW_AXIS:
- case PART_DRAW_CROSS:
- if(draw_as != PART_DRAW_CROSS || create_cdata)
- if(!pdd->cdata) pdd->cdata = MEM_callocN(tot_vec_size * 6, "particle_cdata");
- if(!pdd->vdata) pdd->vdata = MEM_callocN(tot_vec_size * 6, "particle_vdata");
- break;
- case PART_DRAW_LINE:
- if(create_cdata)
- if(!pdd->cdata) pdd->cdata = MEM_callocN(tot_vec_size * 2, "particle_cdata");
- if(!pdd->vdata) pdd->vdata = MEM_callocN(tot_vec_size * 2, "particle_vdata");
- break;
- case PART_DRAW_BB:
- if(create_cdata)
- if(!pdd->cdata) pdd->cdata = MEM_callocN(tot_vec_size * 4, "particle_cdata");
- if(!pdd->vdata) pdd->vdata = MEM_callocN(tot_vec_size * 4, "particle_vdata");
- if(!pdd->ndata) pdd->ndata = MEM_callocN(tot_vec_size * 4, "particle_vdata");
- break;
- default:
- if(create_cdata)
- if(!pdd->cdata) pdd->cdata=MEM_callocN(tot_vec_size, "particle_cdata");
- if(!pdd->vdata) pdd->vdata=MEM_callocN(tot_vec_size, "particle_vdata");
- }
- }
+ 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) {
- if(!pdd->vedata) 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;
}
@@ -3310,11 +3784,11 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
pdd->cd= pdd->cdata;
pdd->nd= pdd->ndata;
pdd->tot_vec_size= tot_vec_size;
-
- psys->lattice= psys_get_lattice(&sim);
}
- if(draw_as){
+ psys->lattice= psys_get_lattice(&sim);
+
+ if(pdd && draw_as!=PART_DRAW_PATH){
/* 5. */
if((pdd->flag & PARTICLE_DRAW_DATA_UPDATED)
&& (pdd->vedata || part->draw & (PART_DRAW_SIZE|PART_DRAW_NUM|PART_DRAW_HEALTH))==0) {
@@ -3402,156 +3876,139 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
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(&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;
- }
+ 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, psys->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(&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;
- }
+ }
+ 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_cached_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;
-
- glEnableClientState(GL_VERTEX_ARRAY);
+ glGetIntegerv(GL_POLYGON_MODE, polygonmode);
+ glDisableClientState(GL_NORMAL_ARRAY);
- /* setup gl flags */
- if(ob_dt > OB_WIRE) {
- glEnableClientState(GL_NORMAL_ARRAY);
+ if(draw_as==PART_DRAW_PATH){
+ ParticleCacheKey **cache, *path;
+ float *cd2=0,*cdata2=0;
- if(part->draw&PART_DRAW_MAT_COL)
- glEnableClientState(GL_COLOR_ARRAY);
+ glEnableClientState(GL_VERTEX_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) {
@@ -3562,86 +4019,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 */
- pdd->flag |= PARTICLE_DRAW_DATA_UPDATED;
- pdd->totpoint = totpoint;
+ /* 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);
@@ -3653,6 +4127,12 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
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;
@@ -5606,6 +6086,16 @@ static int bbs_mesh_solid__setDrawOpts(void *userData, int index, int *drawSmoot
Mesh *me = userData;
if (!(me->mface[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 {
@@ -5618,9 +6108,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->getNumFaces(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);
}
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index 6e415ec731d..c175f835d67 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -448,12 +448,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 */
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c
index 496db8c00f8..ec72d72013b 100644
--- a/source/blender/editors/space_view3d/view3d_buttons.c
+++ b/source/blender/editors/space_view3d/view3d_buttons.c
@@ -886,7 +886,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);
diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c
index 45828d654aa..0d19a720cdb 100644
--- a/source/blender/editors/space_view3d/view3d_header.c
+++ b/source/blender/editors/space_view3d/view3d_header.c
@@ -2128,7 +2128,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 */
@@ -2145,9 +2145,9 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
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;
@@ -2169,10 +2169,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/transform/transform.c b/source/blender/editors/transform/transform.c
index 84e42294946..b109157d859 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -1326,6 +1326,7 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
if ((t->options & CTX_NO_PET) == 0)
{
ts->proportional = proportional;
+ ts->proportional_size = t->prop_size;
}
if(t->spacetype == SPACE_VIEW3D)
diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h
index abe73a755dc..2c19bf932eb 100644
--- a/source/blender/editors/transform/transform.h
+++ b/source/blender/editors/transform/transform.h
@@ -38,6 +38,7 @@
struct TransInfo;
struct TransData;
+struct TransformOrientation;
struct TransSnap;
struct NumInput;
struct Object;
@@ -54,6 +55,7 @@ struct bContext;
struct wmEvent;
struct wmTimer;
struct ARegion;
+struct ReportList;
typedef struct NDofInput {
int flag;
@@ -663,18 +665,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
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index a49950f15f1..f6d30a7bec9 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -4825,7 +4825,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 {
@@ -4848,6 +4848,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))
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index 88469794e5d..6637122ffb8 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -92,6 +92,7 @@
#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"
@@ -346,7 +347,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) {
diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c
index 93bc02d7180..bdf0a91bf89 100644
--- a/source/blender/editors/transform/transform_manipulator.c
+++ b/source/blender/editors/transform/transform_manipulator.c
@@ -412,6 +412,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) {
@@ -473,8 +476,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;
+ }
}
}
@@ -1602,7 +1609,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) {
@@ -1632,10 +1639,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) {
@@ -1650,7 +1657,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 f369fba79df..0440a957539 100644
--- a/source/blender/editors/transform/transform_ops.c
+++ b/source/blender/editors/transform/transform_ops.c
@@ -152,8 +152,9 @@ void TFM_OT_select_orientation(struct wmOperatorType *ot)
/* 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;
@@ -164,6 +165,92 @@ void TFM_OT_select_orientation(struct wmOperatorType *ot)
RNA_def_enum_funcs(prop, select_orientation_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);
+
+ 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);
+
+ /* Do we need more refined tags? */
+ WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
+
+ 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)
{
saveTransform(C, op->customdata, op);
@@ -643,6 +730,8 @@ void transform_operatortypes(void)
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 wmKeyMap *keymap, int spaceid)
@@ -675,6 +764,9 @@ void transform_keymap_for_space(struct wmWindowManager *wm, struct wmKeyMap *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);
+
break;
case SPACE_ACTION:
km= WM_keymap_add_item(keymap, "TFM_OT_transform", GKEY, KM_PRESS, 0, 0);
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index d82be842596..c9344b97fb2 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"
@@ -43,6 +44,7 @@
#include "BKE_utildefines.h"
#include "BKE_armature.h"
#include "BKE_context.h"
+#include "BKE_report.h"
#include "BLI_arithb.h"
#include "BLI_blenlib.h"
@@ -67,108 +69,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 */
+ }
+}
+
+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_manageTransformOrientation(bContext *C, int confirm, int set) {
+
+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;
-/* return 1 on confirm */
-int confirmSpace(int set, char text[])
-{
- char menu[64];
+
+ ob = base->object;
- if (set) {
- sprintf(menu, "Custom Orientation %%t|Add and Use %s%%x1", text);
- }
- else {
- sprintf(menu, "Custom Orientation %%t|Add %s%%x1", text);
+ Mat3CpyMat4(mat, ob->obmat);
+ Mat3Ortho(mat);
+
+ /* use object name if no name is given */
+ if (name[0] == 0)
+ {
+ 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;
}
- strcpy(name, "Bone");
-
- /* Input name */
-//XXX sbutton(name, 1, 35, "name: ");
+ if (name[0] == 0)
+ {
+ strcpy(name, "Bone");
+ }
- 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);
@@ -176,51 +201,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;
}
- strcpy(name, "Vertex");
+ 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;
}
- strcpy(name, "Edge");
+ 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;
}
- strcpy(name, "Face");
+ 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])
@@ -271,32 +289,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 */
@@ -310,31 +313,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) {
- // 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--;
+ 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;
+ }
+ }
+}
+
+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) {
@@ -433,7 +466,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 +475,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 +594,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 9438581409b..84dc9e69e7a 100644
--- a/source/blender/editors/transform/transform_snap.c
+++ b/source/blender/editors/transform/transform_snap.c
@@ -539,7 +539,6 @@ void CalcSnapGeometry(TransInfo *t, float *vec)
float no[3];
int found = 0;
int dist = SNAP_MIN_DISTANCE; // Use a user defined value here
- SnapMode mode;
if (t->settings->snap_mode == SCE_SNAP_MODE_VOLUME)
{
@@ -634,16 +633,7 @@ void CalcSnapGeometry(TransInfo *t, float *vec)
}
else
{
- if (t->obedit == NULL)
- {
- mode = SNAP_NOT_SELECTED;
- }
- else
- {
- mode = SNAP_NOT_OBEDIT;
- }
-
- found = snapObjectsTransform(t, t->mval, &dist, loc, no, mode);
+ found = snapObjectsTransform(t, t->mval, &dist, loc, no, t->tsnap.mode);
}
if (found == 1)
diff --git a/source/blender/gpu/gpu_buffers.h b/source/blender/gpu/gpu_buffers.h
new file mode 100644
index 00000000000..20b502387da
--- /dev/null
+++ b/source/blender/gpu/gpu_buffers.h
@@ -0,0 +1,157 @@
+/**
+ * $Id$
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2005 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Brecht Van Lommel.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#ifndef __GPU_BUFFERS_H__
+#define __GPU_BUFFERS_H__
+
+#define MAX_FREE_GPU_BUFFERS 8
+
+#ifdef _DEBUG
+/*#define DEBUG_VBO(X) printf(X)*/
+#define DEBUG_VBO(X)
+#else
+#define DEBUG_VBO(X)
+#endif
+
+struct DerivedMesh;
+
+/* V - vertex, N - normal, T - uv, C - color
+ F - float, UB - unsigned byte */
+#define GPU_BUFFER_INTER_V3F 1
+#define GPU_BUFFER_INTER_N3F 2
+#define GPU_BUFFER_INTER_T2F 3
+#define GPU_BUFFER_INTER_C3UB 4
+#define GPU_BUFFER_INTER_C4UB 5
+#define GPU_BUFFER_INTER_END -1
+
+typedef struct GPUBuffer
+{
+ int size; /* in bytes */
+ void *pointer; /* used with vertex arrays */
+ unsigned int id; /* used with vertex buffer objects */
+} GPUBuffer;
+
+typedef struct GPUBufferPool
+{
+ int size; /* number of allocated buffers stored */
+ int start; /* for a queue like structure */
+ /* when running out of space for storing buffers,
+ the last one used will be thrown away */
+
+ GPUBuffer* buffers[MAX_FREE_GPU_BUFFERS];
+} GPUBufferPool;
+
+typedef struct GPUBufferMaterial
+{
+ int start; /* at which vertex in the buffer the material starts */
+ int end; /* at which vertex it ends */
+ char mat_nr;
+} GPUBufferMaterial;
+
+typedef struct IndexLink {
+ int element;
+ struct IndexLink *next;
+} IndexLink;
+
+typedef struct GPUDrawObject
+{
+ GPUBuffer *vertices;
+ GPUBuffer *normals;
+ GPUBuffer *uv;
+ GPUBuffer *colors;
+ GPUBuffer *edges;
+ GPUBuffer *uvedges;
+
+ int *faceRemap; /* at what index was the face originally in DerivedMesh */
+ IndexLink *indices; /* given an index, find all elements using it */
+ IndexLink *indexMem; /* for faster memory allocation/freeing */
+ int indexMemUsage; /* how many are already allocated */
+ int colType;
+
+ GPUBufferMaterial *materials;
+
+ int nmaterials;
+ int nelements; /* (number of faces) * 3 */
+ int nlooseverts;
+ int nedges;
+ int nindices;
+ int legacy; /* if there was a failure allocating some buffer, use old rendering code */
+
+} GPUDrawObject;
+
+typedef struct GPUAttrib
+{
+ int index;
+ int size;
+ int type;
+} GPUAttrib;
+
+GPUBufferPool *GPU_buffer_pool_new();
+void GPU_buffer_pool_free( GPUBufferPool *pool ); /* TODO: Find a place where to call this function on exit */
+
+GPUBuffer *GPU_buffer_alloc( int size, GPUBufferPool *pool );
+void GPU_buffer_free( GPUBuffer *buffer, GPUBufferPool *pool );
+
+GPUDrawObject *GPU_drawobject_new( struct DerivedMesh *dm );
+void GPU_drawobject_free( struct DerivedMesh *dm );
+
+/* called before drawing */
+void GPU_vertex_setup( struct DerivedMesh *dm );
+void GPU_normal_setup( struct DerivedMesh *dm );
+void GPU_uv_setup( struct DerivedMesh *dm );
+void GPU_color_setup( struct DerivedMesh *dm );
+void GPU_edge_setup( struct DerivedMesh *dm ); /* does not mix with other data */
+void GPU_uvedge_setup( struct DerivedMesh *dm );
+void GPU_interleaved_setup( GPUBuffer *buffer, int data[] );
+int GPU_attrib_element_size( GPUAttrib data[], int numdata );
+void GPU_interleaved_attrib_setup( GPUBuffer *buffer, GPUAttrib data[], int numdata );
+
+/* can't lock more than one buffer at once */
+void *GPU_buffer_lock( GPUBuffer *buffer );
+void *GPU_buffer_lock_stream( GPUBuffer *buffer );
+void GPU_buffer_unlock( GPUBuffer *buffer );
+
+/* upload three unsigned chars, representing RGB colors, for each vertex. Resets dm->drawObject->colType to -1 */
+void GPU_color3_upload( struct DerivedMesh *dm, char *data );
+/* upload four unsigned chars, representing RGBA colors, for each vertex. Resets dm->drawObject->colType to -1 */
+void GPU_color4_upload( struct DerivedMesh *dm, char *data );
+/* switch color rendering on=1/off=0 */
+void GPU_color_switch( int mode );
+
+void GPU_buffer_draw_elements( GPUBuffer *elements, unsigned int mode, int start, int count );
+
+/* called after drawing */
+void GPU_buffer_unbind();
+
+int GPU_buffer_legacy( struct DerivedMesh *dm );
+
+#endif
diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c
new file mode 100644
index 00000000000..e750a3d05fd
--- /dev/null
+++ b/source/blender/gpu/intern/gpu_buffers.c
@@ -0,0 +1,1261 @@
+/**
+ * $Id$
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2005 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Brecht Van Lommel.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#include <string.h>
+
+#include "GL/glew.h"
+
+#include "MEM_guardedalloc.h"
+
+#include "BLI_arithb.h"
+
+#include "DNA_meshdata_types.h"
+
+#include "BKE_DerivedMesh.h"
+#include "BKE_utildefines.h"
+
+#include "DNA_userdef_types.h"
+
+#include "gpu_buffers.h"
+
+#define GPU_BUFFER_VERTEX_STATE 1
+#define GPU_BUFFER_NORMAL_STATE 2
+#define GPU_BUFFER_TEXCOORD_STATE 4
+#define GPU_BUFFER_COLOR_STATE 8
+#define GPU_BUFFER_ELEMENT_STATE 16
+
+#define MAX_GPU_ATTRIB_DATA 32
+
+/* -1 - undefined, 0 - vertex arrays, 1 - VBOs */
+int useVBOs = -1;
+GPUBufferPool *globalPool = 0;
+int GLStates = 0;
+GPUAttrib attribData[MAX_GPU_ATTRIB_DATA] = { { -1, 0, 0 } };
+
+GPUBufferPool *GPU_buffer_pool_new()
+{
+ GPUBufferPool *pool;
+
+ DEBUG_VBO("GPU_buffer_pool_new\n");
+
+ if( useVBOs < 0 ) {
+ if( GL_ARB_vertex_buffer_object ) {
+ DEBUG_VBO( "Vertex Buffer Objects supported.\n" );
+ useVBOs = 1;
+ }
+ else {
+ DEBUG_VBO( "Vertex Buffer Objects NOT supported.\n" );
+ useVBOs = 0;
+ }
+ }
+
+ pool = MEM_callocN(sizeof(GPUBufferPool), "GPU_buffer_pool_new");
+
+ return pool;
+}
+
+void GPU_buffer_pool_free(GPUBufferPool *pool)
+{
+ int i;
+
+ DEBUG_VBO("GPU_buffer_pool_free\n");
+
+ if( pool == 0 )
+ pool = globalPool;
+ if( pool == 0 )
+ return;
+
+ while( pool->start < 0 )
+ pool->start += MAX_FREE_GPU_BUFFERS;
+
+ for( i = 0; i < pool->size; i++ ) {
+ if( useVBOs ) {
+ glDeleteBuffersARB( 1, &pool->buffers[(pool->start+i)%MAX_FREE_GPU_BUFFERS]->id );
+ }
+ else {
+ MEM_freeN( pool->buffers[(pool->start+i)%MAX_FREE_GPU_BUFFERS]->pointer );
+ }
+ MEM_freeN(pool->buffers[(pool->start+i)%MAX_FREE_GPU_BUFFERS]);
+ }
+ MEM_freeN(pool);
+}
+
+void GPU_buffer_pool_remove( int index, GPUBufferPool *pool )
+{
+ int i;
+
+ DEBUG_VBO("GPU_buffer_pool_remove\n");
+
+ while( pool->start < 0 )
+ pool->start += MAX_FREE_GPU_BUFFERS;
+ for( i = index; i < pool->size-1; i++ ) {
+ pool->buffers[(pool->start+i)%MAX_FREE_GPU_BUFFERS] = pool->buffers[(pool->start+i+1)%MAX_FREE_GPU_BUFFERS];
+ }
+ pool->size--;
+}
+
+void GPU_buffer_pool_delete_last( GPUBufferPool *pool )
+{
+ int last;
+
+ DEBUG_VBO("GPU_buffer_pool_delete_last\n");
+
+ if( pool->size == 0 )
+ return;
+
+ last = pool->start+pool->size-1;
+ while( last < 0 )
+ last += MAX_FREE_GPU_BUFFERS;
+ last = (last+MAX_FREE_GPU_BUFFERS)%MAX_FREE_GPU_BUFFERS;
+
+ if( useVBOs ) {
+ glDeleteBuffersARB(1,&pool->buffers[last]->id);
+ MEM_freeN( pool->buffers[last] );
+ }
+ else {
+ MEM_freeN( pool->buffers[last]->pointer );
+ MEM_freeN( pool->buffers[last] );
+ }
+ pool->size--;
+}
+
+GPUBuffer *GPU_buffer_alloc( int size, GPUBufferPool *pool )
+{
+ char buffer[60];
+ int i;
+ int cursize;
+ GPUBuffer *allocated;
+ int bestfit = -1;
+
+ DEBUG_VBO("GPU_buffer_alloc\n");
+
+ if( pool == 0 ) {
+ if( globalPool == 0 )
+ globalPool = GPU_buffer_pool_new();
+ pool = globalPool;
+ }
+
+ while( pool->start < 0 )
+ pool->start += MAX_FREE_GPU_BUFFERS;
+
+ for( i = 0; i < pool->size; i++ ) {
+ int actuali = (pool->start+i)%MAX_FREE_GPU_BUFFERS;
+ cursize = pool->buffers[actuali]->size;
+ if( cursize == size ) {
+ allocated = pool->buffers[actuali];
+ GPU_buffer_pool_remove(i,pool);
+ DEBUG_VBO("free buffer of exact size found\n");
+ return allocated;
+ }
+ /* smaller buffers won't fit data and buffers at least twice as big are a waste of memory */
+ else if( cursize > size && size > cursize/2 ) {
+ /* is it closer to the required size than the last appropriate buffer found. try to save memory */
+ if( bestfit == -1 || pool->buffers[(pool->start+bestfit)%MAX_FREE_GPU_BUFFERS]->size > cursize ) {
+ bestfit = i;
+ }
+ }
+ }
+ if( bestfit == -1 ) {
+ DEBUG_VBO("allocating a new buffer\n");
+
+ allocated = MEM_mallocN(sizeof(GPUBuffer), "GPU_buffer_alloc");
+ allocated->size = size;
+ if( useVBOs == 1 ) {
+ glGenBuffersARB( 1, &allocated->id );
+ glBindBufferARB( GL_ARRAY_BUFFER_ARB, allocated->id );
+ glBufferDataARB( GL_ARRAY_BUFFER_ARB, size, 0, GL_STATIC_DRAW_ARB );
+ glBindBufferARB( GL_ARRAY_BUFFER_ARB, 0 );
+ }
+ else {
+ allocated->pointer = MEM_mallocN(size, "GPU_buffer_alloc_vertexarray");
+ while( allocated->pointer == 0 && pool->size > 0 ) {
+ GPU_buffer_pool_delete_last(pool);
+ allocated->pointer = MEM_mallocN(size, "GPU_buffer_alloc_vertexarray");
+ }
+ if( allocated->pointer == 0 && pool->size == 0 ) {
+ return 0;
+ }
+ }
+ }
+ else {
+ sprintf(buffer,"free buffer found. Wasted %d bytes\n", pool->buffers[(pool->start+bestfit)%MAX_FREE_GPU_BUFFERS]->size-size);
+ DEBUG_VBO(buffer);
+
+ allocated = pool->buffers[(pool->start+bestfit)%MAX_FREE_GPU_BUFFERS];
+ GPU_buffer_pool_remove(bestfit,pool);
+ }
+ return allocated;
+}
+
+void GPU_buffer_free( GPUBuffer *buffer, GPUBufferPool *pool )
+{
+ int place;
+
+ DEBUG_VBO("GPU_buffer_free\n");
+
+ if( buffer == 0 )
+ return;
+ if( pool == 0 )
+ pool = globalPool;
+ if( pool == 0 )
+ globalPool = GPU_buffer_pool_new();
+
+ while( pool->start < 0 )
+ pool->start += MAX_FREE_GPU_BUFFERS;
+ place = (pool->start-1 + MAX_FREE_GPU_BUFFERS)%MAX_FREE_GPU_BUFFERS;
+
+ /* free the last used buffer in the queue if no more space */
+ if( pool->size == MAX_FREE_GPU_BUFFERS ) {
+ GPU_buffer_pool_delete_last( pool );
+ }
+
+ pool->size++;
+ pool->start = place;
+ pool->buffers[place] = buffer;
+}
+
+GPUDrawObject *GPU_drawobject_new( DerivedMesh *dm )
+{
+ GPUDrawObject *object;
+ MVert *mvert;
+ MFace *mface;
+ int numverts[32768]; /* material number is an 16-bit short so there's at most 32768 materials */
+ int redir[32768]; /* material number is an 16-bit short so there's at most 32768 materials */
+ int *index;
+ int i;
+ int curmat, curverts, numfaces;
+
+ DEBUG_VBO("GPU_drawobject_new\n");
+
+ object = MEM_callocN(sizeof(GPUDrawObject),"GPU_drawobject_new_object");
+ object->nindices = dm->getNumVerts(dm);
+ object->indices = MEM_mallocN(sizeof(IndexLink)*object->nindices, "GPU_drawobject_new_indices");
+ object->nedges = dm->getNumEdges(dm);
+
+ for( i = 0; i < object->nindices; i++ ) {
+ object->indices[i].element = -1;
+ object->indices[i].next = 0;
+ }
+ /*object->legacy = 1;*/
+ memset(numverts,0,sizeof(int)*32768);
+
+ mvert = dm->getVertArray(dm);
+ mface = dm->getFaceArray(dm);
+
+ numfaces= dm->getNumFaces(dm);
+ for( i=0; i < numfaces; i++ ) {
+ if( mface[i].v4 )
+ numverts[mface[i].mat_nr+16383] += 6; /* split every quad into two triangles */
+ else
+ numverts[mface[i].mat_nr+16383] += 3;
+ }
+
+ for( i = 0; i < 32768; i++ ) {
+ if( numverts[i] > 0 ) {
+ object->nmaterials++;
+ object->nelements += numverts[i];
+ }
+ }
+ object->materials = MEM_mallocN(sizeof(GPUBufferMaterial)*object->nmaterials,"GPU_drawobject_new_materials");
+ index = MEM_mallocN(sizeof(int)*object->nmaterials,"GPU_drawobject_new_index");
+
+ curmat = curverts = 0;
+ for( i = 0; i < 32768; i++ ) {
+ if( numverts[i] > 0 ) {
+ object->materials[curmat].mat_nr = i-16383;
+ object->materials[curmat].start = curverts;
+ index[curmat] = curverts/3;
+ object->materials[curmat].end = curverts+numverts[i];
+ curverts += numverts[i];
+ curmat++;
+ }
+ }
+ object->faceRemap = MEM_mallocN(sizeof(int)*object->nelements/3,"GPU_drawobject_new_faceRemap");
+ for( i = 0; i < object->nmaterials; i++ ) {
+ redir[object->materials[i].mat_nr+16383] = i; /* material number -> material index */
+ }
+
+ object->indexMem = MEM_callocN(sizeof(IndexLink)*object->nelements,"GPU_drawobject_new_indexMem");
+ object->indexMemUsage = 0;
+
+#define ADDLINK( INDEX, ACTUAL ) \
+ if( object->indices[INDEX].element == -1 ) { \
+ object->indices[INDEX].element = ACTUAL; \
+ } else { \
+ IndexLink *lnk = &object->indices[INDEX]; \
+ while( lnk->next != 0 ) lnk = lnk->next; \
+ lnk->next = &object->indexMem[object->indexMemUsage]; \
+ lnk->next->element = ACTUAL; \
+ object->indexMemUsage++; \
+ }
+
+ for( i=0; i < numfaces; i++ ) {
+ int curInd = index[redir[mface[i].mat_nr+16383]];
+ object->faceRemap[curInd] = i;
+ ADDLINK( mface[i].v1, curInd*3 );
+ ADDLINK( mface[i].v2, curInd*3+1 );
+ ADDLINK( mface[i].v3, curInd*3+2 );
+ if( mface[i].v4 ) {
+ object->faceRemap[curInd+1] = i;
+ ADDLINK( mface[i].v3, curInd*3+3 );
+ ADDLINK( mface[i].v4, curInd*3+4 );
+ ADDLINK( mface[i].v1, curInd*3+5 );
+
+ index[redir[mface[i].mat_nr+16383]]+=2;
+ }
+ else {
+ index[redir[mface[i].mat_nr+16383]]++;
+ }
+ }
+
+ for( i = 0; i < object->nindices; i++ ) {
+ if( object->indices[i].element == -1 ) {
+ object->indices[i].element = object->nelements + object->nlooseverts;
+ object->nlooseverts++;
+ }
+ }
+#undef ADDLINK
+
+ MEM_freeN(index);
+ return object;
+}
+
+void GPU_drawobject_free( DerivedMesh *dm )
+{
+ GPUDrawObject *object;
+
+ DEBUG_VBO("GPU_drawobject_free\n");
+
+ if( dm == 0 )
+ return;
+ object = dm->drawObject;
+ if( object == 0 )
+ return;
+
+ MEM_freeN(object->materials);
+ MEM_freeN(object->faceRemap);
+ MEM_freeN(object->indices);
+ MEM_freeN(object->indexMem);
+ GPU_buffer_free( object->vertices, globalPool );
+ GPU_buffer_free( object->normals, globalPool );
+ GPU_buffer_free( object->uv, globalPool );
+ GPU_buffer_free( object->colors, globalPool );
+ GPU_buffer_free( object->edges, globalPool );
+ GPU_buffer_free( object->uvedges, globalPool );
+
+ MEM_freeN(object);
+ dm->drawObject = 0;
+}
+
+GPUBuffer *GPU_buffer_setup( DerivedMesh *dm, GPUDrawObject *object, int size, GLenum target, void *user, void (*copy_f)(DerivedMesh *, float *, int *, int *, void *) )
+{
+ GPUBuffer *buffer;
+ float *varray;
+ int redir[32768];
+ int *index;
+ int i;
+ int success;
+ GLboolean uploaded;
+
+ DEBUG_VBO("GPU_buffer_setup\n");
+
+ if( globalPool == 0 ) {
+ globalPool = GPU_buffer_pool_new();
+
+ /* somehow GL_NORMAL_ARRAY is enabled on startup and causes edge drawing code to crash */
+ glDisableClientState( GL_VERTEX_ARRAY );
+ glDisableClientState( GL_NORMAL_ARRAY );
+ glDisableClientState( GL_TEXTURE_COORD_ARRAY );
+ glDisableClientState( GL_COLOR_ARRAY );
+ }
+ buffer = GPU_buffer_alloc(size,globalPool);
+ if( buffer == 0 ) {
+ dm->drawObject->legacy = 1;
+ }
+ if( dm->drawObject->legacy ) {
+ return 0;
+ }
+
+ index = MEM_mallocN(sizeof(int)*object->nmaterials,"GPU_buffer_setup");
+ for( i = 0; i < object->nmaterials; i++ ) {
+ index[i] = object->materials[i].start*3;
+ redir[object->materials[i].mat_nr+16383] = i;
+ }
+
+ if( useVBOs ) {
+ success = 0;
+ while( success == 0 ) {
+ glBindBufferARB( target, buffer->id );
+ glBufferDataARB( target, buffer->size, 0, GL_STATIC_DRAW_ARB ); /* discard previous data, avoid stalling gpu */
+ varray = glMapBufferARB( target, GL_WRITE_ONLY_ARB );
+ if( varray == 0 ) {
+ DEBUG_VBO( "Failed to map buffer to client address space\n" );
+ GPU_buffer_free( buffer, globalPool );
+ GPU_buffer_pool_delete_last( globalPool );
+ if( globalPool->size > 0 ) {
+ GPU_buffer_pool_delete_last( globalPool );
+ buffer = GPU_buffer_alloc( size, globalPool );
+ if( buffer == 0 ) {
+ dm->drawObject->legacy = 1;
+ success = 1;
+ }
+ }
+ else {
+ dm->drawObject->legacy = 1;
+ success = 1;
+ }
+ }
+ else {
+ success = 1;
+ }
+ }
+
+ if( dm->drawObject->legacy == 0 ) {
+ uploaded = GL_FALSE;
+ while( !uploaded ) {
+ (*copy_f)( dm, varray, index, redir, user );
+ uploaded = glUnmapBufferARB( target ); /* returns false if data got corruped during transfer */
+ }
+ }
+ glBindBufferARB(target, 0);
+ }
+ else {
+ if( buffer->pointer != 0 ) {
+ varray = buffer->pointer;
+ (*copy_f)( dm, varray, index, redir, user );
+ }
+ else {
+ dm->drawObject->legacy = 1;
+ }
+ }
+
+ MEM_freeN(index);
+
+ return buffer;
+}
+
+void GPU_buffer_copy_vertex( DerivedMesh *dm, float *varray, int *index, int *redir, void *user )
+{
+ int start;
+ int i, j, numfaces;
+
+ MVert *mvert;
+ MFace *mface;
+
+ DEBUG_VBO("GPU_buffer_copy_vertex\n");
+
+ mvert = dm->getVertArray(dm);
+ mface = dm->getFaceArray(dm);
+
+ numfaces= dm->getNumFaces(dm);
+ for( i=0; i < numfaces; i++ ) {
+ start = index[redir[mface[i].mat_nr+16383]];
+ if( mface[i].v4 )
+ index[redir[mface[i].mat_nr+16383]] += 18;
+ else
+ index[redir[mface[i].mat_nr+16383]] += 9;
+
+ /* v1 v2 v3 */
+ VECCOPY(&varray[start],mvert[mface[i].v1].co);
+ VECCOPY(&varray[start+3],mvert[mface[i].v2].co);
+ VECCOPY(&varray[start+6],mvert[mface[i].v3].co);
+
+ if( mface[i].v4 ) {
+ /* v3 v4 v1 */
+ VECCOPY(&varray[start+9],mvert[mface[i].v3].co);
+ VECCOPY(&varray[start+12],mvert[mface[i].v4].co);
+ VECCOPY(&varray[start+15],mvert[mface[i].v1].co);
+ }
+ }
+ j = dm->drawObject->nelements*3;
+ for( i = 0; i < dm->drawObject->nindices; i++ ) {
+ if( dm->drawObject->indices[i].element >= dm->drawObject->nelements ) {
+ VECCOPY(&varray[j],mvert[i].co);
+ j+=3;
+ }
+ }
+}
+
+GPUBuffer *GPU_buffer_vertex( DerivedMesh *dm )
+{
+ DEBUG_VBO("GPU_buffer_vertex\n");
+
+ return GPU_buffer_setup( dm, dm->drawObject, sizeof(float)*3*(dm->drawObject->nelements+dm->drawObject->nlooseverts), GL_ARRAY_BUFFER_ARB, 0, GPU_buffer_copy_vertex);
+}
+
+void GPU_buffer_copy_normal( DerivedMesh *dm, float *varray, int *index, int *redir, void *user )
+{
+ int i, numfaces;
+ int start;
+ float norm[3];
+
+ float *nors= dm->getFaceDataArray(dm, CD_NORMAL);
+ MVert *mvert = dm->getVertArray(dm);
+ MFace *mface = dm->getFaceArray(dm);
+
+ DEBUG_VBO("GPU_buffer_copy_normal\n");
+
+ numfaces= dm->getNumFaces(dm);
+ for( i=0; i < numfaces; i++ ) {
+ start = index[redir[mface[i].mat_nr+16383]];
+ if( mface[i].v4 )
+ index[redir[mface[i].mat_nr+16383]] += 18;
+ else
+ index[redir[mface[i].mat_nr+16383]] += 9;
+
+ /* v1 v2 v3 */
+ if( mface[i].flag & ME_SMOOTH ) {
+ VECCOPY(&varray[start],mvert[mface[i].v1].no);
+ VECCOPY(&varray[start+3],mvert[mface[i].v2].no);
+ VECCOPY(&varray[start+6],mvert[mface[i].v3].no);
+ }
+ else {
+ if( nors ) {
+ VECCOPY(&varray[start],&nors[i*3]);
+ VECCOPY(&varray[start+3],&nors[i*3]);
+ VECCOPY(&varray[start+6],&nors[i*3]);
+ }
+ if( mface[i].v4 )
+ CalcNormFloat4(mvert[mface[i].v1].co, mvert[mface[i].v2].co, mvert[mface[i].v3].co, mvert[mface[i].v4].co, norm);
+ else
+ CalcNormFloat(mvert[mface[i].v1].co, mvert[mface[i].v2].co, mvert[mface[i].v3].co, norm);
+ VECCOPY(&varray[start],norm);
+ VECCOPY(&varray[start+3],norm);
+ VECCOPY(&varray[start+6],norm);
+ }
+
+ if( mface[i].v4 ) {
+ /* v3 v4 v1 */
+ if( mface[i].flag & ME_SMOOTH ) {
+ VECCOPY(&varray[start+9],mvert[mface[i].v3].no);
+ VECCOPY(&varray[start+12],mvert[mface[i].v4].no);
+ VECCOPY(&varray[start+15],mvert[mface[i].v1].no);
+ }
+ else {
+ VECCOPY(&varray[start+9],norm);
+ VECCOPY(&varray[start+12],norm);
+ VECCOPY(&varray[start+15],norm);
+ }
+ }
+ }
+}
+
+GPUBuffer *GPU_buffer_normal( DerivedMesh *dm )
+{
+ DEBUG_VBO("GPU_buffer_normal\n");
+
+ return GPU_buffer_setup( dm, dm->drawObject, sizeof(float)*3*dm->drawObject->nelements, GL_ARRAY_BUFFER_ARB, 0, GPU_buffer_copy_normal);
+}
+
+void GPU_buffer_copy_uv( DerivedMesh *dm, float *varray, int *index, int *redir, void *user )
+{
+ int start;
+ int i, numfaces;
+
+ MTFace *mtface;
+ MFace *mface;
+
+ DEBUG_VBO("GPU_buffer_copy_uv\n");
+
+ mface = dm->getFaceArray(dm);
+ mtface = DM_get_face_data_layer(dm, CD_MTFACE);
+
+ if( mtface == 0 ) {
+ DEBUG_VBO("Texture coordinates do not exist for this mesh");
+ return;
+ }
+
+ numfaces= dm->getNumFaces(dm);
+ for( i=0; i < numfaces; i++ ) {
+ start = index[redir[mface[i].mat_nr+16383]];
+ if( mface[i].v4 )
+ index[redir[mface[i].mat_nr+16383]] += 12;
+ else
+ index[redir[mface[i].mat_nr+16383]] += 6;
+
+ /* v1 v2 v3 */
+ VECCOPY2D(&varray[start],mtface[i].uv[0]);
+ VECCOPY2D(&varray[start+2],mtface[i].uv[1]);
+ VECCOPY2D(&varray[start+4],mtface[i].uv[2]);
+
+ if( mface[i].v4 ) {
+ /* v3 v4 v1 */
+ VECCOPY2D(&varray[start+6],mtface[i].uv[2]);
+ VECCOPY2D(&varray[start+8],mtface[i].uv[3]);
+ VECCOPY2D(&varray[start+10],mtface[i].uv[0]);
+ }
+ }
+}
+
+GPUBuffer *GPU_buffer_uv( DerivedMesh *dm )
+{
+ DEBUG_VBO("GPU_buffer_uv\n");
+ if( DM_get_face_data_layer(dm, CD_MTFACE) != 0 )
+ return GPU_buffer_setup( dm, dm->drawObject, sizeof(float)*2*dm->drawObject->nelements, GL_ARRAY_BUFFER_ARB, 0, GPU_buffer_copy_uv);
+ else
+ return 0;
+}
+
+void GPU_buffer_copy_color3( DerivedMesh *dm, float *varray_, int *index, int *redir, void *user )
+{
+ int i, numfaces;
+ unsigned char *varray = (unsigned char *)varray_;
+ unsigned char *mcol = (unsigned char *)user;
+ MFace *mface = dm->getFaceArray(dm);
+
+ DEBUG_VBO("GPU_buffer_copy_color3\n");
+
+ numfaces= dm->getNumFaces(dm);
+ for( i=0; i < numfaces; i++ ) {
+ int start = index[redir[mface[i].mat_nr+16383]];
+ if( mface[i].v4 )
+ index[redir[mface[i].mat_nr+16383]] += 18;
+ else
+ index[redir[mface[i].mat_nr+16383]] += 9;
+
+ /* v1 v2 v3 */
+ VECCOPY(&varray[start],&mcol[i*12]);
+ VECCOPY(&varray[start+3],&mcol[i*12+3]);
+ VECCOPY(&varray[start+6],&mcol[i*12+6]);
+ if( mface[i].v4 ) {
+ /* v3 v4 v1 */
+ VECCOPY(&varray[start+9],&mcol[i*12+6]);
+ VECCOPY(&varray[start+12],&mcol[i*12+9]);
+ VECCOPY(&varray[start+15],&mcol[i*12]);
+ }
+ }
+}
+
+void GPU_buffer_copy_color4( DerivedMesh *dm, float *varray_, int *index, int *redir, void *user )
+{
+ int i, numfaces;
+ unsigned char *varray = (unsigned char *)varray_;
+ unsigned char *mcol = (unsigned char *)user;
+ MFace *mface = dm->getFaceArray(dm);
+
+ DEBUG_VBO("GPU_buffer_copy_color4\n");
+
+ numfaces= dm->getNumFaces(dm);
+ for( i=0; i < numfaces; i++ ) {
+ int start = index[redir[mface[i].mat_nr+16383]];
+ if( mface[i].v4 )
+ index[redir[mface[i].mat_nr+16383]] += 18;
+ else
+ index[redir[mface[i].mat_nr+16383]] += 9;
+
+ /* v1 v2 v3 */
+ VECCOPY(&varray[start],&mcol[i*16]);
+ VECCOPY(&varray[start+3],&mcol[i*16+4]);
+ VECCOPY(&varray[start+6],&mcol[i*16+8]);
+ if( mface[i].v4 ) {
+ /* v3 v4 v1 */
+ VECCOPY(&varray[start+9],&mcol[i*16+8]);
+ VECCOPY(&varray[start+12],&mcol[i*16+12]);
+ VECCOPY(&varray[start+15],&mcol[i*16]);
+ }
+ }
+}
+
+GPUBuffer *GPU_buffer_color( DerivedMesh *dm )
+{
+ unsigned char *colors;
+ int i, numfaces;
+ MCol *mcol;
+ GPUBuffer *result;
+ DEBUG_VBO("GPU_buffer_color\n");
+
+ mcol = DM_get_face_data_layer(dm, CD_ID_MCOL);
+ dm->drawObject->colType = CD_ID_MCOL;
+ if(!mcol) {
+ mcol = DM_get_face_data_layer(dm, CD_WEIGHT_MCOL);
+ dm->drawObject->colType = CD_WEIGHT_MCOL;
+ }
+ if(!mcol) {
+ mcol = DM_get_face_data_layer(dm, CD_MCOL);
+ dm->drawObject->colType = CD_MCOL;
+ }
+
+ numfaces= dm->getNumFaces(dm);
+ colors = MEM_mallocN(numfaces*12*sizeof(unsigned char), "GPU_buffer_color");
+ for( i=0; i < numfaces*4; i++ ) {
+ colors[i*3] = mcol[i].b;
+ colors[i*3+1] = mcol[i].g;
+ colors[i*3+2] = mcol[i].r;
+ }
+
+ result = GPU_buffer_setup( dm, dm->drawObject, sizeof(char)*3*dm->drawObject->nelements, GL_ARRAY_BUFFER_ARB, colors, GPU_buffer_copy_color3 );
+
+ MEM_freeN(colors);
+ return result;
+}
+
+void GPU_buffer_copy_edge( DerivedMesh *dm, float *varray, int *index, int *redir, void *user )
+{
+ int i;
+
+ MVert *mvert;
+ MEdge *medge;
+ unsigned int *varray_ = (unsigned int *)varray;
+ int numedges;
+
+ DEBUG_VBO("GPU_buffer_copy_edge\n");
+
+ mvert = dm->getVertArray(dm);
+ medge = dm->getEdgeArray(dm);
+
+ numedges= dm->getNumEdges(dm);
+ for(i = 0; i < numedges; i++) {
+ varray_[i*2] = (unsigned int)dm->drawObject->indices[medge[i].v1].element;
+ varray_[i*2+1] = (unsigned int)dm->drawObject->indices[medge[i].v2].element;
+ }
+}
+
+GPUBuffer *GPU_buffer_edge( DerivedMesh *dm )
+{
+ DEBUG_VBO("GPU_buffer_edge\n");
+
+ return GPU_buffer_setup( dm, dm->drawObject, sizeof(int)*2*dm->drawObject->nedges, GL_ELEMENT_ARRAY_BUFFER_ARB, 0, GPU_buffer_copy_edge);
+}
+
+void GPU_buffer_copy_uvedge( DerivedMesh *dm, float *varray, int *index, int *redir, void *user )
+{
+ MTFace *tf = DM_get_face_data_layer(dm, CD_MTFACE);
+ int i, j=0;
+
+ DEBUG_VBO("GPU_buffer_copy_uvedge\n");
+
+ if(tf) {
+ for(i = 0; i < dm->numFaceData; i++, tf++) {
+ MFace mf;
+ dm->getFace(dm,i,&mf);
+
+ VECCOPY2D(&varray[j],tf->uv[0]);
+ VECCOPY2D(&varray[j+2],tf->uv[1]);
+
+ VECCOPY2D(&varray[j+4],tf->uv[1]);
+ VECCOPY2D(&varray[j+6],tf->uv[2]);
+
+ if(!mf.v4) {
+ VECCOPY2D(&varray[j+8],tf->uv[2]);
+ VECCOPY2D(&varray[j+10],tf->uv[0]);
+ j+=12;
+ } else {
+ VECCOPY2D(&varray[j+8],tf->uv[2]);
+ VECCOPY2D(&varray[j+10],tf->uv[3]);
+
+ VECCOPY2D(&varray[j+12],tf->uv[3]);
+ VECCOPY2D(&varray[j+14],tf->uv[0]);
+ j+=16;
+ }
+ }
+ }
+ else {
+ DEBUG_VBO("Could not get MTFACE data layer");
+ }
+}
+
+GPUBuffer *GPU_buffer_uvedge( DerivedMesh *dm )
+{
+ DEBUG_VBO("GPU_buffer_uvedge\n");
+
+ return GPU_buffer_setup( dm, dm->drawObject, sizeof(float)*2*(dm->drawObject->nelements/3)*2, GL_ARRAY_BUFFER_ARB, 0, GPU_buffer_copy_uvedge);
+}
+
+
+void GPU_vertex_setup( DerivedMesh *dm )
+{
+ DEBUG_VBO("GPU_vertex_setup\n");
+ if( dm->drawObject == 0 )
+ dm->drawObject = GPU_drawobject_new( dm );
+ if( dm->drawObject->vertices == 0 )
+ dm->drawObject->vertices = GPU_buffer_vertex( dm );
+ if( dm->drawObject->vertices == 0 ) {
+ DEBUG_VBO( "Failed to setup vertices\n" );
+ return;
+ }
+
+ glEnableClientState( GL_VERTEX_ARRAY );
+ if( useVBOs ) {
+ glBindBufferARB( GL_ARRAY_BUFFER_ARB, dm->drawObject->vertices->id );
+ glVertexPointer( 3, GL_FLOAT, 0, 0 );
+ }
+ else {
+ glVertexPointer( 3, GL_FLOAT, 0, dm->drawObject->vertices->pointer );
+ }
+
+ GLStates |= GPU_BUFFER_VERTEX_STATE;
+}
+
+void GPU_normal_setup( DerivedMesh *dm )
+{
+ DEBUG_VBO("GPU_normal_setup\n");
+ if( dm->drawObject == 0 )
+ dm->drawObject = GPU_drawobject_new( dm );
+ if( dm->drawObject->normals == 0 )
+ dm->drawObject->normals = GPU_buffer_normal( dm );
+ if( dm->drawObject->normals == 0 ) {
+ DEBUG_VBO( "Failed to setup normals\n" );
+ return;
+ }
+ glEnableClientState( GL_NORMAL_ARRAY );
+ if( useVBOs ) {
+ glBindBufferARB( GL_ARRAY_BUFFER_ARB, dm->drawObject->normals->id );
+ glNormalPointer( GL_FLOAT, 0, 0 );
+ }
+ else {
+ glNormalPointer( GL_FLOAT, 0, dm->drawObject->normals->pointer );
+ }
+
+ GLStates |= GPU_BUFFER_NORMAL_STATE;
+}
+
+void GPU_uv_setup( DerivedMesh *dm )
+{
+ DEBUG_VBO("GPU_uv_setup\n");
+ if( dm->drawObject == 0 )
+ dm->drawObject = GPU_drawobject_new( dm );
+ if( dm->drawObject->uv == 0 )
+ dm->drawObject->uv = GPU_buffer_uv( dm );
+
+ if( dm->drawObject->uv != 0 ) {
+ glEnableClientState( GL_TEXTURE_COORD_ARRAY );
+ if( useVBOs ) {
+ glBindBufferARB( GL_ARRAY_BUFFER_ARB, dm->drawObject->uv->id );
+ glTexCoordPointer( 2, GL_FLOAT, 0, 0 );
+ }
+ else {
+ glTexCoordPointer( 2, GL_FLOAT, 0, dm->drawObject->uv->pointer );
+ }
+
+ GLStates |= GPU_BUFFER_TEXCOORD_STATE;
+ }
+}
+
+void GPU_color_setup( DerivedMesh *dm )
+{
+ DEBUG_VBO("GPU_color_setup\n");
+ if( dm->drawObject == 0 )
+ dm->drawObject = GPU_drawobject_new( dm );
+ if( dm->drawObject->colors == 0 )
+ dm->drawObject->colors = GPU_buffer_color( dm );
+ if( dm->drawObject->colors == 0 ) {
+ DEBUG_VBO( "Failed to setup colors\n" );
+ return;
+ }
+ glEnableClientState( GL_COLOR_ARRAY );
+ if( useVBOs ) {
+ glBindBufferARB( GL_ARRAY_BUFFER_ARB, dm->drawObject->colors->id );
+ glColorPointer( 3, GL_UNSIGNED_BYTE, 0, 0 );
+ }
+ else {
+ glColorPointer( 3, GL_UNSIGNED_BYTE, 0, dm->drawObject->colors->pointer );
+ }
+
+ GLStates |= GPU_BUFFER_COLOR_STATE;
+}
+
+void GPU_edge_setup( DerivedMesh *dm )
+{
+ DEBUG_VBO("GPU_edge_setup\n");
+ if( dm->drawObject == 0 )
+ dm->drawObject = GPU_drawobject_new( dm );
+ if( dm->drawObject->edges == 0 )
+ dm->drawObject->edges = GPU_buffer_edge( dm );
+ if( dm->drawObject->edges == 0 ) {
+ DEBUG_VBO( "Failed to setup edges\n" );
+ return;
+ }
+ if( dm->drawObject->vertices == 0 )
+ dm->drawObject->vertices = GPU_buffer_vertex( dm );
+ if( dm->drawObject->vertices == 0 ) {
+ DEBUG_VBO( "Failed to setup vertices\n" );
+ return;
+ }
+
+ glEnableClientState( GL_VERTEX_ARRAY );
+ if( useVBOs ) {
+ glBindBufferARB( GL_ARRAY_BUFFER_ARB, dm->drawObject->vertices->id );
+ glVertexPointer( 3, GL_FLOAT, 0, 0 );
+ }
+ else {
+ glVertexPointer( 3, GL_FLOAT, 0, dm->drawObject->vertices->pointer );
+ }
+
+ GLStates |= GPU_BUFFER_VERTEX_STATE;
+
+ if( useVBOs ) {
+ glBindBufferARB( GL_ELEMENT_ARRAY_BUFFER_ARB, dm->drawObject->edges->id );
+ }
+
+ GLStates |= GPU_BUFFER_ELEMENT_STATE;
+}
+
+void GPU_uvedge_setup( DerivedMesh *dm )
+{
+ DEBUG_VBO("GPU_uvedge_setup\n");
+ if( dm->drawObject == 0 )
+ dm->drawObject = GPU_drawobject_new( dm );
+ if( dm->drawObject->uvedges == 0 )
+ dm->drawObject->uvedges = GPU_buffer_uvedge( dm );
+ if( dm->drawObject->uvedges == 0 ) {
+ DEBUG_VBO( "Failed to setup UV edges\n" );
+ return;
+ }
+
+ glEnableClientState( GL_VERTEX_ARRAY );
+ if( useVBOs ) {
+ glBindBufferARB( GL_ARRAY_BUFFER_ARB, dm->drawObject->uvedges->id );
+ glVertexPointer( 2, GL_FLOAT, 0, 0 );
+ }
+ else {
+ glVertexPointer( 2, GL_FLOAT, 0, dm->drawObject->uvedges->pointer );
+ }
+
+ GLStates |= GPU_BUFFER_VERTEX_STATE;
+}
+
+void GPU_interleaved_setup( GPUBuffer *buffer, int data[] ) {
+ int i;
+ int elementsize = 0;
+ intptr_t offset = 0;
+
+ DEBUG_VBO("GPU_interleaved_setup\n");
+
+ for( i = 0; data[i] != GPU_BUFFER_INTER_END; i++ ) {
+ switch( data[i] ) {
+ case GPU_BUFFER_INTER_V3F:
+ elementsize += 3*sizeof(float);
+ break;
+ case GPU_BUFFER_INTER_N3F:
+ elementsize += 3*sizeof(float);
+ break;
+ case GPU_BUFFER_INTER_T2F:
+ elementsize += 2*sizeof(float);
+ break;
+ case GPU_BUFFER_INTER_C3UB:
+ elementsize += 3*sizeof(unsigned char);
+ break;
+ case GPU_BUFFER_INTER_C4UB:
+ elementsize += 4*sizeof(unsigned char);
+ break;
+ default:
+ DEBUG_VBO( "Unknown element in data type array in GPU_interleaved_setup\n" );
+ }
+ }
+
+ if( useVBOs ) {
+ glBindBufferARB( GL_ARRAY_BUFFER_ARB, buffer->id );
+ for( i = 0; data[i] != GPU_BUFFER_INTER_END; i++ ) {
+ switch( data[i] ) {
+ case GPU_BUFFER_INTER_V3F:
+ glEnableClientState( GL_VERTEX_ARRAY );
+ glVertexPointer( 3, GL_FLOAT, elementsize, (void *)offset );
+ GLStates |= GPU_BUFFER_VERTEX_STATE;
+ offset += 3*sizeof(float);
+ break;
+ case GPU_BUFFER_INTER_N3F:
+ glEnableClientState( GL_NORMAL_ARRAY );
+ glNormalPointer( GL_FLOAT, elementsize, (void *)offset );
+ GLStates |= GPU_BUFFER_NORMAL_STATE;
+ offset += 3*sizeof(float);
+ break;
+ case GPU_BUFFER_INTER_T2F:
+ glEnableClientState( GL_TEXTURE_COORD_ARRAY );
+ glTexCoordPointer( 2, GL_FLOAT, elementsize, (void *)offset );
+ GLStates |= GPU_BUFFER_TEXCOORD_STATE;
+ offset += 2*sizeof(float);
+ break;
+ case GPU_BUFFER_INTER_C3UB:
+ glEnableClientState( GL_COLOR_ARRAY );
+ glColorPointer( 3, GL_UNSIGNED_BYTE, elementsize, (void *)offset );
+ GLStates |= GPU_BUFFER_COLOR_STATE;
+ offset += 3*sizeof(unsigned char);
+ break;
+ case GPU_BUFFER_INTER_C4UB:
+ glEnableClientState( GL_COLOR_ARRAY );
+ glColorPointer( 4, GL_UNSIGNED_BYTE, elementsize, (void *)offset );
+ GLStates |= GPU_BUFFER_COLOR_STATE;
+ offset += 4*sizeof(unsigned char);
+ break;
+ }
+ }
+ }
+ else {
+ for( i = 0; data[i] != GPU_BUFFER_INTER_END; i++ ) {
+ switch( data[i] ) {
+ case GPU_BUFFER_INTER_V3F:
+ glEnableClientState( GL_VERTEX_ARRAY );
+ glVertexPointer( 3, GL_FLOAT, elementsize, offset+(char *)buffer->pointer );
+ GLStates |= GPU_BUFFER_VERTEX_STATE;
+ offset += 3*sizeof(float);
+ break;
+ case GPU_BUFFER_INTER_N3F:
+ glEnableClientState( GL_NORMAL_ARRAY );
+ glNormalPointer( GL_FLOAT, elementsize, offset+(char *)buffer->pointer );
+ GLStates |= GPU_BUFFER_NORMAL_STATE;
+ offset += 3*sizeof(float);
+ break;
+ case GPU_BUFFER_INTER_T2F:
+ glEnableClientState( GL_TEXTURE_COORD_ARRAY );
+ glTexCoordPointer( 2, GL_FLOAT, elementsize, offset+(char *)buffer->pointer );
+ GLStates |= GPU_BUFFER_TEXCOORD_STATE;
+ offset += 2*sizeof(float);
+ break;
+ case GPU_BUFFER_INTER_C3UB:
+ glEnableClientState( GL_COLOR_ARRAY );
+ glColorPointer( 3, GL_UNSIGNED_BYTE, elementsize, offset+(char *)buffer->pointer );
+ GLStates |= GPU_BUFFER_COLOR_STATE;
+ offset += 3*sizeof(unsigned char);
+ break;
+ case GPU_BUFFER_INTER_C4UB:
+ glEnableClientState( GL_COLOR_ARRAY );
+ glColorPointer( 4, GL_UNSIGNED_BYTE, elementsize, offset+(char *)buffer->pointer );
+ GLStates |= GPU_BUFFER_COLOR_STATE;
+ offset += 4*sizeof(unsigned char);
+ break;
+ }
+ }
+ }
+}
+
+static int GPU_typesize( int type ) {
+ switch( type ) {
+ case GL_FLOAT:
+ return sizeof(float);
+ case GL_INT:
+ return sizeof(int);
+ case GL_UNSIGNED_INT:
+ return sizeof(unsigned int);
+ case GL_BYTE:
+ return sizeof(char);
+ case GL_UNSIGNED_BYTE:
+ return sizeof(unsigned char);
+ default:
+ return 0;
+ }
+}
+
+int GPU_attrib_element_size( GPUAttrib data[], int numdata ) {
+ int i, elementsize = 0;
+
+ for( i = 0; i < numdata; i++ ) {
+ int typesize = GPU_typesize(data[i].type);
+ if( typesize == 0 )
+ DEBUG_VBO( "Unknown element in data type array in GPU_attrib_element_size\n" );
+ else {
+ elementsize += typesize*data[i].size;
+ }
+ }
+ return elementsize;
+}
+
+void GPU_interleaved_attrib_setup( GPUBuffer *buffer, GPUAttrib data[], int numdata ) {
+ int i;
+ int elementsize;
+ intptr_t offset = 0;
+
+ DEBUG_VBO("GPU_interleaved_attrib_setup\n");
+
+ for( i = 0; i < MAX_GPU_ATTRIB_DATA; i++ ) {
+ if( attribData[i].index != -1 ) {
+ glDisableVertexAttribArrayARB( attribData[i].index );
+ }
+ else
+ break;
+ }
+ elementsize = GPU_attrib_element_size( data, numdata );
+
+ if( useVBOs ) {
+ glBindBufferARB( GL_ARRAY_BUFFER_ARB, buffer->id );
+ for( i = 0; i < numdata; i++ ) {
+ glEnableVertexAttribArrayARB( data[i].index );
+ glVertexAttribPointerARB( data[i].index, data[i].size, data[i].type, GL_TRUE, elementsize, (void *)offset );
+ offset += data[i].size*GPU_typesize(data[i].type);
+
+ attribData[i].index = data[i].index;
+ attribData[i].size = data[i].size;
+ attribData[i].type = data[i].type;
+ }
+ attribData[numdata].index = -1;
+ }
+ else {
+ for( i = 0; i < numdata; i++ ) {
+ glEnableVertexAttribArrayARB( data[i].index );
+ glVertexAttribPointerARB( data[i].index, data[i].size, data[i].type, GL_TRUE, elementsize, (char *)buffer->pointer + offset );
+ offset += data[i].size*GPU_typesize(data[i].type);
+ }
+ }
+}
+
+
+void GPU_buffer_unbind()
+{
+ int i;
+ DEBUG_VBO("GPU_buffer_unbind\n");
+
+ if( GLStates & GPU_BUFFER_VERTEX_STATE )
+ glDisableClientState( GL_VERTEX_ARRAY );
+ if( GLStates & GPU_BUFFER_NORMAL_STATE )
+ glDisableClientState( GL_NORMAL_ARRAY );
+ if( GLStates & GPU_BUFFER_TEXCOORD_STATE )
+ glDisableClientState( GL_TEXTURE_COORD_ARRAY );
+ if( GLStates & GPU_BUFFER_COLOR_STATE )
+ glDisableClientState( GL_COLOR_ARRAY );
+ if( GLStates & GPU_BUFFER_ELEMENT_STATE ) {
+ if( useVBOs ) {
+ glBindBufferARB( GL_ELEMENT_ARRAY_BUFFER_ARB, 0 );
+ }
+ }
+ GLStates &= !(GPU_BUFFER_VERTEX_STATE | GPU_BUFFER_NORMAL_STATE | GPU_BUFFER_TEXCOORD_STATE | GPU_BUFFER_COLOR_STATE | GPU_BUFFER_ELEMENT_STATE);
+
+ for( i = 0; i < MAX_GPU_ATTRIB_DATA; i++ ) {
+ if( attribData[i].index != -1 ) {
+ glDisableVertexAttribArrayARB( attribData[i].index );
+ }
+ else
+ break;
+ }
+ if( GLStates != 0 )
+ DEBUG_VBO( "Some weird OpenGL state is still set. Why?" );
+ if( useVBOs )
+ glBindBufferARB( GL_ARRAY_BUFFER_ARB, 0 );
+}
+
+void GPU_color3_upload( DerivedMesh *dm, char *data )
+{
+ if( dm->drawObject == 0 )
+ dm->drawObject = GPU_drawobject_new(dm);
+ GPU_buffer_free(dm->drawObject->colors,globalPool);
+ dm->drawObject->colors = GPU_buffer_setup( dm, dm->drawObject, sizeof(char)*3*dm->drawObject->nelements, GL_ARRAY_BUFFER_ARB, data, GPU_buffer_copy_color3 );
+}
+void GPU_color4_upload( DerivedMesh *dm, char *data )
+{
+ if( dm->drawObject == 0 )
+ dm->drawObject = GPU_drawobject_new(dm);
+ GPU_buffer_free(dm->drawObject->colors,globalPool);
+ dm->drawObject->colors = GPU_buffer_setup( dm, dm->drawObject, sizeof(char)*3*dm->drawObject->nelements, GL_ARRAY_BUFFER_ARB, data, GPU_buffer_copy_color4 );
+}
+
+void GPU_color_switch( int mode )
+{
+ if( mode ) {
+ if( !GLStates & GPU_BUFFER_COLOR_STATE )
+ glEnableClientState( GL_COLOR_ARRAY );
+ GLStates |= GPU_BUFFER_COLOR_STATE;
+ }
+ else {
+ if( GLStates & GPU_BUFFER_COLOR_STATE )
+ glDisableClientState( GL_COLOR_ARRAY );
+ GLStates &= (!GPU_BUFFER_COLOR_STATE);
+ }
+}
+
+int GPU_buffer_legacy( DerivedMesh *dm )
+{
+ int test= (U.gameflags & USER_DISABLE_VBO);
+ if( test )
+ return 1;
+
+ if( dm->drawObject == 0 )
+ dm->drawObject = GPU_drawobject_new(dm);
+ return dm->drawObject->legacy;
+}
+
+void *GPU_buffer_lock( GPUBuffer *buffer )
+{
+ float *varray;
+
+ DEBUG_VBO("GPU_buffer_lock\n");
+ if( buffer == 0 ) {
+ DEBUG_VBO( "Failed to lock NULL buffer\n" );
+ return 0;
+ }
+
+ if( useVBOs ) {
+ glBindBufferARB( GL_ARRAY_BUFFER_ARB, buffer->id );
+ varray = glMapBufferARB( GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB );
+ if( varray == 0 ) {
+ DEBUG_VBO( "Failed to map buffer to client address space\n" );
+ }
+ return varray;
+ }
+ else {
+ return buffer->pointer;
+ }
+}
+
+void *GPU_buffer_lock_stream( GPUBuffer *buffer )
+{
+ float *varray;
+
+ DEBUG_VBO("GPU_buffer_lock_stream\n");
+ if( buffer == 0 ) {
+ DEBUG_VBO( "Failed to lock NULL buffer\n" );
+ return 0;
+ }
+
+ if( useVBOs ) {
+ glBindBufferARB( GL_ARRAY_BUFFER_ARB, buffer->id );
+ glBufferDataARB( GL_ARRAY_BUFFER_ARB, buffer->size, 0, GL_STREAM_DRAW_ARB ); /* discard previous data, avoid stalling gpu */
+ varray = glMapBufferARB( GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB );
+ if( varray == 0 ) {
+ DEBUG_VBO( "Failed to map buffer to client address space\n" );
+ }
+ return varray;
+ }
+ else {
+ return buffer->pointer;
+ }
+}
+
+void GPU_buffer_unlock( GPUBuffer *buffer )
+{
+ DEBUG_VBO( "GPU_buffer_unlock\n" );
+ if( useVBOs ) {
+ if( buffer != 0 ) {
+ if( glUnmapBufferARB( GL_ARRAY_BUFFER_ARB ) == 0 ) {
+ DEBUG_VBO( "Failed to copy new data\n" );
+ }
+ }
+ glBindBufferARB(GL_ARRAY_BUFFER_ARB, 0);
+ }
+}
+
+void GPU_buffer_draw_elements( GPUBuffer *elements, unsigned int mode, int start, int count )
+{
+ if( useVBOs ) {
+ glDrawElements( mode, count, GL_UNSIGNED_INT, (void *)(start*sizeof(unsigned int)) );
+ }
+ else {
+ glDrawElements( mode, count, GL_UNSIGNED_INT, ((int *)elements->pointer)+start );
+ }
+}
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/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h
index 2853b2cb029..3201a1df6a5 100644
--- a/source/blender/makesdna/DNA_action_types.h
+++ b/source/blender/makesdna/DNA_action_types.h
@@ -553,13 +553,4 @@ typedef enum ACHAN_FLAG {
ACHAN_MOVED = (1<<31),
} ACHAN_FLAG;
-// XXX Incorrect, Temp for building
-#define PCHAN_ROT_QUAT -1
-#define PCHAN_ROT_XYZ -1
-#define PCHAN_ROT_XZY -1
-#define PCHAN_ROT_YXZ -1
-#define PCHAN_ROT_YZX -1
-#define PCHAN_ROT_ZXY -1
-#define PCHAN_ROT_ZYX -1
-
#endif
diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h
index 9921878e926..fedde34ae18 100644
--- a/source/blender/makesdna/DNA_anim_types.h
+++ b/source/blender/makesdna/DNA_anim_types.h
@@ -654,8 +654,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 */
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_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h
index 18c18d9e9dd..ad686e37097 100644
--- a/source/blender/makesdna/DNA_customdata_types.h
+++ b/source/blender/makesdna/DNA_customdata_types.h
@@ -76,7 +76,9 @@ typedef struct CustomData {
#define CD_TANGENT 18
#define CD_MDISPS 19
#define CD_WEIGHT_MCOL 20 /* for displaying weightpaint colors */
-#define CD_NUMTYPES 21
+#define CD_ID_MCOL 21
+#define CD_TEXTURE_MCOL 22
+#define CD_NUMTYPES 23
/* Bits for CustomDataMask */
#define CD_MASK_MVERT (1 << CD_MVERT)
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_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index bcb85b5f87e..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
diff --git a/source/blender/makesdna/DNA_object_force.h b/source/blender/makesdna/DNA_object_force.h
index 468ad35de85..1376a08eb3e 100644
--- a/source/blender/makesdna/DNA_object_force.h
+++ b/source/blender/makesdna/DNA_object_force.h
@@ -35,47 +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 */
- float absorption, pad; /* used for forces */
-
- /* 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:
@@ -256,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 a6532409e6e..ade22e4ebd4 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -419,7 +419,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!) */
diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h
index 089c1c76bcf..157767e1d13 100644
--- a/source/blender/makesdna/DNA_particle_types.h
+++ b/source/blender/makesdna/DNA_particle_types.h
@@ -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,6 +240,8 @@ 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;
@@ -270,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)
@@ -324,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 /* deprecated */
+#define PART_DRAW_COUNT_GR 64
#define PART_DRAW_BB_LOCK 128
#define PART_DRAW_PARENT 256
#define PART_DRAW_NUM 512
@@ -407,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
@@ -436,12 +447,15 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in
#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 27ee5d47133..63415662d2b 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -684,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) */
@@ -748,6 +753,9 @@ typedef struct Scene {
/* Grease Pencil */
struct bGPdata *gpd;
+
+ /* Physics simulation settings */
+ struct PhysicsSettings physics_settings;
} Scene;
@@ -1156,6 +1164,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_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 826eea43a4d..16ab3e1e9bd 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -446,6 +446,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/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h
index 98df8c34d58..df447894830 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 {
diff --git a/source/blender/makesrna/SConscript b/source/blender/makesrna/SConscript
index 8fc9df0fbf6..72dc6be683c 100644
--- a/source/blender/makesrna/SConscript
+++ b/source/blender/makesrna/SConscript
@@ -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 50cf0b00b84..c9c02fbecde 100644
--- a/source/blender/makesrna/intern/CMakeLists.txt
+++ b/source/blender/makesrna/intern/CMakeLists.txt
@@ -42,6 +42,10 @@ SET(SRC
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/SConscript b/source/blender/makesrna/intern/SConscript
index 0f8bc752f09..c63b63ce5f7 100644
--- a/source/blender/makesrna/intern/SConscript
+++ b/source/blender/makesrna/intern/SConscript
@@ -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))
@@ -126,7 +134,7 @@ rna.Depends (generated_files, makesrna)
# this seems bad, how to retrieve it from scons?
build_dir = root_build_dir + os.sep +'source' + os.sep + 'blender' + os.sep + 'makesrna' + os.sep + 'intern' + os.sep
-
+
if env['OURPLATFORM'] != 'linuxcross':
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc', 'win32-mingw'):
rna.Command (generated_files, '', "\"" + root_build_dir+os.sep+"makesrna.exe\" \"" + build_dir )
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index f5c6063e892..8ab5a1442c7 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -178,6 +178,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 +255,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 +284,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_animation.c b/source/blender/makesrna/intern/rna_animation.c
index 4b2c11c2e0d..a62eef66cf0 100644
--- a/source/blender/makesrna/intern/rna_animation.c
+++ b/source/blender/makesrna/intern/rna_animation.c
@@ -96,6 +96,49 @@ 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
@@ -127,6 +170,7 @@ static void rna_def_keyingset_path(BlenderRNA *brna)
//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
@@ -157,6 +201,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);
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 15125795e01..e87c8434a7d 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -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;
@@ -87,8 +90,57 @@ static void rna_Brush_active_texture_set(PointerRNA *ptr, PointerRNA value)
}
}
+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,130 +170,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, "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, "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, "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, "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, "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, "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, "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, "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, "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, "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, "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, "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, "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_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");
}
@@ -293,6 +372,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 eaf647e02a2..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)
@@ -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_image.c b/source/blender/makesrna/intern/rna_image.c
index 4c2689d4f64..521756b8539 100644
--- a/source/blender/makesrna/intern/rna_image.c
+++ b/source/blender/makesrna/intern/rna_image.c
@@ -84,8 +84,9 @@ static void rna_Image_fields_update(bContext *C, PointerRNA *ptr)
{
Image *ima= ptr->id.data;
ImBuf *ibuf;
+ void *lock;
- ibuf= BKE_image_get_ibuf(ima, NULL);
+ ibuf= BKE_image_acquire_ibuf(ima, NULL, &lock);
if(ibuf) {
short nr= 0;
@@ -96,6 +97,8 @@ static void rna_Image_fields_update(bContext *C, PointerRNA *ptr)
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)
@@ -157,14 +160,22 @@ static int rna_Image_has_data_get(PointerRNA *ptr)
static int rna_Image_depth_get(PointerRNA *ptr)
{
Image *im= (Image*)ptr->data;
- ImBuf *ibuf= BKE_image_get_ibuf(im, NULL);
+ ImBuf *ibuf;
+ void *lock;
+ int depth;
+
+ ibuf= BKE_image_acquire_ibuf(im, NULL, &lock);
- if (!ibuf) return 0;
+ if(!ibuf)
+ depth= 0;
+ else if(ibuf->rect_float)
+ depth= 128;
+ else
+ depth= ibuf->depth;
- if (ibuf->rect_float)
- return 128;
+ BKE_image_release_ibuf(im, lock);
- return ibuf->depth;
+ return depth;
}
#else
diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h
index 3723c05ada0..1ebf03425d4 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,6 +197,7 @@ 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 */
diff --git a/source/blender/makesrna/intern/rna_lamp.c b/source/blender/makesrna/intern/rna_lamp.c
index d00a0d61bf6..06fecec6fb6 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;
@@ -113,6 +116,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 +171,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 +230,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 +339,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 +401,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,55 +456,55 @@ 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_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_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_point_lamp(BlenderRNA *brna)
@@ -510,41 +540,41 @@ static void rna_def_area_lamp(BlenderRNA *brna)
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)
@@ -581,101 +611,101 @@ 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");
}
static void rna_def_sun_lamp(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c
index a6f22017aaa..b05a7e59cc3 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,28 @@ static EnumPropertyItem prop_texture_coordinates_items[] = {
#include "MEM_guardedalloc.h"
+#include "BKE_depsgraph.h"
+#include "BKE_main.h"
#include "BKE_texture.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);
@@ -308,291 +327,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, "Absorpion Color Factor", "Amount texture affects diffuse color.");
+ 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, "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,79 +661,79 @@ 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_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_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, NC_MATERIAL|ND_SHADING_DRAW, NULL);
+ 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, NC_MATERIAL|ND_SHADING_DRAW, NULL);
+ 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");
}
@@ -723,47 +753,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_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_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)
@@ -784,67 +814,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_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_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_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_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_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)
@@ -861,61 +891,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_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_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_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_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)
@@ -923,11 +953,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[] = {
@@ -936,15 +967,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");
@@ -954,120 +976,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);
+ RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "shading_step_size", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "shade_stepsize");
- RNA_def_property_range(prop, 0.0f, FLT_MAX);
- RNA_def_property_ui_range(prop, 0.0f, 1.0f, 1, 3);
- RNA_def_property_ui_text(prop, "Shading Step Size", "Distance between subsequent volume shading samples.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
- prop= RNA_def_property(srna, "scattering_mode", PROP_ENUM, PROP_NONE);
+ 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_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");
}
@@ -1085,118 +1105,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_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)
@@ -1214,59 +1234,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_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_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)
@@ -1285,13 +1305,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_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
@@ -1302,31 +1322,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_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)
@@ -1342,58 +1362,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)
@@ -1461,45 +1481,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_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_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");
@@ -1515,106 +1535,106 @@ void RNA_def_material(BlenderRNA *brna)
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_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_NONE);
@@ -1673,7 +1693,7 @@ void RNA_def_material(BlenderRNA *brna)
/* 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");
rna_def_material_colors(srna);
rna_def_material_diffuse(srna);
@@ -1692,7 +1712,7 @@ void RNA_def_material(BlenderRNA *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;
@@ -1707,13 +1727,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 ecfe59a0142..124fd80ce5a 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -982,9 +982,14 @@ static void rna_def_mface(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_DYNAMIC);
RNA_def_property_dynamic_array_funcs(prop, "rna_MeshFace_verts_get_length");
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", "");
diff --git a/source/blender/makesrna/intern/rna_mesh_api.c b/source/blender/makesrna/intern/rna_mesh_api.c
index 6e37014a771..3da0e1e6fd4 100644
--- a/source/blender/makesrna/intern/rna_mesh_api.c
+++ b/source/blender/makesrna/intern/rna_mesh_api.c
@@ -32,249 +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 "BKE_material.h"
-
-#include "DNA_mesh_types.h"
-#include "DNA_scene_types.h"
-
-#include "BLI_arithb.h"
-#include "BLI_edgehash.h"
-
-#include "WM_api.h"
-#include "WM_types.h"
-
-#include "MEM_guardedalloc.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);
+#include "BLO_sys_types.h"
- 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_transform(Mesh *me, float *mat)
-{
-
- /* TODO: old API transform had recalc_normals option */
- int i;
- MVert *mvert= me->mvert;
-
- for(i= 0; i < me->totvert; i++, mvert++) {
- Mat4MulVecfl((float (*)[4])mat, mvert->co);
- }
-}
-
-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;
-}
-
-Mesh *rna_Mesh_create_copy(Mesh *me)
-{
- Mesh *ret= copy_mesh(me);
- ret->id.us--;
-
- return ret;
-}
+#include "ED_mesh.h"
-static void rna_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 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;
-}
-
-/*
-static void rna_Mesh_add_faces(Mesh *mesh)
-{
-}
-*/
-
-static void rna_Mesh_add_geometry(Mesh *mesh, int verts, int edges, int faces)
-{
- if(verts)
- rna_Mesh_add_verts(mesh, verts);
- if(edges)
- rna_Mesh_add_edges(mesh, edges);
- if(faces)
- rna_Mesh_add_faces(mesh, faces);
-}
-
-static void rna_Mesh_add_uv_texture(Mesh *me)
-{
- me->mtface= CustomData_add_layer(&me->fdata, CD_MTFACE, CD_DEFAULT, NULL, me->totface);
-}
-
-static void rna_Mesh_calc_normals(Mesh *me)
-{
- mesh_calc_normals(me->mvert, me->totvert, me->mface, me->totface, NULL);
-}
+#ifdef RNA_RUNTIME
-static void rna_Mesh_add_material(Mesh *me, Material *ma)
+static void rna_Mesh_uv_texture_add(struct Mesh *me, struct bContext *C)
{
- 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);
+ ED_mesh_uv_texture_add(C, NULL, NULL, me);
}
#else
@@ -284,12 +50,13 @@ void RNA_api_mesh(StructRNA *srna)
FunctionRNA *func;
PropertyRNA *parm;
- func= RNA_def_function(srna, "transform", "rna_Mesh_transform");
+ 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", "rna_Mesh_add_geometry");
+ 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);
@@ -297,21 +64,17 @@ 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, "create_copy", "rna_Mesh_create_copy");
- RNA_def_function_ui_description(func, "Create a copy of this Mesh datablock.");
- parm= RNA_def_pointer(func, "mesh", "Mesh", "", "Mesh, remove it if it is only used for export.");
- RNA_def_function_return(func, parm);
-
- func= RNA_def_function(srna, "add_uv_texture", "rna_Mesh_add_uv_texture");
+ 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", "rna_Mesh_calc_normals");
+ 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", "rna_Mesh_update");
+ func= RNA_def_function(srna, "update", "ED_mesh_update");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
- func= RNA_def_function(srna, "add_material", "rna_Mesh_add_material");
+ 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);
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index a2b4d6d7335..3a3842adbf1 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -741,7 +741,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);
}
@@ -752,7 +752,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);
}
@@ -1289,11 +1289,14 @@ static void rna_def_object(BlenderRNA *brna)
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);
@@ -1307,6 +1310,7 @@ static void rna_def_object(BlenderRNA *brna)
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);
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c
index 1f0d01ce784..404223ab590 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,55 @@ 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(C==NULL) {
+ EnumPropertyItem *item= NULL;
+ int totitem= 0;
+
+ /* needed for doc generation */
+ RNA_enum_items_add(&item, &totitem, effector_shape_items);
+ RNA_enum_items_add(&item, &totitem, curve_shape_items);
+ RNA_enum_items_add(&item, &totitem, empty_shape_items);
+ RNA_enum_items_add(&item, &totitem, vortex_shape_items);
+ RNA_enum_items_add(&item, &totitem, curve_vortex_shape_items);
+ RNA_enum_items_add(&item, &totitem, empty_vortex_shape_items);
+ RNA_enum_item_end(&item, &totitem);
+
+ *free= 1;
+
+ return item;
+ }
+
+ 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)
@@ -625,6 +767,129 @@ static void rna_def_collision(BlenderRNA *brna)
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)
{
StructRNA *srna;
@@ -632,18 +897,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", ""},
@@ -656,6 +923,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.");
@@ -668,6 +957,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");
@@ -680,6 +975,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 */
@@ -688,18 +989,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");
@@ -771,31 +1105,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);
@@ -806,6 +1125,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 */
@@ -814,6 +1148,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)
@@ -1115,12 +1517,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 04b4b1142be..2c81bda121f 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); */
@@ -490,6 +434,71 @@ static int rna_ParticleSystem_edited_get(PointerRNA *ptr)
else
return (psys->pointcache->edit && psys->pointcache->edit->edited);
}
+static PointerRNA rna_ParticleDupliWeight_active_get(PointerRNA *ptr)
+{
+ ParticleSettings *part= (ParticleSettings*)ptr->id.data;
+ ParticleDupliWeight *dw = part->dupliweights.first;
+
+ 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 int rna_ParticleDupliWeight_active_index_get(PointerRNA *ptr)
+{
+ ParticleSettings *part= (ParticleSettings*)ptr->id.data;
+ ParticleDupliWeight *dw = part->dupliweights.first;
+ int i=0;
+
+ 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;
+ }
+}
+
+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");
+}
EnumPropertyItem from_items[] = {
{PART_FROM_VERT, "VERT", 0, "Vertexes", ""},
{PART_FROM_FACE, "FACE", 0, "Faces", ""},
@@ -577,6 +586,28 @@ static EnumPropertyItem *rna_Particle_ren_as_itemf(bContext *C, PointerRNA *ptr,
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
@@ -650,7 +681,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", ""},
@@ -761,6 +792,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;
@@ -1104,6 +1156,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");
@@ -1409,6 +1471,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);
@@ -1461,19 +1530,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);
@@ -1700,6 +1756,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");
@@ -1714,89 +1783,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)
@@ -2123,6 +2128,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 03ced839ebe..ecb2dba0197 100644
--- a/source/blender/makesrna/intern/rna_pose.c
+++ b/source/blender/makesrna/intern/rna_pose.c
@@ -801,6 +801,16 @@ static void rna_def_pose_channel(BlenderRNA *brna)
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;
@@ -826,19 +836,16 @@ static void rna_def_pose_itasc(BlenderRNA *brna)
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, "simulation", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", ITASC_SIMULATION);
- RNA_def_property_ui_text(prop, "Simulation", "Simulation mode: solver is statefull, runs in real-time context and ignores actions and non-IK constraints (i.e. solver is in full charge of the IK chain).");
+ 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, "initial_reiteration", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", ITASC_INITIAL_REITERATION);
- RNA_def_property_ui_text(prop, "Initial Reiteration", "Allow reiteration for initial frame.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
-
- prop= RNA_def_property(srna, "reiteration", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", ITASC_REITERATION);
- RNA_def_property_ui_text(prop, "Reiteration", "Allow reiteration for all frames.");
+ 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);
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 5ef746adf1f..9eea920e371 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -62,6 +62,7 @@ EnumPropertyItem prop_mode_items[] ={
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_node.h"
+#include "BKE_pointcache.h"
#include "BLI_threads.h"
@@ -415,6 +416,14 @@ 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_tool_settings(BlenderRNA *brna)
@@ -596,7 +605,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;
@@ -2157,6 +2165,19 @@ void RNA_def_scene(BlenderRNA *brna)
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_NONE);
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index df956670eb3..422283c940f 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -191,7 +191,8 @@ 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);
+ ImBuf *ibuf;
+ void *lock;
int zbuf, alpha;
if(C==NULL) {
@@ -199,9 +200,13 @@ static EnumPropertyItem *rna_SpaceImageEditor_draw_channels_itemf(bContext *C, P
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)
@@ -215,8 +220,13 @@ static EnumPropertyItem *rna_SpaceImageEditor_draw_channels_itemf(bContext *C, P
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);
- curvemapping_do_ibuf(sima->cumap, ED_space_image_buffer(sima));
WM_event_add_notifier(C, NC_IMAGE, sima->image);
}
diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c
index 6fb9a9ca57b..78d7f012487 100644
--- a/source/blender/makesrna/intern/rna_texture.c
+++ b/source/blender/makesrna/intern/rna_texture.c
@@ -40,8 +40,6 @@
#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 +50,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 +99,14 @@ 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_type_set(PointerRNA *ptr, int value)
{
Tex *tex= (Tex*)ptr->data;
@@ -112,6 +124,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;
@@ -242,20 +276,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 +291,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 +321,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 +341,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 +398,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 +412,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 +482,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 +506,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 +536,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 +565,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 +611,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 +672,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 +739,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 +801,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 +839,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 +869,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 +912,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 +927,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 +973,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 +1025,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,40 +1034,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, NC_TEXTURE, NULL);
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
/* filtering */
prop= RNA_def_property(srna, "filter", PROP_ENUM, PROP_NONE);
@@ -1084,19 +1075,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)
@@ -1124,13 +1115,13 @@ static void rna_def_texture_environment_map(BlenderRNA *brna)
prop= RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "iuser");
RNA_def_property_ui_text(prop, "Image User", "Parameters defining which layer, pass and frame of the image is displayed.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
+ 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);
}
@@ -1156,62 +1147,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)
@@ -1245,62 +1236,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)
@@ -1316,32 +1307,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)
@@ -1397,104 +1388,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");
@@ -1505,7 +1496,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)
@@ -1528,6 +1519,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");
@@ -1537,46 +1534,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_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");
@@ -1587,7 +1590,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)
@@ -1626,49 +1629,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);
-
- prop= RNA_def_property(srna, "rgb_factor", PROP_FLOAT, PROP_RGB);
+ 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_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_update");
rna_def_animdata_common(srna);
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index e9fcb299c53..25448d0c2de 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -2173,6 +2173,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);
diff --git a/source/blender/makesrna/intern/rna_world.c b/source/blender/makesrna/intern/rna_world.c
index c6068d0a650..b2ed90eef03 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);
@@ -95,6 +98,22 @@ static void rna_World_active_texture_set(PointerRNA *ptr, PointerRNA value)
}
}
+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
static void rna_def_world_mtex(BlenderRNA *brna)
@@ -119,22 +138,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 +164,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 +234,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 +349,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 +397,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,53 +453,55 @@ 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_NONE);
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_composite.c b/source/blender/nodes/intern/CMP_nodes/CMP_composite.c
index ee9545c3196..800cccc2bfc 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;
@@ -78,11 +79,15 @@ static void node_composit_exec_composite(void *data, bNode *node, bNodeStack **i
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)
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_image.c b/source/blender/nodes/intern/CMP_nodes/CMP_image.c
index 5f444357776..00be52a81aa 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_image.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_image.c
@@ -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);
@@ -389,7 +390,10 @@ static void node_composit_exec_rlayers(void *data, bNode *node, bNodeStack **in,
}
}
}
- }
+ }
+
+ if(re)
+ RE_ReleaseResult(re);
};
diff --git a/source/blender/nodes/intern/CMP_util.c b/source/blender/nodes/intern/CMP_util.c
index b396d5549d7..075eefb4368 100644
--- a/source/blender/nodes/intern/CMP_util.c
+++ b/source/blender/nodes/intern/CMP_util.c
@@ -614,7 +614,9 @@ void generate_preview(bNode *node, CompBuf *stackbuf)
if(stackbuf->rect==NULL && stackbuf->rect_procedural==NULL) return;
stackbuf_use= typecheck_compbuf(stackbuf, CB_RGBA);
-
+
+ BLI_lock_thread(LOCK_PREVIEW);
+
if(stackbuf->x > stackbuf->y) {
preview->xsize= 140;
preview->ysize= (140*stackbuf->y)/stackbuf->x;
@@ -628,14 +630,15 @@ void generate_preview(bNode *node, CompBuf *stackbuf)
cbuf= generate_procedural_preview(stackbuf_use, preview->xsize, preview->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);
+
+ BLI_unlock_thread(LOCK_PREVIEW);
free_compbuf(cbuf);
if(stackbuf_use!=stackbuf)
free_compbuf(stackbuf_use);
-
}
}
diff --git a/source/blender/nodes/intern/TEX_util.c b/source/blender/nodes/intern/TEX_util.c
index 2c21627dad9..f2333ffcf2e 100644
--- a/source/blender/nodes/intern/TEX_util.c
+++ b/source/blender/nodes/intern/TEX_util.c
@@ -47,8 +47,6 @@
#define PREV_RES 128 /* default preview resolution */
-int preview_flag = 0;
-
void tex_call_delegate(TexDelegate *dg, float *out, TexParams *params, short thread)
{
if(dg->node->need_exec)
@@ -217,7 +215,8 @@ void ntreeTexExecTree(
short thread,
Tex *tex,
short which_output,
- int cfra
+ int cfra,
+ int preview
){
TexResult dummy_texres;
TexCallData data;
@@ -231,21 +230,14 @@ void ntreeTexExecTree(
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..fd3d47f4729 100644
--- a/source/blender/nodes/intern/TEX_util.h
+++ b/source/blender/nodes/intern/TEX_util.h
@@ -102,8 +102,6 @@ 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 params_from_cdata(TexParams *out, TexCallData *in);
#endif
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/matrix.c b/source/blender/python/generic/matrix.c
index edb6fb7af63..5a49118b519 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/render/CMakeLists.txt b/source/blender/render/CMakeLists.txt
index 3284f7ea79a..29539fa4d17 100644
--- a/source/blender/render/CMakeLists.txt
+++ b/source/blender/render/CMakeLists.txt
@@ -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 4ad7694cbbf..88942ced027 100644
--- a/source/blender/render/SConscript
+++ b/source/blender/render/SConscript
@@ -16,14 +16,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_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 5660b37d01c..b36163f57c0 100644
--- a/source/blender/render/extern/include/RE_shader_ext.h
+++ b/source/blender/render/extern/include/RE_shader_ext.h
@@ -130,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];
diff --git a/source/blender/render/intern/include/render_types.h b/source/blender/render/intern/include/render_types.h
index 8c106f60e1d..8f16d636e79 100644
--- a/source/blender/render/intern/include/render_types.h
+++ b/source/blender/render/intern/include/render_types.h
@@ -123,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;
diff --git a/source/blender/render/intern/include/volume_precache.h b/source/blender/render/intern/include/volume_precache.h
index 9d87a219c82..368d60ee7f0 100644
--- a/source/blender/render/intern/include/volume_precache.h
+++ b/source/blender/render/intern/include/volume_precache.h
@@ -30,4 +30,4 @@ void volume_precache(Render *re);
void free_volume_precache(Render *re);
int point_inside_volume_objectinstance(ObjectInstanceRen *obi, float *co);
-#define VOL_MS_TIMESTEP 0.1f \ No newline at end of file
+#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/source/convertblender.c b/source/blender/render/intern/source/convertblender.c
index 48a7c003c9f..655c453eee7 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;
}
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c
index fcfd582a966..74a56528d8d 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);
}
}
@@ -931,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);
@@ -939,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);
}
/* *************************************************** */
@@ -957,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)
{
@@ -984,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) {
@@ -1033,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);
}
@@ -1053,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;
@@ -1083,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);
@@ -1164,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 {
@@ -1179,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);
@@ -1195,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)
@@ -1356,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);
@@ -1368,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;
@@ -1395,7 +1455,7 @@ static void render_tile_processor(Render *re, int firsttile)
break;
}
}
-
+
freeparts(re);
}
@@ -1533,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);
@@ -1544,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;
@@ -1551,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];
@@ -1640,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;
@@ -1655,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;
@@ -1834,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 */
@@ -1905,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)) {
@@ -1932,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);
@@ -1942,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);
}
@@ -2011,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;
@@ -2031,6 +2111,8 @@ 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);
}
@@ -2187,7 +2269,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);
@@ -2206,6 +2288,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... */
@@ -2217,9 +2301,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)
@@ -2320,9 +2406,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)
@@ -2338,6 +2427,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)
@@ -2380,6 +2471,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);
}
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
@@ -2399,14 +2492,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;
@@ -2633,7 +2727,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)) {
@@ -2697,6 +2791,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)) */
@@ -2734,7 +2830,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 {
@@ -2780,9 +2877,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 */
@@ -3017,6 +3115,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);
@@ -3025,6 +3124,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;
@@ -3038,6 +3138,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;
@@ -3053,5 +3154,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/rayshade.c b/source/blender/render/intern/source/rayshade.c
index 7f112f2e79c..f2d61e01f50 100644
--- a/source/blender/render/intern/source/rayshade.c
+++ b/source/blender/render/intern/source/rayshade.c
@@ -1569,7 +1569,8 @@ 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) {
diff --git a/source/blender/render/intern/source/renderdatabase.c b/source/blender/render/intern/source/renderdatabase.c
index 784e42685b7..54863ef3295 100644
--- a/source/blender/render/intern/source/renderdatabase.c
+++ b/source/blender/render/intern/source/renderdatabase.c
@@ -1046,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;
@@ -1178,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;
@@ -1197,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/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/texture.c b/source/blender/render/intern/source/texture.c
index f25a167600f..7b0e5d8abbc 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_NODE_PREVIEW));
if(texres->nor) rv |= TEX_NOR;
rv |= TEX_RGB;
@@ -1468,9 +1468,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;
@@ -1813,7 +1816,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 +2023,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 +2045,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 +2065,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 +2079,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 +2164,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 +2176,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 +2199,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 +2206,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 +2376,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 +2400,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);
+ }
+
+ 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);
}
- /* 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_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 +2427,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 +2762,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 ca19f2580aa..01930956763 100644
--- a/source/blender/render/intern/source/volume_precache.c
+++ b/source/blender/render/intern/source/volume_precache.c
@@ -193,9 +193,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.
@@ -210,17 +210,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;
@@ -372,7 +409,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;
@@ -431,11 +468,10 @@ static void *vol_precache_part(void *data)
ObjectInstanceRen *obi = pa->obi;
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));
@@ -456,8 +492,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];
@@ -690,7 +725,7 @@ void vol_precache_objectinstance_threads(Render *re, ObjectInstanceRen *obi, Mat
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);
}
@@ -698,8 +733,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)
diff --git a/source/blender/render/intern/source/volumetric.c b/source/blender/render/intern/source/volumetric.c
index 0e89a84c8d8..91c13207da8 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,6 +73,51 @@ 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_NEIGHBOUR | 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.last_hit = NULL;
+ is.orig.ob = (void*)shi->obi;
+ 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)
{
@@ -153,6 +199,7 @@ static void vol_trace_behind(ShadeInput *shi, VlakRen *vlr, float *co, float *co
isect.labda = FLT_MAX;
isect.mode= RE_RAY_MIRROR;
+ 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;
@@ -167,29 +214,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)
@@ -209,9 +233,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
@@ -267,7 +291,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) {
@@ -278,79 +303,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) */
@@ -358,15 +414,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]);
@@ -378,31 +434,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];
+
+ vol_get_sigma_t(shi, sigma_t, co);
- 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];
- //if (luminance(tau) >= ambtau) break;
VecAddf(p, p, step_vec);
}
@@ -417,8 +471,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 p, ref_col[3];
if (lar->mode & LA_LAYER) if((lar->lay & shi->obi->lay)==0) return;
if ((lar->lay & shi->lay)==0) return;
@@ -439,9 +492,18 @@ 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);
@@ -472,15 +534,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;
- scatter_fac = vol_get_scattering_fac(shi, co);
- VecMulf(lacol, scatter_fac);
+ p = vol_get_phasefunc(shi, shi->mat->vol.asymmetry, shi->view, lv);
+
+ /* 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;
@@ -512,71 +579,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 */
@@ -603,7 +668,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.
@@ -706,8 +771,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);
}
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/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 69c96d0d89d..489f27990cd 100644
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@ -226,8 +226,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 c24cf783063..d746df01421 100644
--- a/source/blender/windowmanager/WM_types.h
+++ b/source/blender/windowmanager/WM_types.h
@@ -183,9 +183,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)
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 846309f1265..80878cf6884 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -298,6 +298,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);
@@ -427,6 +429,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);
@@ -813,6 +817,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);
@@ -936,14 +942,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);
@@ -954,14 +960,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;
}
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index 9694a8fa1c6..1aca9a66e57 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;
diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c
index bf8568d7480..490ef12a523 100644
--- a/source/blender/windowmanager/intern/wm_init_exit.c
+++ b/source/blender/windowmanager/intern/wm_init_exit.c
@@ -78,7 +78,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"
@@ -86,9 +86,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)
@@ -112,6 +114,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 */
@@ -128,6 +131,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 */
@@ -138,8 +143,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();
@@ -253,6 +256,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_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 c853afe4507..466e5868723 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -71,7 +71,8 @@ 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 +91,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
@@ -269,7 +270,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
@@ -292,7 +298,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;
@@ -339,7 +345,8 @@ void wm_window_add_ghostwindows(wmWindowManager *wm)
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 */
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/blenderplayer/bad_level_call_stubs/stubs.c b/source/blenderplayer/bad_level_call_stubs/stubs.c
index 4c32f86e501..8b6143467b9 100644
--- a/source/blenderplayer/bad_level_call_stubs/stubs.c
+++ b/source/blenderplayer/bad_level_call_stubs/stubs.c
@@ -95,7 +95,7 @@ char *ED_info_stats_string(struct Scene *scene){return NULL;}
void ED_area_tag_redraw(struct ScrArea *sa){}
void WM_event_add_fileselect(struct bContext *C, struct wmOperator *op){}
void ED_node_texture_default(struct Tex *tx){}
-void ED_node_changed_update(struct bContext *C, struct bNode *node);
+void ED_node_changed_update(struct bContext *C, struct bNode *node){}
int text_file_modified(struct Text *text){return 0;}
void ED_node_shader_default(struct Material *ma){}
void ED_screen_animation_timer_update(struct bContext *C, int redraws){}
@@ -113,6 +113,18 @@ void uiLayoutSetEnabled(struct uiLayout *layout, int enabled){}
void uiLayoutSetAlignment(struct uiLayout *layout, int alignment){}
void uiLayoutSetScaleX(struct uiLayout *layout, float scale){}
void uiLayoutSetScaleY(struct uiLayout *layout, float scale){}
+void ED_base_object_free_and_unlink(struct Scene *scene, struct Base *base){}
+void ED_mesh_calc_normals(struct Mesh *me){}
+void ED_mesh_geometry_add(struct Mesh *mesh, struct ReportList *reports, int verts, int edges, int faces){}
+void ED_mesh_material_add(struct Mesh *me, struct Material *ma){}
+void ED_mesh_transform(struct Mesh *me, float *mat){}
+void ED_mesh_update(struct Mesh *mesh, struct bContext *C){}
+int ED_mesh_uv_texture_add(struct bContext *C, struct Scene *scene, struct Object *ob, struct Mesh *me){return 0;}
+void ED_object_apply_obmat(struct Object *ob){}
+void ED_object_constraint_dependency_update(struct Scene *scene, struct Object *ob){}
+void ED_object_constraint_update(struct Object *ob){}
+struct bDeformGroup *ED_vgroup_add_name(struct Object *ob, char *name){return (struct bDeformGroup *) NULL;}
+void ED_vgroup_vert_add(struct Object *ob, struct bDeformGroup *dg, int vertnum, float weight, int assignmode){}
void uiItemR(struct uiLayout *layout, char *name, int icon, struct PointerRNA *ptr, char *propname, int flag){}
@@ -155,6 +167,7 @@ void uiTemplateOperatorSearch(struct uiLayout *layout){}
void uiTemplateHeader3D(struct uiLayout *layout, struct bContext *C){}
void uiTemplate_view3d_select_faceselmenu(struct uiLayout *layout, struct bContext *C){}
void uiTemplateTextureImage(struct uiLayout *layout, struct bContext *C, struct Tex *tex){}
+void uiTemplateImage(struct uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, char *propname, struct PointerRNA *userptr, int compact){}
/* rna render */
struct RenderResult *RE_engine_begin_result(struct RenderEngine *engine, int x, int y, int w, int h){return (struct RenderResult *) NULL;}
@@ -171,11 +184,13 @@ struct wmOperatorType *WM_operatortype_first(){return (struct wmOperatorType *)
struct wmOperatorType *WM_operatortype_exists(const char *idname){return (struct wmOperatorType *) NULL;}
int WM_operator_call_py(struct bContext *C, struct wmOperatorType *ot, int context, struct PointerRNA *properties, struct ReportList *reports){return 0;}
int WM_operatortype_remove(const char *idname){return 0;}
+int WM_operator_poll(struct bContext *C, struct wmOperatorType *ot){return 0;}
void WM_operator_properties_free(struct PointerRNA *ptr){}
void WM_operator_properties_create(struct PointerRNA *ptr, const char *opstring){}
void WM_operatortype_append_ptr(void (*opfunc)(struct wmOperatorType*, void*), void *userdata){}
void WM_operator_bl_idname(char *to, const char *from){}
short insert_keyframe (struct ID *id, struct bAction *act, const char group[], const char rna_path[], int array_index, float cfra, short flag){return 0;}
+char *WM_operator_pystring(struct bContext *C, struct wmOperatorType *ot, struct PointerRNA *opptr, int all_args){return NULL;}
/* smoke */
void lzo1x_1_compress(void) {return;}
@@ -199,3 +214,5 @@ void smoke_get_velocity_z(void) {return;}
void smoke_get_obstacle(void) {return;}
void smoke_get_index(void) {return;}
void smoke_step(void) {return;}
+
+char blender_path(){return NULL;} \ No newline at end of file
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index 95dbe9ecb37..bef41983bab 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -205,9 +205,9 @@ IF(WITH_INSTALL)
ADD_CUSTOM_COMMAND(
TARGET blender POST_BUILD MAIN_DEPENDENCY blender
- COMMAND cp -R ${SOURCEINFO} ${TARGETDIR}/blender.app/Contents/
- COMMAND cp -R ${SOURCEDIR}/Contents/PkgInfo ${TARGETDIR}/blender.app/Contents/
- COMMAND cp -R ${SOURCEDIR}/Contents/Resources ${TARGETDIR}/blender.app/Contents/
+ COMMAND cp -Rf ${SOURCEINFO} ${TARGETDIR}/blender.app/Contents/
+ COMMAND cp -Rf ${SOURCEDIR}/Contents/PkgInfo ${TARGETDIR}/blender.app/Contents/
+ COMMAND cp -Rf ${SOURCEDIR}/Contents/Resources ${TARGETDIR}/blender.app/Contents/
COMMAND cat ${SOURCEINFO} | sed s/VERSION/`cat ${CMAKE_SOURCE_DIR}/release/VERSION`/ | sed s/DATE/`date +'%Y-%b-%d'`/ > ${TARGETINFO}
COMMAND rm -Rf ${TARGETDIR}/blender.app/Contents/MacOS/.blender
COMMAND mkdir ${TARGETDIR}/blender.app/Contents/MacOS/.blender/
@@ -218,8 +218,8 @@ IF(WITH_INSTALL)
ADD_CUSTOM_COMMAND(
TARGET blender POST_BUILD MAIN_DEPENDENCY blender
COMMAND cp ${CMAKE_SOURCE_DIR}/bin/.blender/.Blanguages ${TARGETDIR}/blender.app/Contents/MacOS/.blender/
- COMMAND cp -R ${CMAKE_SOURCE_DIR}/bin/.blender/locale ${TARGETDIR}/blender.app/Contents/Resources/
- COMMAND cp -R ${CMAKE_SOURCE_DIR}/bin/.blender/locale ${TARGETDIR}/blender.app/Contents/MacOS/.blender/
+ COMMAND cp -Rf ${CMAKE_SOURCE_DIR}/bin/.blender/locale ${TARGETDIR}/blender.app/Contents/Resources/
+ COMMAND cp -Rf ${CMAKE_SOURCE_DIR}/bin/.blender/locale ${TARGETDIR}/blender.app/Contents/MacOS/.blender/
COMMAND cp ${CMAKE_SOURCE_DIR}/bin/.blender/.Blanguages ${TARGETDIR}/blender.app/Contents/Resources/
)
ENDIF(WITH_INTERNATIONAL)
@@ -257,7 +257,8 @@ IF(WITH_INSTALL)
COMMAND xcopy /E /Y \"${WIN_SOURCE_DIR}\\release\\scripts\\*.*\" \"${TARGETDIR}\\.blender\\scripts\"
COMMAND xcopy /E /Y \"${WIN_SOURCE_DIR}\\release\\plugins\\*.*\" \"${TARGETDIR}\\plugins\"
COMMAND copy /Y \"${WIN_SOURCE_DIR}\\release\\text\\*.*\" \"${TARGETDIR}\"
- COMMAND copy /Y \"${WIN_SOURCE_DIR}\\release\\windows\\extra\\python26.zip\" \"${TARGETDIR}\\\"
+ # TODO, copy python bundle
+ # COMMAND copy /Y \"${WIN_SOURCE_DIR}\\release\\windows\\extra\\python31.zip\" \"${TARGETDIR}\\\"
)
FILE(TO_NATIVE_PATH "${LIBDIR}" WIN_LIBDIR)
diff --git a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
index 1ede16f017e..df7f35d7773 100644
--- a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
+++ b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
@@ -34,6 +34,7 @@
#include <signal.h>
#include <stdlib.h>
+#include <stdio.h>
#ifdef WIN32
// don't show stl-warnings
@@ -137,6 +138,7 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, int alw
BLI_strncpy(pathname, blenderdata->name, sizeof(pathname));
BLI_strncpy(oldsce, G.sce, sizeof(oldsce));
+#ifndef DISABLE_PYTHON
resetGamePythonPath(); // need this so running a second time wont use an old blendfiles path
setGamePythonPath(G.sce);
@@ -145,6 +147,7 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, int alw
PyGILState_STATE gilstate = PyGILState_Ensure();
PyObject *pyGlobalDict = PyDict_New(); /* python utility storage, spans blend file loading */
+#endif
bgl::InitExtensions(true);
@@ -206,8 +209,9 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, int alw
ketsjiengine->SetUseFixedTime(usefixed);
ketsjiengine->SetTimingDisplay(frameRate, profile, properties);
+#ifndef DISABLE_PYTHON
CValue::SetDeprecationWarnings(nodepwarnings);
-
+#endif
//lock frame and camera enabled - storing global values
int tmp_lay= scene->lay;
@@ -288,7 +292,9 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, int alw
if(blenderdata) {
BLI_strncpy(G.sce, blenderdata->name, sizeof(G.sce));
BLI_strncpy(pathname, blenderdata->name, sizeof(pathname));
+#ifndef DISABLE_PYTHON
setGamePythonPath(G.sce);
+#endif
}
}
// else forget it, we can't find it
@@ -365,10 +371,11 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, int alw
networkdevice,
startscenename,
blscene);
-
+
+#ifndef DISABLE_PYTHON
// some python things
PyObject* dictionaryobject = initGamePythonScripting("Ketsji", psl_Lowest, blenderdata);
- ketsjiengine->SetPythonDictionary(dictionaryobject);
+ ketsjiengine->SetPyNamespace(dictionaryobject);
initRasterizer(rasterizer, canvas);
PyObject *gameLogic = initGameLogic(ketsjiengine, startscene);
PyDict_SetItemString(PyModule_GetDict(gameLogic), "globalDict", pyGlobalDict); // Same as importing the module.
@@ -383,6 +390,7 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, int alw
#ifdef WITH_FFMPEG
initVideoTexture();
#endif
+#endif // DISABLE_PYTHON
//initialize Dome Settings
if(blscene->gm.stereoflag == STEREO_DOME)
@@ -398,7 +406,6 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, int alw
// convert and add scene
sceneconverter->ConvertScene(
startscene,
- dictionaryobject,
rendertools,
canvas);
ketsjiengine->AddScene(startscene);
@@ -468,7 +475,7 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, int alw
// when exiting the mainloop
-
+#ifndef DISABLE_PYTHON
// Clears the dictionary by hand:
// This prevents, extra references to global variables
// inside the GameLogic dictionary when the python interpreter is finalized.
@@ -488,9 +495,11 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, int alw
}
Py_DECREF(gameLogic_keys_new);
gameLogic_keys_new = NULL;
-
+#endif
ketsjiengine->StopEngine();
+#ifndef DISABLE_PYTHON
exitGamePythonScripting();
+#endif
networkdevice->Disconnect();
}
if (sceneconverter)
@@ -498,9 +507,11 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, int alw
delete sceneconverter;
sceneconverter = NULL;
}
-
+
+#ifndef DISABLE_PYTHON
Py_DECREF(gameLogic_keys);
gameLogic_keys = NULL;
+#endif
}
//lock frame and camera enabled - restoring global values
if (v3d->scenelock==0){
@@ -555,14 +566,17 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, int alw
} while (exitrequested == KX_EXIT_REQUEST_RESTART_GAME || exitrequested == KX_EXIT_REQUEST_START_OTHER_GAME);
- Py_DECREF(pyGlobalDict);
-
if (bfd) BLO_blendfiledata_free(bfd);
BLI_strncpy(G.sce, oldsce, sizeof(G.sce));
+#ifndef DISABLE_PYTHON
+ Py_DECREF(pyGlobalDict);
+
// Release Python's GIL
PyGILState_Release(gilstate);
+#endif
+
}
extern "C" void StartKetsjiShellSimulation(struct wmWindow *win,
@@ -581,9 +595,11 @@ extern "C" void StartKetsjiShellSimulation(struct wmWindow *win,
BLI_strncpy(pathname, blenderdata->name, sizeof(pathname));
+#ifndef DISABLE_PYTHON
// Acquire Python's GIL (global interpreter lock)
// so we can safely run Python code and API calls
PyGILState_STATE gilstate = PyGILState_Ensure();
+#endif
bgl::InitExtensions(true);
@@ -680,9 +696,10 @@ extern "C" void StartKetsjiShellSimulation(struct wmWindow *win,
startscenename,
blscene);
+#ifndef DISABLE_PYTHON
// some python things
PyObject* dictionaryobject = initGamePythonScripting("Ketsji", psl_Lowest, blenderdata);
- ketsjiengine->SetPythonDictionary(dictionaryobject);
+ ketsjiengine->SetPyNamespace(dictionaryobject);
initRasterizer(rasterizer, canvas);
PyObject *gameLogic = initGameLogic(ketsjiengine, startscene);
PyDict_SetItemString(dictionaryobject, "GameLogic", gameLogic); // Same as importing the module
@@ -694,13 +711,13 @@ extern "C" void StartKetsjiShellSimulation(struct wmWindow *win,
#ifdef WITH_FFMPEG
initVideoTexture();
#endif
+#endif // DISABLE_PYTHON
if (sceneconverter)
{
// convert and add scene
sceneconverter->ConvertScene(
startscene,
- dictionaryobject,
rendertools,
canvas);
ketsjiengine->AddScene(startscene);
@@ -778,6 +795,8 @@ extern "C" void StartKetsjiShellSimulation(struct wmWindow *win,
} while (exitrequested == KX_EXIT_REQUEST_RESTART_GAME || exitrequested == KX_EXIT_REQUEST_START_OTHER_GAME);
+#ifndef DISABLE_PYTHON
// Release Python's GIL
PyGILState_Release(gilstate);
+#endif
}
diff --git a/source/gameengine/BlenderRoutines/CMakeLists.txt b/source/gameengine/BlenderRoutines/CMakeLists.txt
index ce85c1185b0..f2d6528d797 100644
--- a/source/gameengine/BlenderRoutines/CMakeLists.txt
+++ b/source/gameengine/BlenderRoutines/CMakeLists.txt
@@ -35,12 +35,17 @@ SET(INC
../../../source/blender/gpu
../../../extern/bullet2/src
../../../extern/glew/include
- ${PYTHON_INC}
)
IF(WITH_FFMPEG)
ADD_DEFINITIONS(-DWITH_FFMPEG)
ENDIF(WITH_FFMPEG)
+IF(WITH_PYTHON)
+ SET(INC ${INC} ${PYTHON_INC})
+ELSE(WITH_PYTHON)
+ ADD_DEFINITIONS(-DDISABLE_PYTHON)
+ENDIF(WITH_PYTHON)
+
BLENDERLIB(bf_blroutines "${SRC}" "${INC}")
#env.BlenderLib ( 'bf_bloutines', sources, Split(incs), [], libtype=['game', 'game2', 'player'], priority=[0, 0, 55] , compileflags=cxxflags)
diff --git a/source/gameengine/BlenderRoutines/SConscript b/source/gameengine/BlenderRoutines/SConscript
index 1e8ff3c48e8..f076612e231 100644
--- a/source/gameengine/BlenderRoutines/SConscript
+++ b/source/gameengine/BlenderRoutines/SConscript
@@ -25,7 +25,11 @@ incs += ' #source/blender/windowmanager'
if env['WITH_BF_FFMPEG']:
defs.append('WITH_FFMPEG')
-incs += ' ' + env['BF_PYTHON_INC']
+if env['WITH_BF_PYTHON']:
+ incs += ' ' + env['BF_PYTHON_INC']
+else:
+ defs.append('DISABLE_PYTHON')
+
incs += ' ' + env['BF_BULLET_INC']
incs += ' ' + env['BF_OPENGL_INC']
diff --git a/source/gameengine/CMakeLists.txt b/source/gameengine/CMakeLists.txt
index 5a1887bd6c3..518e6a2bd58 100644
--- a/source/gameengine/CMakeLists.txt
+++ b/source/gameengine/CMakeLists.txt
@@ -38,7 +38,10 @@ ADD_SUBDIRECTORY(Rasterizer)
ADD_SUBDIRECTORY(Rasterizer/RAS_OpenGLRasterizer)
ADD_SUBDIRECTORY(SceneGraph)
ADD_SUBDIRECTORY(Physics/Bullet)
-ADD_SUBDIRECTORY(VideoTexture)
+
+IF(WITH_PYTHON)
+ ADD_SUBDIRECTORY(VideoTexture)
+ENDIF(WITH_PYTHON)
IF(WITH_PLAYER)
ADD_SUBDIRECTORY(GamePlayer)
diff --git a/source/gameengine/Converter/BL_ActionActuator.cpp b/source/gameengine/Converter/BL_ActionActuator.cpp
index 2f0e3e9fa65..6f3036d8e09 100644
--- a/source/gameengine/Converter/BL_ActionActuator.cpp
+++ b/source/gameengine/Converter/BL_ActionActuator.cpp
@@ -432,6 +432,8 @@ bool BL_ActionActuator::Update(double curtime, bool frame)
return keepgoing;
};
+#ifndef DISABLE_PYTHON
+
/* ------------------------------------------------------------------------- */
/* Python functions */
/* ------------------------------------------------------------------------- */
@@ -675,3 +677,5 @@ PyObject* BL_ActionActuator::pyattr_get_channel_names(void *self_v, const KX_PYA
return ret;
}
+
+#endif // DISABLE_PYTHON
diff --git a/source/gameengine/Converter/BL_ActionActuator.h b/source/gameengine/Converter/BL_ActionActuator.h
index 2e0e38b4cc3..3f3cd5f496d 100644
--- a/source/gameengine/Converter/BL_ActionActuator.h
+++ b/source/gameengine/Converter/BL_ActionActuator.h
@@ -84,6 +84,8 @@ public:
bAction* GetAction() { return m_action; }
void SetAction(bAction* act) { m_action= act; }
+#ifndef DISABLE_PYTHON
+
KX_PYMETHOD_O(BL_ActionActuator,GetChannel);
KX_PYMETHOD_DOC(BL_ActionActuator,setChannel);
@@ -129,6 +131,7 @@ public:
return 1;
}
}
+#endif // DISABLE_PYTHON
protected:
diff --git a/source/gameengine/Converter/BL_ArmatureActuator.cpp b/source/gameengine/Converter/BL_ArmatureActuator.cpp
index 741f1cf0553..a018f0f938d 100644
--- a/source/gameengine/Converter/BL_ArmatureActuator.cpp
+++ b/source/gameengine/Converter/BL_ArmatureActuator.cpp
@@ -175,6 +175,8 @@ bool BL_ArmatureActuator::Update(double curtime, bool frame)
return result;
}
+#ifndef DISABLE_PYTHON
+
/* ------------------------------------------------------------------------- */
/* Python Integration Hooks */
/* ------------------------------------------------------------------------- */
@@ -261,5 +263,5 @@ PyObject* BL_ArmatureActuator::pyattr_get_constraint(void *self, const struct KX
return constraint->GetProxy();
}
-
+#endif // DISABLE_PYTHON
diff --git a/source/gameengine/Converter/BL_ArmatureActuator.h b/source/gameengine/Converter/BL_ArmatureActuator.h
index 5a7752b8169..e7e12bc2e4e 100644
--- a/source/gameengine/Converter/BL_ArmatureActuator.h
+++ b/source/gameengine/Converter/BL_ArmatureActuator.h
@@ -66,11 +66,15 @@ public:
virtual bool Update(double curtime, bool frame);
virtual void ReParent(SCA_IObject* parent);
+#ifndef DISABLE_PYTHON
+
/* These are used to get and set m_target */
static PyObject* pyattr_get_constraint(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
static PyObject* pyattr_get_object(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
static int pyattr_set_object(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
+#endif // DISABLE_PYTHON
+
private:
// identify the constraint that this actuator controls
void FindConstraint();
diff --git a/source/gameengine/Converter/BL_ArmatureChannel.cpp b/source/gameengine/Converter/BL_ArmatureChannel.cpp
index 2f21d4f2978..9a9161b080f 100644
--- a/source/gameengine/Converter/BL_ArmatureChannel.cpp
+++ b/source/gameengine/Converter/BL_ArmatureChannel.cpp
@@ -37,6 +37,8 @@
#include "BLI_arithb.h"
#include "BLI_string.h"
+#ifndef DISABLE_PYTHON
+
PyTypeObject BL_ArmatureChannel::Type = {
PyVarObject_HEAD_INIT(NULL, 0)
"BL_ArmatureChannel",
@@ -74,6 +76,8 @@ PyObject *BL_ArmatureChannel::NewProxy(bool py_owns)
return NewProxyPlus_Ext(this, &Type, m_posechannel, py_owns);
}
+#endif // DISABLE_PYTHON
+
BL_ArmatureChannel::BL_ArmatureChannel(
BL_ArmatureObject *armature,
bPoseChannel *posechannel)
@@ -85,6 +89,8 @@ BL_ArmatureChannel::~BL_ArmatureChannel()
{
}
+#ifndef DISABLE_PYTHON
+
// PYTHON
PyMethodDef BL_ArmatureChannel::Methods[] = {
@@ -459,3 +465,5 @@ PyObject *BL_ArmatureBone::py_bone_get_children(void *self, const struct KX_PYAT
return childrenlist;
}
+
+#endif // DISABLE_PYTHON
diff --git a/source/gameengine/Converter/BL_ArmatureChannel.h b/source/gameengine/Converter/BL_ArmatureChannel.h
index 0f0f5a062e0..64b03835d83 100644
--- a/source/gameengine/Converter/BL_ArmatureChannel.h
+++ b/source/gameengine/Converter/BL_ArmatureChannel.h
@@ -57,14 +57,15 @@ public:
struct bPoseChannel *posechannel);
virtual ~BL_ArmatureChannel();
+#ifndef DISABLE_PYTHON
+ // Python access
virtual PyObject* py_repr(void);
- // Python access
static PyObject* py_attr_getattr(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
static int py_attr_setattr(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
static PyObject* py_attr_get_joint_rotation(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
static int py_attr_set_joint_rotation(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
-
+#endif // DISABLE_PYTHON
};
/* this is a factory class to access bBone data field in the GE.
@@ -80,9 +81,12 @@ private:
virtual ~BL_ArmatureBone() {}
public:
+
+#ifndef DISABLE_PYTHON
static PyObject *py_bone_repr(PyObject *self);
static PyObject *py_bone_get_parent(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
static PyObject *py_bone_get_children(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
+#endif
};
diff --git a/source/gameengine/Converter/BL_ArmatureConstraint.cpp b/source/gameengine/Converter/BL_ArmatureConstraint.cpp
index 15e12611483..42581b63ec4 100644
--- a/source/gameengine/Converter/BL_ArmatureConstraint.cpp
+++ b/source/gameengine/Converter/BL_ArmatureConstraint.cpp
@@ -37,6 +37,8 @@
#include "BLI_arithb.h"
#include "BLI_string.h"
+#ifndef DISABLE_PYTHON
+
PyTypeObject BL_ArmatureConstraint::Type = {
PyVarObject_HEAD_INIT(NULL, 0)
"BL_ArmatureConstraint",
@@ -64,6 +66,8 @@ PyObject* BL_ArmatureConstraint::py_repr(void)
return PyUnicode_FromString(m_name);
}
+#endif // DISABLE_PYTHON
+
BL_ArmatureConstraint::BL_ArmatureConstraint(
BL_ArmatureObject *armature,
bPoseChannel *posechannel,
@@ -237,6 +241,8 @@ void BL_ArmatureConstraint::SetSubtarget(KX_GameObject* subtarget)
}
+#ifndef DISABLE_PYTHON
+
// PYTHON
PyMethodDef BL_ArmatureConstraint::Methods[] = {
@@ -445,3 +451,4 @@ int BL_ArmatureConstraint::py_attr_setattr(void *self_v, const struct KX_PYATTRI
return PY_SET_ATTR_FAIL;
}
+#endif // DISABLE_PYTHON
diff --git a/source/gameengine/Converter/BL_ArmatureConstraint.h b/source/gameengine/Converter/BL_ArmatureConstraint.h
index f10849ea05b..2a202dfe62e 100644
--- a/source/gameengine/Converter/BL_ArmatureConstraint.h
+++ b/source/gameengine/Converter/BL_ArmatureConstraint.h
@@ -73,9 +73,6 @@ public:
KX_GameObject* subtarget);
virtual ~BL_ArmatureConstraint();
-
- virtual PyObject* py_repr(void);
-
BL_ArmatureConstraint* GetReplica() const;
void ReParent(BL_ArmatureObject* armature);
void Relink(GEN_Map<GEN_HashedPtr, void*> *map);
@@ -107,10 +104,14 @@ public:
void SetTarget(KX_GameObject* target);
void SetSubtarget(KX_GameObject* subtarget);
+#ifndef DISABLE_PYTHON
+
// Python access
+ virtual PyObject* py_repr(void);
+
static PyObject* py_attr_getattr(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
static int py_attr_setattr(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
-
+#endif // DISABLE_PYTHON
};
#endif //__BL_ARMATURECONSTRAINT
diff --git a/source/gameengine/Converter/BL_ArmatureObject.cpp b/source/gameengine/Converter/BL_ArmatureObject.cpp
index d5660d9ef84..a6066adc03e 100644
--- a/source/gameengine/Converter/BL_ArmatureObject.cpp
+++ b/source/gameengine/Converter/BL_ArmatureObject.cpp
@@ -152,7 +152,7 @@ void game_blend_poses(bPose *dst, bPose *src, float srcweight/*, short mode*/)
for (dchan = (bPoseChannel*)dst->chanbase.first; dchan; dchan=(bPoseChannel*)dchan->next, schan= (bPoseChannel*)schan->next){
// always blend on all channels since we don't know which one has been set
/* quat interpolation done separate */
- if (schan->rotmode == PCHAN_ROT_QUAT) {
+ if (schan->rotmode == ROT_MODE_QUAT) {
float dquat[4], squat[4];
QUATCOPY(dquat, dchan->quat);
@@ -590,6 +590,8 @@ float BL_ArmatureObject::GetBoneLength(Bone* bone) const
return (float)(MT_Point3(bone->head) - MT_Point3(bone->tail)).length();
}
+#ifndef DISABLE_PYTHON
+
// PYTHON
PyTypeObject BL_ArmatureObject::Type = {
@@ -654,3 +656,5 @@ KX_PYMETHODDEF_DOC_NOARGS(BL_ArmatureObject, update,
SetActiveAction(NULL, 0, KX_GetActiveEngine()->GetFrameTime());
Py_RETURN_NONE;
}
+
+#endif // DISABLE_PYTHON
diff --git a/source/gameengine/Converter/BL_ArmatureObject.h b/source/gameengine/Converter/BL_ArmatureObject.h
index 8e3d5734b73..b7ef38468bb 100644
--- a/source/gameengine/Converter/BL_ArmatureObject.h
+++ b/source/gameengine/Converter/BL_ArmatureObject.h
@@ -108,11 +108,15 @@ public:
virtual int GetGameObjectType() { return OBJ_ARMATURE; }
+#ifndef DISABLE_PYTHON
+
// PYTHON
static PyObject* pyattr_get_constraints(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
static PyObject* pyattr_get_channels(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
KX_PYMETHOD_DOC_NOARGS(BL_ArmatureObject, update);
+#endif // DISABLE_PYTHON
+
protected:
/* list element: BL_ArmatureConstraint. Use SG_DListHead to have automatic list replication */
SG_DListHead<BL_ArmatureConstraint> m_controlledConstraints;
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
index 8feae48f12e..db32f18f63b 100644
--- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp
+++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
@@ -838,8 +838,10 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, KX_Scene* scene,
if (mface->v4)
tan3 = tangent[f*4 + 3];
}
-
- ma = give_current_material(blenderobj, mface->mat_nr+1);
+ if(blenderobj)
+ ma = give_current_material(blenderobj, mface->mat_nr+1);
+ else
+ ma = mesh->mat ? mesh->mat[mface->mat_nr]:NULL;
{
bool visible = true;
@@ -1895,7 +1897,6 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
KX_Scene* kxscene,
KX_KetsjiEngine* ketsjiEngine,
e_PhysicsEngine physics_engine,
- PyObject* pythondictionary,
RAS_IRenderTools* rendertools,
RAS_ICanvas* canvas,
KX_BlenderSceneConverter* converter,
@@ -2651,7 +2652,7 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
struct Object* blenderobj = gameobj->GetBlenderObject();
int layerMask = (groupobj.find(blenderobj) == groupobj.end()) ? activeLayerBitInfo : 0;
bool isInActiveLayer = (blenderobj->lay & layerMask)!=0;
- BL_ConvertControllers(blenderobj,gameobj,logicmgr,pythondictionary,layerMask,isInActiveLayer,converter);
+ BL_ConvertControllers(blenderobj,gameobj,logicmgr, layerMask,isInActiveLayer,converter);
}
for ( i=0;i<logicbrick_conversionlist->GetCount();i++)
{
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.h b/source/gameengine/Converter/BL_BlenderDataConversion.h
index b8f9d1ec4e6..218b296b47b 100644
--- a/source/gameengine/Converter/BL_BlenderDataConversion.h
+++ b/source/gameengine/Converter/BL_BlenderDataConversion.h
@@ -40,7 +40,6 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
class KX_Scene* kxscene,
class KX_KetsjiEngine* ketsjiEngine,
e_PhysicsEngine physics_engine,
- PyObject* pythondictionary,
class RAS_IRenderTools* rendertools,
class RAS_ICanvas* canvas,
class KX_BlenderSceneConverter* sceneconverter,
diff --git a/source/gameengine/Converter/BL_ShapeActionActuator.cpp b/source/gameengine/Converter/BL_ShapeActionActuator.cpp
index 81ce9ff6154..0af6556f285 100644
--- a/source/gameengine/Converter/BL_ShapeActionActuator.cpp
+++ b/source/gameengine/Converter/BL_ShapeActionActuator.cpp
@@ -412,6 +412,8 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame)
return keepgoing;
};
+#ifndef DISABLE_PYTHON
+
/* ------------------------------------------------------------------------- */
/* Python functions */
/* ------------------------------------------------------------------------- */
@@ -492,3 +494,5 @@ int BL_ShapeActionActuator::pyattr_set_action(void *self_v, const KX_PYATTRIBUTE
return PY_SET_ATTR_SUCCESS;
}
+
+#endif // DISABLE_PYTHON
diff --git a/source/gameengine/Converter/BL_ShapeActionActuator.h b/source/gameengine/Converter/BL_ShapeActionActuator.h
index 80157630e27..efb1293a5eb 100644
--- a/source/gameengine/Converter/BL_ShapeActionActuator.h
+++ b/source/gameengine/Converter/BL_ShapeActionActuator.h
@@ -82,6 +82,8 @@ public:
bAction* GetAction() { return m_action; }
void SetAction(bAction* act) { m_action= act; }
+#ifndef DISABLE_PYTHON
+
static PyObject* pyattr_get_action(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
static int pyattr_set_action(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
@@ -123,6 +125,8 @@ public:
}
+#endif // DISABLE_PYTHON
+
protected:
void SetStartTime(float curtime);
diff --git a/source/gameengine/Converter/CMakeLists.txt b/source/gameengine/Converter/CMakeLists.txt
index d617934ec01..f9af2c23629 100644
--- a/source/gameengine/Converter/CMakeLists.txt
+++ b/source/gameengine/Converter/CMakeLists.txt
@@ -61,8 +61,13 @@ SET(INC
../../../source/blender/gpu
../../../source/blender/ikplugin
../../../extern/bullet2/src
- ${PYTHON_INC}
)
+IF(WITH_PYTHON)
+ SET(INC ${INC} ${PYTHON_INC})
+ELSE(WITH_PYTHON)
+ ADD_DEFINITIONS(-DDISABLE_PYTHON)
+ENDIF(WITH_PYTHON)
+
BLENDERLIB(bf_converter "${SRC}" "${INC}")
#env.BlenderLib ( 'bf_converter', sources, Split(incs), [], libtype=['game','player'], priority=[5,70] )
diff --git a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
index 151564391f3..26b4514061c 100644
--- a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
+++ b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
@@ -243,7 +243,6 @@ struct BlenderDebugDraw : public btIDebugDraw
#endif
void KX_BlenderSceneConverter::ConvertScene(class KX_Scene* destinationscene,
- PyObject* dictobj,
class RAS_IRenderTools* rendertools,
class RAS_ICanvas* canvas)
{
@@ -328,7 +327,6 @@ void KX_BlenderSceneConverter::ConvertScene(class KX_Scene* destinationscene,
destinationscene,
m_ketsjiEngine,
physics_engine,
- dictobj,
rendertools,
canvas,
this,
@@ -920,3 +918,10 @@ void KX_BlenderSceneConverter::TestHandlesPhysicsObjectToAnimationIpo()
}
+
+#ifndef DISABLE_PYTHON
+PyObject *KX_BlenderSceneConverter::GetPyNamespace()
+{
+ return m_ketsjiEngine->GetPyNamespace();
+}
+#endif
diff --git a/source/gameengine/Converter/KX_BlenderSceneConverter.h b/source/gameengine/Converter/KX_BlenderSceneConverter.h
index bb87a21a683..f74944d3552 100644
--- a/source/gameengine/Converter/KX_BlenderSceneConverter.h
+++ b/source/gameengine/Converter/KX_BlenderSceneConverter.h
@@ -89,7 +89,6 @@ public:
*/
virtual void ConvertScene(
class KX_Scene* destinationscene,
- PyObject* dictobj,
class RAS_IRenderTools* rendertools,
class RAS_ICanvas* canvas
);
@@ -143,6 +142,9 @@ public:
struct Main* GetMain() { return m_maggie; };
+#ifndef DISABLE_PYTHON
+ PyObject *GetPyNamespace();
+#endif
#ifdef WITH_CXX_GUARDEDALLOC
public:
diff --git a/source/gameengine/Converter/KX_ConvertControllers.cpp b/source/gameengine/Converter/KX_ConvertControllers.cpp
index 85ab8e4f8b8..faef0feaf48 100644
--- a/source/gameengine/Converter/KX_ConvertControllers.cpp
+++ b/source/gameengine/Converter/KX_ConvertControllers.cpp
@@ -91,8 +91,7 @@ LinkControllerToActuators(
void BL_ConvertControllers(
struct Object* blenderobject,
class KX_GameObject* gameobj,
- SCA_LogicManager* logicmgr,
- PyObject* pythondictionary,
+ SCA_LogicManager* logicmgr,
int activeLayerBitInfo,
bool isInActiveLayer,
KX_BlenderSceneConverter* converter
@@ -158,8 +157,9 @@ void BL_ConvertControllers(
bPythonCont* pycont = (bPythonCont*) bcontr->data;
SCA_PythonController* pyctrl = new SCA_PythonController(gameobj, pycont->mode);
gamecontroller = pyctrl;
-
- pyctrl->SetDictionary(pythondictionary);
+#ifndef DISABLE_PYTHON
+
+ pyctrl->SetNamespace(converter->GetPyNamespace());
if(pycont->mode==SCA_PythonController::SCA_PYEXEC_SCRIPT) {
if (pycont->text)
@@ -187,6 +187,8 @@ void BL_ConvertControllers(
pyctrl->SetDebug(true);
}
+#endif // DISABLE_PYTHON
+
break;
}
default:
@@ -211,7 +213,8 @@ void BL_ConvertControllers(
gameobj->AddController(gamecontroller);
converter->RegisterGameController(gamecontroller, bcontr);
-
+
+#ifndef DISABLE_PYTHON
if (bcontr->type==CONT_PYTHON) {
SCA_PythonController *pyctrl= static_cast<SCA_PythonController*>(gamecontroller);
/* not strictly needed but gives syntax errors early on and
@@ -226,7 +229,8 @@ void BL_ConvertControllers(
// pyctrl->Import();
}
}
-
+#endif // DISABLE_PYTHON
+
//done with gamecontroller
gamecontroller->Release();
}
diff --git a/source/gameengine/Converter/KX_ConvertControllers.h b/source/gameengine/Converter/KX_ConvertControllers.h
index d340778290c..2689ad446bd 100644
--- a/source/gameengine/Converter/KX_ConvertControllers.h
+++ b/source/gameengine/Converter/KX_ConvertControllers.h
@@ -34,8 +34,7 @@
void BL_ConvertControllers(
struct Object* blenderobject,
class KX_GameObject* gameobj,
- class SCA_LogicManager* logicmgr,
- PyObject* pythondictionary,
+ class SCA_LogicManager* logicmgr,
int activeLayerBitInfo,
bool isInActiveLayer,
class KX_BlenderSceneConverter* converter
diff --git a/source/gameengine/Converter/KX_ConvertProperties.cpp b/source/gameengine/Converter/KX_ConvertProperties.cpp
index 1c22d2a0600..7ecdb6c5db6 100644
--- a/source/gameengine/Converter/KX_ConvertProperties.cpp
+++ b/source/gameengine/Converter/KX_ConvertProperties.cpp
@@ -130,7 +130,7 @@ void BL_ConvertProperties(Object* object,KX_GameObject* gameobj,SCA_TimeEventMan
propval->Release();
}
-
+#ifndef DISABLE_PYTHON
/* Warn if we double up on attributes, this isnt quite right since it wont find inherited attributes however there arnt many */
for(PyAttributeDef *attrdef = KX_GameObject::Attributes; attrdef->m_name; attrdef++) {
if(strcmp(prop->name, attrdef->m_name)==0) {
@@ -145,6 +145,7 @@ void BL_ConvertProperties(Object* object,KX_GameObject* gameobj,SCA_TimeEventMan
}
}
/* end warning check */
+#endif // DISABLE_PYTHON
prop = prop->next;
}
diff --git a/source/gameengine/Converter/KX_ConvertSensors.cpp b/source/gameengine/Converter/KX_ConvertSensors.cpp
index 99a2ec3ca64..692cc91f340 100644
--- a/source/gameengine/Converter/KX_ConvertSensors.cpp
+++ b/source/gameengine/Converter/KX_ConvertSensors.cpp
@@ -28,6 +28,7 @@
* Conversion of Blender data blocks to KX sensor system
*/
+#include <stdio.h>
#ifdef HAVE_CONFIG_H
#include <config.h>
diff --git a/source/gameengine/Converter/SConscript b/source/gameengine/Converter/SConscript
index 5f6e9df521b..616c205732c 100644
--- a/source/gameengine/Converter/SConscript
+++ b/source/gameengine/Converter/SConscript
@@ -13,7 +13,7 @@ incs += ' #source/blender/blenlib #source/blender/blenkernel #source/blender'
incs += ' #source/blender/editors/include #source/blender/makesdna #source/gameengine/Rasterizer'
incs += ' #source/gameengine/Rasterizer/RAS_OpenGLRasterizer #source/gameengine/GameLogic'
incs += ' #source/gameengine/Expressions #source/gameengine/Network #source/gameengine/SceneGraph'
-incs += ' #source/gameengine/Physics/common #source/gameengine/Physics/Bullet #source/gameengine/Physics/BlOde'
+incs += ' #source/gameengine/Physics/common #source/gameengine/Physics/Bullet'
incs += ' #source/gameengine/Physics/Dummy'
incs += ' #source/gameengine/Network/LoopBackNetwork'
incs += ' #source/blender/misc #source/blender/blenloader #source/blender/gpu'
@@ -21,7 +21,15 @@ incs += ' #source/blender/windowmanager'
incs += ' #source/blender/makesrna'
incs += ' #source/blender/ikplugin'
-incs += ' ' + env['BF_PYTHON_INC']
incs += ' ' + env['BF_BULLET_INC']
+if env['BF_DEBUG']:
+ if env['OURPLATFORM'] in ('win32-mingw', 'win32-vc', 'win64-vc'):
+ defs.append('_DEBUG')
+
+if env['WITH_BF_PYTHON']:
+ incs += ' ' + env['BF_PYTHON_INC']
+else:
+ defs.append('DISABLE_PYTHON')
+
env.BlenderLib ( 'bf_converter', sources, Split(incs), defs, libtype=['core','player'], priority=[305,40], cxx_compileflags=env['BGE_CXXFLAGS'])
diff --git a/source/gameengine/Expressions/BoolValue.cpp b/source/gameengine/Expressions/BoolValue.cpp
index 6779c2ea780..62e43da335b 100644
--- a/source/gameengine/Expressions/BoolValue.cpp
+++ b/source/gameengine/Expressions/BoolValue.cpp
@@ -205,9 +205,9 @@ CValue* CBoolValue::GetReplica()
return replica;
}
-
-
+#ifndef DISABLE_PYTHON
PyObject* CBoolValue::ConvertValueToPython()
{
return PyBool_FromLong(m_bool != 0);
}
+#endif // DISABLE_PYTHON
diff --git a/source/gameengine/Expressions/BoolValue.h b/source/gameengine/Expressions/BoolValue.h
index 4d0103ec1dd..baec6bdee69 100644
--- a/source/gameengine/Expressions/BoolValue.h
+++ b/source/gameengine/Expressions/BoolValue.h
@@ -45,7 +45,9 @@ public:
void Configure(CValue* menuvalue);
virtual CValue* GetReplica();
+#ifndef DISABLE_PYTHON
virtual PyObject* ConvertValueToPython();
+#endif
private:
bool m_bool;
diff --git a/source/gameengine/Expressions/CMakeLists.txt b/source/gameengine/Expressions/CMakeLists.txt
index ec3738d1fe8..db7d12f313d 100644
--- a/source/gameengine/Expressions/CMakeLists.txt
+++ b/source/gameengine/Expressions/CMakeLists.txt
@@ -34,8 +34,13 @@ SET(INC
../../../intern/moto/include
../../../source/gameengine/SceneGraph
../../../source/blender/blenloader
- ${PYTHON_INC}
)
+IF(WITH_PYTHON)
+ SET(INC ${INC} ${PYTHON_INC})
+ELSE(WITH_PYTHON)
+ ADD_DEFINITIONS(-DDISABLE_PYTHON)
+ENDIF(WITH_PYTHON)
+
BLENDERLIB(bf_expressions "${SRC}" "${INC}")
#env.BlenderLib ( 'bf_expressions', sources, Split(incs), [], libtype=['game','player'], priority = [45,125] )
diff --git a/source/gameengine/Expressions/FloatValue.cpp b/source/gameengine/Expressions/FloatValue.cpp
index 4de685a82c1..b1ac0e1ea9a 100644
--- a/source/gameengine/Expressions/FloatValue.cpp
+++ b/source/gameengine/Expressions/FloatValue.cpp
@@ -314,9 +314,9 @@ CValue* CFloatValue::GetReplica()
}
-
+#ifndef DISABLE_PYTHON
PyObject* CFloatValue::ConvertValueToPython()
{
return PyFloat_FromDouble(m_float);
}
-
+#endif // DISABLE_PYTHON
diff --git a/source/gameengine/Expressions/FloatValue.h b/source/gameengine/Expressions/FloatValue.h
index 442f0eb6cf8..f1469734a1f 100644
--- a/source/gameengine/Expressions/FloatValue.h
+++ b/source/gameengine/Expressions/FloatValue.h
@@ -36,7 +36,9 @@ public:
virtual CValue* GetReplica();
virtual CValue* Calc(VALUE_OPERATOR op, CValue *val);
virtual CValue* CalcFinal(VALUE_DATA_TYPE dtype, VALUE_OPERATOR op, CValue *val);
+#ifndef DISABLE_PYTHON
virtual PyObject* ConvertValueToPython();
+#endif
protected:
float m_float;
diff --git a/source/gameengine/Expressions/IntValue.cpp b/source/gameengine/Expressions/IntValue.cpp
index b782de4bef6..badba8ead63 100644
--- a/source/gameengine/Expressions/IntValue.cpp
+++ b/source/gameengine/Expressions/IntValue.cpp
@@ -326,7 +326,7 @@ void CIntValue::SetValue(CValue* newval)
}
-
+#ifndef DISABLE_PYTHON
PyObject* CIntValue::ConvertValueToPython()
{
if((m_int > INT_MIN) && (m_int < INT_MAX))
@@ -334,3 +334,4 @@ PyObject* CIntValue::ConvertValueToPython()
else
return PyLong_FromLongLong(m_int);
}
+#endif // DISABLE_PYTHON
diff --git a/source/gameengine/Expressions/IntValue.h b/source/gameengine/Expressions/IntValue.h
index 0513026c4cf..26150674c93 100644
--- a/source/gameengine/Expressions/IntValue.h
+++ b/source/gameengine/Expressions/IntValue.h
@@ -47,7 +47,10 @@ public:
void Configure(CValue* menuvalue);
void AddConfigurationData(CValue* menuvalue);
virtual CValue* GetReplica();
+
+#ifndef DISABLE_PYTHON
virtual PyObject* ConvertValueToPython();
+#endif
protected:
virtual ~CIntValue();
diff --git a/source/gameengine/Expressions/KX_Python.h b/source/gameengine/Expressions/KX_Python.h
index f41accec730..ecbd1b9b6b0 100644
--- a/source/gameengine/Expressions/KX_Python.h
+++ b/source/gameengine/Expressions/KX_Python.h
@@ -40,11 +40,13 @@
#undef _POSIX_C_SOURCE
#endif
-
+#ifndef DISABLE_PYTHON
#include "Python.h"
#define USE_MATHUTILS // Blender 2.5x api will use mathutils, for a while we might want to test without it
+#endif
+
#ifdef __FreeBSD__
#include <osreldate.h>
#if __FreeBSD_version > 500039
diff --git a/source/gameengine/Expressions/ListValue.cpp b/source/gameengine/Expressions/ListValue.cpp
index 002674450d1..6e47ed913db 100644
--- a/source/gameengine/Expressions/ListValue.cpp
+++ b/source/gameengine/Expressions/ListValue.cpp
@@ -14,6 +14,8 @@
*
*/
+#include <stdio.h>
+
#include "ListValue.h"
#include "StringValue.h"
#include "VoidValue.h"
@@ -26,9 +28,255 @@
#include <config.h>
#endif
-#if ((PY_MAJOR_VERSION == 2) &&(PY_MINOR_VERSION < 5))
-#define Py_ssize_t int
-#endif
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CListValue::CListValue()
+: CPropValue()
+{
+ m_bReleaseContents=true;
+}
+
+
+
+CListValue::~CListValue()
+{
+
+ if (m_bReleaseContents) {
+ for (unsigned int i=0;i<m_pValueArray.size();i++) {
+ m_pValueArray[i]->Release();
+ }
+ }
+}
+
+
+static STR_String gstrListRep=STR_String("List");
+
+const STR_String & CListValue::GetText()
+{
+ gstrListRep = "[";
+ STR_String commastr = "";
+
+ for (int i=0;i<GetCount();i++)
+ {
+ gstrListRep += commastr;
+ gstrListRep += GetValue(i)->GetText();
+ commastr = ",";
+ }
+ gstrListRep += "]";
+
+ return gstrListRep;
+}
+
+
+
+CValue* CListValue::GetReplica() {
+ CListValue* replica = new CListValue(*this);
+
+ replica->ProcessReplica();
+
+ replica->m_bReleaseContents=true; // for copy, complete array is copied for now...
+ // copy all values
+ int numelements = m_pValueArray.size();
+ unsigned int i=0;
+ replica->m_pValueArray.resize(numelements);
+ for (i=0;i<m_pValueArray.size();i++)
+ replica->m_pValueArray[i] = m_pValueArray[i]->GetReplica();
+
+
+ return replica;
+};
+
+
+
+void CListValue::SetValue(int i, CValue *val)
+{
+ assertd(i < m_pValueArray.size());
+ m_pValueArray[i]=val;
+}
+
+
+
+void CListValue::Resize(int num)
+{
+ m_pValueArray.resize(num);
+}
+
+
+
+void CListValue::Remove(int i)
+{
+ assertd(i<m_pValueArray.size());
+ m_pValueArray.erase(m_pValueArray.begin()+i);
+}
+
+
+
+void CListValue::ReleaseAndRemoveAll()
+{
+ for (unsigned int i=0;i<m_pValueArray.size();i++)
+ m_pValueArray[i]->Release();
+ m_pValueArray.clear();//.Clear();
+}
+
+
+
+CValue* CListValue::FindValue(const STR_String & name)
+{
+ for (int i=0; i < GetCount(); i++)
+ if (GetValue(i)->GetName() == name)
+ return GetValue(i);
+
+ return NULL;
+}
+
+CValue* CListValue::FindValue(const char * name)
+{
+ for (int i=0; i < GetCount(); i++)
+ if (GetValue(i)->GetName() == name)
+ return GetValue(i);
+
+ return NULL;
+}
+
+bool CListValue::SearchValue(CValue *val)
+{
+ for (int i=0;i<GetCount();i++)
+ if (val == GetValue(i))
+ return true;
+ return false;
+}
+
+
+
+void CListValue::SetReleaseOnDestruct(bool bReleaseContents)
+{
+ m_bReleaseContents = bReleaseContents;
+}
+
+
+
+bool CListValue::RemoveValue(CValue *val)
+{
+ bool result=false;
+
+ for (int i=GetCount()-1;i>=0;i--)
+ if (val == GetValue(i))
+ {
+ Remove(i);
+ result=true;
+ }
+ return result;
+}
+
+
+
+void CListValue::MergeList(CListValue *otherlist)
+{
+
+ int numelements = this->GetCount();
+ int numotherelements = otherlist->GetCount();
+
+
+ Resize(numelements+numotherelements);
+
+ for (int i=0;i<numotherelements;i++)
+ {
+ SetValue(i+numelements,otherlist->GetValue(i)->AddRef());
+ }
+}
+
+bool CListValue::CheckEqual(CValue* first,CValue* second)
+{
+ bool result = false;
+
+ CValue* eqval = ((CValue*)first)->Calc(VALUE_EQL_OPERATOR,(CValue*)second);
+
+ if (eqval==NULL)
+ return false;
+ const STR_String& text = eqval->GetText();
+ if (&text==&CBoolValue::sTrueString)
+ {
+ result = true;
+ }
+ eqval->Release();
+ return result;
+
+}
+
+
+/* ---------------------------------------------------------------------
+ * Some stuff taken from the header
+ * --------------------------------------------------------------------- */
+CValue* CListValue::Calc(VALUE_OPERATOR op,CValue *val)
+{
+ //assert(false); // todo: implement me!
+ static int error_printed = 0;
+ if (error_printed==0) {
+ fprintf(stderr, "CValueList::Calc not yet implimented\n");
+ error_printed = 1;
+ }
+ return NULL;
+}
+
+CValue* CListValue::CalcFinal(VALUE_DATA_TYPE dtype,
+ VALUE_OPERATOR op,
+ CValue* val)
+{
+ //assert(false); // todo: implement me!
+ static int error_printed = 0;
+ if (error_printed==0) {
+ fprintf(stderr, "CValueList::CalcFinal not yet implimented\n");
+ error_printed = 1;
+ }
+ return NULL;
+}
+
+
+
+void CListValue::Add(CValue* value)
+{
+ m_pValueArray.push_back(value);
+}
+
+
+
+double CListValue::GetNumber()
+{
+ return -1;
+}
+
+
+
+void CListValue::SetModified(bool bModified)
+{
+ CValue::SetModified(bModified);
+ int numels = GetCount();
+
+ for (int i=0;i<numels;i++)
+ GetValue(i)->SetModified(bModified);
+}
+
+
+
+bool CListValue::IsModified()
+{
+ bool bmod = CValue::IsModified(); //normal own flag
+ int numels = GetCount();
+
+ for (int i=0;i<numels;i++)
+ bmod = bmod || GetValue(i)->IsModified();
+
+ return bmod;
+}
+
+#ifndef DISABLE_PYTHON
+
+/* --------------------------------------------------------------------- */
+/* Python interface ---------------------------------------------------- */
+/* --------------------------------------------------------------------- */
Py_ssize_t listvalue_bufferlen(PyObject* self)
{
@@ -297,13 +545,13 @@ PyMethodDef CListValue::Methods[] = {
{"reverse", (PyCFunction)CListValue::sPyreverse,METH_NOARGS},
{"index", (PyCFunction)CListValue::sPyindex,METH_O},
{"count", (PyCFunction)CListValue::sPycount,METH_O},
-
+
/* Dict style access */
{"get", (PyCFunction)CListValue::sPyget,METH_VARARGS},
-
+
/* Own cvalue funcs */
{"from_id", (PyCFunction)CListValue::sPyfrom_id,METH_O},
-
+
{NULL,NULL} //Sentinel
};
@@ -311,213 +559,29 @@ PyAttributeDef CListValue::Attributes[] = {
{ NULL } //Sentinel
};
-//////////////////////////////////////////////////////////////////////
-// Construction/Destruction
-//////////////////////////////////////////////////////////////////////
-
-CListValue::CListValue()
-: CPropValue()
-{
- m_bReleaseContents=true;
-}
-
-
-
-CListValue::~CListValue()
-{
-
- if (m_bReleaseContents) {
- for (unsigned int i=0;i<m_pValueArray.size();i++) {
- m_pValueArray[i]->Release();
- }
- }
-}
-
-
-static STR_String gstrListRep=STR_String("List");
-
-const STR_String & CListValue::GetText()
-{
- gstrListRep = "[";
- STR_String commastr = "";
-
- for (int i=0;i<GetCount();i++)
- {
- gstrListRep += commastr;
- gstrListRep += GetValue(i)->GetText();
- commastr = ",";
- }
- gstrListRep += "]";
-
- return gstrListRep;
-}
-
-
-
-CValue* CListValue::GetReplica() {
- CListValue* replica = new CListValue(*this);
-
- replica->ProcessReplica();
-
- replica->m_bReleaseContents=true; // for copy, complete array is copied for now...
- // copy all values
- int numelements = m_pValueArray.size();
- unsigned int i=0;
- replica->m_pValueArray.resize(numelements);
- for (i=0;i<m_pValueArray.size();i++)
- replica->m_pValueArray[i] = m_pValueArray[i]->GetReplica();
-
-
- return replica;
-};
-
-
-
-void CListValue::SetValue(int i, CValue *val)
-{
- assertd(i < m_pValueArray.size());
- m_pValueArray[i]=val;
-}
-
-
-
-void CListValue::Resize(int num)
-{
- m_pValueArray.resize(num);
-}
-
-
-
-void CListValue::Remove(int i)
-{
- assertd(i<m_pValueArray.size());
- m_pValueArray.erase(m_pValueArray.begin()+i);
-}
-
-
-
-void CListValue::ReleaseAndRemoveAll()
-{
- for (unsigned int i=0;i<m_pValueArray.size();i++)
- m_pValueArray[i]->Release();
- m_pValueArray.clear();//.Clear();
-}
-
-
-
-CValue* CListValue::FindValue(const STR_String & name)
-{
- for (int i=0; i < GetCount(); i++)
- if (GetValue(i)->GetName() == name)
- return GetValue(i);
-
- return NULL;
-}
-
-CValue* CListValue::FindValue(const char * name)
-{
- for (int i=0; i < GetCount(); i++)
- if (GetValue(i)->GetName() == name)
- return GetValue(i);
-
- return NULL;
-}
-
-bool CListValue::SearchValue(CValue *val)
-{
- for (int i=0;i<GetCount();i++)
- if (val == GetValue(i))
- return true;
- return false;
-}
-
-
-
-void CListValue::SetReleaseOnDestruct(bool bReleaseContents)
-{
- m_bReleaseContents = bReleaseContents;
-}
-
-
-
-bool CListValue::RemoveValue(CValue *val)
-{
- bool result=false;
-
- for (int i=GetCount()-1;i>=0;i--)
- if (val == GetValue(i))
- {
- Remove(i);
- result=true;
- }
- return result;
-}
-
-
-
-void CListValue::MergeList(CListValue *otherlist)
-{
-
- int numelements = this->GetCount();
- int numotherelements = otherlist->GetCount();
-
-
- Resize(numelements+numotherelements);
-
- for (int i=0;i<numotherelements;i++)
- {
- SetValue(i+numelements,otherlist->GetValue(i)->AddRef());
- }
-}
-
-
PyObject* CListValue::Pyappend(PyObject* value)
{
CValue* objval = ConvertPythonToValue(value, "CList.append(i): CValueList, ");
if (!objval) /* ConvertPythonToValue sets the error */
return NULL;
-
+
if (!BGE_PROXY_PYOWNS(m_proxy)) {
PyErr_SetString(PyExc_TypeError, "CList.append(i): this CValueList is used internally for the game engine and can't be modified");
return NULL;
}
-
+
Add(objval);
-
+
Py_RETURN_NONE;
}
-
-
PyObject* CListValue::Pyreverse()
{
std::reverse(m_pValueArray.begin(),m_pValueArray.end());
Py_RETURN_NONE;
}
-
-
-bool CListValue::CheckEqual(CValue* first,CValue* second)
-{
- bool result = false;
-
- CValue* eqval = ((CValue*)first)->Calc(VALUE_EQL_OPERATOR,(CValue*)second);
-
- if (eqval==NULL)
- return false;
- const STR_String& text = eqval->GetText();
- if (&text==&CBoolValue::sTrueString)
- {
- result = true;
- }
- eqval->Release();
- return result;
-
-}
-
-
-
PyObject* CListValue::Pyindex(PyObject *value)
{
PyObject* result = NULL;
@@ -542,7 +606,7 @@ PyObject* CListValue::Pyindex(PyObject *value)
PyErr_SetString(PyExc_ValueError, "CList.index(x): x not in CListValue");
}
return result;
-
+
}
@@ -552,7 +616,7 @@ PyObject* CListValue::Pycount(PyObject* value)
int numfound = 0;
CValue* checkobj = ConvertPythonToValue(value, ""); /* error ignored */
-
+
if (checkobj==NULL) { /* in this case just return that there are no items in the list */
PyErr_Clear();
return PyLong_FromSsize_t(0);
@@ -580,9 +644,9 @@ PyObject* CListValue::Pyget(PyObject *args)
if (!PyArg_ParseTuple(args, "s|O:get", &key, &def))
return NULL;
-
+
CValue *item = FindValue((const char *)key);
- if (item) {
+ if (item) {
PyObject* pyobj = item->ConvertValueToPython();
if (pyobj)
return pyobj;
@@ -597,7 +661,7 @@ PyObject* CListValue::Pyget(PyObject *args)
PyObject* CListValue::Pyfrom_id(PyObject* value)
{
uintptr_t id= (uintptr_t)PyLong_AsVoidPtr(value);
-
+
if (PyErr_Occurred())
return NULL;
@@ -608,72 +672,8 @@ PyObject* CListValue::Pyfrom_id(PyObject* value)
return GetValue(i)->GetProxy();
}
PyErr_SetString(PyExc_IndexError, "from_id(#): id not found in CValueList");
- return NULL;
-
-}
-
-
-/* ---------------------------------------------------------------------
- * Some stuff taken from the header
- * --------------------------------------------------------------------- */
-CValue* CListValue::Calc(VALUE_OPERATOR op,CValue *val)
-{
- //assert(false); // todo: implement me!
- static int error_printed = 0;
- if (error_printed==0) {
- fprintf(stderr, "CValueList::Calc not yet implimented\n");
- error_printed = 1;
- }
return NULL;
-}
-
-CValue* CListValue::CalcFinal(VALUE_DATA_TYPE dtype,
- VALUE_OPERATOR op,
- CValue* val)
-{
- //assert(false); // todo: implement me!
- static int error_printed = 0;
- if (error_printed==0) {
- fprintf(stderr, "CValueList::CalcFinal not yet implimented\n");
- error_printed = 1;
- }
- return NULL;
-}
-
-
-
-void CListValue::Add(CValue* value)
-{
- m_pValueArray.push_back(value);
-}
-
-
-double CListValue::GetNumber()
-{
- return -1;
}
-
-
-void CListValue::SetModified(bool bModified)
-{
- CValue::SetModified(bModified);
- int numels = GetCount();
-
- for (int i=0;i<numels;i++)
- GetValue(i)->SetModified(bModified);
-}
-
-
-
-bool CListValue::IsModified()
-{
- bool bmod = CValue::IsModified(); //normal own flag
- int numels = GetCount();
-
- for (int i=0;i<numels;i++)
- bmod = bmod || GetValue(i)->IsModified();
-
- return bmod;
-}
+#endif // DISABLE_PYTHON
diff --git a/source/gameengine/Expressions/ListValue.h b/source/gameengine/Expressions/ListValue.h
index 2dc458e0148..8f3b9dcda0b 100644
--- a/source/gameengine/Expressions/ListValue.h
+++ b/source/gameengine/Expressions/ListValue.h
@@ -60,6 +60,7 @@ public:
bool CheckEqual(CValue* first,CValue* second);
+#ifndef DISABLE_PYTHON
virtual PyObject* py_repr(void) {
PyObject *py_proxy= this->GetProxy();
PyObject *py_list= PySequence_List(py_proxy);
@@ -75,7 +76,7 @@ public:
KX_PYMETHOD_O(CListValue,count);
KX_PYMETHOD_VARARGS(CListValue,get);
KX_PYMETHOD_O(CListValue,from_id);
-
+#endif
private:
diff --git a/source/gameengine/Expressions/PyObjectPlus.cpp b/source/gameengine/Expressions/PyObjectPlus.cpp
index 7adbf5ac651..54a33b76efd 100644
--- a/source/gameengine/Expressions/PyObjectPlus.cpp
+++ b/source/gameengine/Expressions/PyObjectPlus.cpp
@@ -30,8 +30,6 @@
#include <config.h>
#endif
-#ifndef NO_EXP_PYTHON_EMBEDDING
-
/*------------------------------
* PyObjectPlus cpp
*
@@ -52,6 +50,56 @@
#include "STR_String.h"
#include "MT_Vector3.h"
#include "MEM_guardedalloc.h"
+
+PyObjectPlus::~PyObjectPlus()
+{
+#ifndef DISABLE_PYTHON
+ if(m_proxy) {
+ BGE_PROXY_REF(m_proxy)= NULL;
+ Py_DECREF(m_proxy); /* Remove own reference, python may still have 1 */
+ }
+// assert(ob_refcnt==0);
+#endif
+}
+
+PyObjectPlus::PyObjectPlus() : SG_QList() // constructor
+{
+#ifndef DISABLE_PYTHON
+ m_proxy= NULL;
+#endif
+};
+
+void PyObjectPlus::ProcessReplica()
+{
+#ifndef DISABLE_PYTHON
+ /* Clear the proxy, will be created again if needed with GetProxy()
+ * otherwise the PyObject will point to the wrong reference */
+ m_proxy= NULL;
+#endif
+}
+
+/* Sometimes we might want to manually invalidate a BGE type even if
+ * it hasnt been released by the BGE, say for example when an object
+ * is removed from a scene, accessing it may cause problems.
+ *
+ * In this case the current proxy is made invalid, disowned,
+ * and will raise an error on access. However if python can get access
+ * to this class again it will make a new proxy and work as expected.
+ */
+void PyObjectPlus::InvalidateProxy() // check typename of each parent
+{
+#ifndef DISABLE_PYTHON
+ if(m_proxy) {
+ BGE_PROXY_REF(m_proxy)=NULL;
+ Py_DECREF(m_proxy);
+ m_proxy= NULL;
+ }
+#endif
+}
+
+
+#ifndef DISABLE_PYTHON
+
/*------------------------------
* PyObjectPlus Type -- Every class, even the abstract one should have a Type
------------------------------*/
@@ -78,17 +126,6 @@ PyTypeObject PyObjectPlus::Type = {
NULL // no subtype
};
-
-PyObjectPlus::~PyObjectPlus()
-{
- if(m_proxy) {
- BGE_PROXY_REF(m_proxy)= NULL;
- Py_DECREF(m_proxy); /* Remove own reference, python may still have 1 */
- }
-// assert(ob_refcnt==0);
-}
-
-
PyObject *PyObjectPlus::py_base_repr(PyObject *self) // This should be the entry in Type.
{
PyObjectPlus *self_plus= BGE_PROXY_REF(self);
@@ -202,11 +239,6 @@ void PyObjectPlus::py_base_dealloc(PyObject *self) // python wrapper
#endif
};
-PyObjectPlus::PyObjectPlus() : SG_QList() // constructor
-{
- m_proxy= NULL;
-};
-
/*------------------------------
* PyObjectPlus Methods -- Every class, even the abstract one should have a Methods
------------------------------*/
@@ -1067,30 +1099,6 @@ PyObject *PyObjectPlus::py_repr(void)
return NULL;
}
-void PyObjectPlus::ProcessReplica()
-{
- /* Clear the proxy, will be created again if needed with GetProxy()
- * otherwise the PyObject will point to the wrong reference */
- m_proxy= NULL;
-}
-
-/* Sometimes we might want to manually invalidate a BGE type even if
- * it hasnt been released by the BGE, say for example when an object
- * is removed from a scene, accessing it may cause problems.
- *
- * In this case the current proxy is made invalid, disowned,
- * and will raise an error on access. However if python can get access
- * to this class again it will make a new proxy and work as expected.
- */
-void PyObjectPlus::InvalidateProxy() // check typename of each parent
-{
- if(m_proxy) {
- BGE_PROXY_REF(m_proxy)=NULL;
- Py_DECREF(m_proxy);
- m_proxy= NULL;
- }
-}
-
PyObject *PyObjectPlus::GetProxyPlus_Ext(PyObjectPlus *self, PyTypeObject *tp, void *ptr)
{
if (self->m_proxy==NULL)
@@ -1220,5 +1228,4 @@ void PyObjectPlus::SetDeprecationWarningFirst(WarnLink* wlink) {m_base_wlink_f
void PyObjectPlus::SetDeprecationWarningLinkLast(WarnLink* wlink) {m_base_wlink_last= wlink;}
void PyObjectPlus::NullDeprecationWarning() {m_base_wlink_first= m_base_wlink_last= NULL;}
-#endif //NO_EXP_PYTHON_EMBEDDING
-
+#endif // DISABLE_PYTHON
diff --git a/source/gameengine/Expressions/PyObjectPlus.h b/source/gameengine/Expressions/PyObjectPlus.h
index 237f01f5a3a..971f9296912 100644
--- a/source/gameengine/Expressions/PyObjectPlus.h
+++ b/source/gameengine/Expressions/PyObjectPlus.h
@@ -27,8 +27,6 @@
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef NO_EXP_PYTHON_EMBEDDING
-
#ifndef _adr_py_lib_h_ // only process once,
#define _adr_py_lib_h_ // even if multiply included
@@ -45,6 +43,7 @@
* Python defines
------------------------------*/
+#ifndef DISABLE_PYTHON
#ifdef USE_MATHUTILS
extern "C" {
#include "../../blender/python/generic/Mathutils.h" /* so we can have mathutils callbacks */
@@ -463,6 +462,20 @@ typedef struct KX_PYATTRIBUTE_DEF {
------------------------------*/
typedef PyTypeObject * PyParentObject; // Define the PyParent Object
+#else // DISABLE_PYTHON
+
+#define Py_Header \
+ public: \
+
+
+#define Py_HeaderPtr \
+ public: \
+
+
+#endif
+
+
+
// By making SG_QList the ultimate parent for PyObjectPlus objects, it
// allows to put them in 2 different dynamic lists at the same time
// The use of these links is interesting because they free of memory allocation
@@ -480,11 +493,12 @@ class PyObjectPlus : public SG_QList
public:
PyObjectPlus();
-
- PyObject *m_proxy; /* actually a PyObjectPlus_Proxy */
virtual ~PyObjectPlus(); // destructor
+#ifndef DISABLE_PYTHON
+ PyObject *m_proxy; /* actually a PyObjectPlus_Proxy */
+
/* These static functions are referenced by ALL PyObjectPlus_Proxy types
* they take the C++ reference from the PyObjectPlus_Proxy and call
* its own virtual py_repr, py_base_dealloc ,etc. functions.
@@ -514,16 +528,6 @@ public:
(assume object destructor takes care of it) */
static PyObject *NewProxyPlus_Ext(PyObjectPlus *self, PyTypeObject *tp, void *ptr, bool py_owns);
- void InvalidateProxy();
-
- /**
- * Makes sure any internal data owned by this class is deep copied.
- */
- virtual void ProcessReplica();
-
-
- static bool m_ignore_deprecation_warnings;
-
static WarnLink* GetDeprecationWarningLinkFirst(void);
static WarnLink* GetDeprecationWarningLinkLast(void);
static void SetDeprecationWarningFirst(WarnLink* wlink);
@@ -536,12 +540,20 @@ public:
static void ShowDeprecationWarning_func(const char* method,const char* prop);
static void ClearDeprecationWarning();
-};
+#endif
+ void InvalidateProxy();
-PyObject *py_getattr_dict(PyObject *pydict, PyObject *tp_dict);
+ /**
+ * Makes sure any internal data owned by this class is deep copied.
+ */
+ virtual void ProcessReplica();
-#endif // _adr_py_lib_h_
+ static bool m_ignore_deprecation_warnings;
+};
-#endif //NO_EXP_PYTHON_EMBEDDING
+#ifndef DISABLE_PYTHON
+PyObject *py_getattr_dict(PyObject *pydict, PyObject *tp_dict);
+#endif
+#endif // _adr_py_lib_h_
diff --git a/source/gameengine/Expressions/SConscript b/source/gameengine/Expressions/SConscript
index 26cafb004b2..94af9dcfec8 100644
--- a/source/gameengine/Expressions/SConscript
+++ b/source/gameengine/Expressions/SConscript
@@ -4,6 +4,12 @@ Import ('env')
sources = env.Glob('*.cpp')
incs ='. #source/kernel/gen_system #intern/guardedalloc #intern/string #intern/moto/include #source/gameengine/SceneGraph #source/blender/blenloader'
-incs += ' ' + env['BF_PYTHON_INC']
-env.BlenderLib ( 'bf_expressions', sources, Split(incs), [], libtype=['core','player'], priority = [360,80], cxx_compileflags=env['BGE_CXXFLAGS'])
+defs = []
+
+if env['WITH_BF_PYTHON']:
+ incs += ' ' + env['BF_PYTHON_INC']
+else:
+ defs.append('DISABLE_PYTHON')
+
+env.BlenderLib ( 'bf_expressions', sources, Split(incs), defs, libtype=['core','player'], priority = [360,80], cxx_compileflags=env['BGE_CXXFLAGS'])
diff --git a/source/gameengine/Expressions/StringValue.h b/source/gameengine/Expressions/StringValue.h
index 069eb8d9c24..a23bb4ec3e2 100644
--- a/source/gameengine/Expressions/StringValue.h
+++ b/source/gameengine/Expressions/StringValue.h
@@ -39,9 +39,11 @@ public:
virtual CValue* CalcFinal(VALUE_DATA_TYPE dtype, VALUE_OPERATOR op, CValue *val);
virtual void SetValue(CValue* newval) { m_strString = newval->GetText(); SetModified(true); };
virtual CValue* GetReplica();
+#ifndef DISABLE_PYTHON
virtual PyObject* ConvertValueToPython() {
return PyUnicode_FromString(m_strString.Ptr());
}
+#endif // DISABLE_PYTHON
private:
// data member
diff --git a/source/gameengine/Expressions/Value.cpp b/source/gameengine/Expressions/Value.cpp
index 130317d77e2..6d2dfe2a6e3 100644
--- a/source/gameengine/Expressions/Value.cpp
+++ b/source/gameengine/Expressions/Value.cpp
@@ -33,7 +33,7 @@
double CValue::m_sZeroVec[3] = {0.0,0.0,0.0};
-#ifndef NO_EXP_PYTHON_EMBEDDING
+#ifndef DISABLE_PYTHON
PyTypeObject CValue::Type = {
PyVarObject_HEAD_INIT(NULL, 0)
@@ -64,6 +64,8 @@ PyTypeObject CValue::Type = {
PyMethodDef CValue::Methods[] = {
{NULL,NULL} //Sentinel
};
+#endif // DISABLE_PYTHON
+
/*#define CVALUE_DEBUG*/
#ifdef CVALUE_DEBUG
@@ -90,10 +92,6 @@ std::vector<SmartCValueRef> gRefList;
CValue::CValue()
: PyObjectPlus(),
-#else
-CValue::CValue()
-:
-#endif //NO_EXP_PYTHON_EMBEDDING
m_pNamedPropertyArray(NULL),
m_refcount(1)
@@ -526,8 +524,7 @@ CValue* CValue::FindIdentifier(const STR_String& identifiername)
return result;
}
-
-#ifndef NO_EXP_PYTHON_EMBEDDING
+#ifndef DISABLE_PYTHON
PyAttributeDef CValue::Attributes[] = {
KX_PYATTRIBUTE_RO_FUNCTION("name", CValue, pyattr_get_name),
@@ -618,7 +615,8 @@ PyObject* CValue::ConvertKeysToPython( void )
return pylist;
}
-#endif //NO_EXP_PYTHON_EMBEDDING
+#endif // DISABLE_PYTHON
+
///////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/gameengine/Expressions/Value.h b/source/gameengine/Expressions/Value.h
index 7d4adcdb64f..f639ae5af78 100644
--- a/source/gameengine/Expressions/Value.h
+++ b/source/gameengine/Expressions/Value.h
@@ -197,19 +197,14 @@ public:
-#ifndef NO_EXP_PYTHON_EMBEDDING
#include "PyObjectPlus.h"
+#ifndef DISABLE_PYTHON
#include "object.h"
+#endif
class CValue : public PyObjectPlus
-#else
-class CValue
-#endif //NO_EXP_PYTHON_EMBEDDING
-
{
-#ifndef NO_EXP_PYTHON_EMBEDDING
Py_Header;
-#endif //NO_EXP_PYTHON_EMBEDDING
public:
enum AllocationTYPE {
STACKVALUE = 0,
@@ -224,9 +219,9 @@ public:
// Construction / Destruction
-#ifndef NO_EXP_PYTHON_EMBEDDING
-
CValue();
+
+#ifndef DISABLE_PYTHON
//static PyObject* PyMake(PyObject*,PyObject*);
virtual PyObject *py_repr(void)
{
@@ -242,10 +237,7 @@ public:
static PyObject * pyattr_get_name(void * self, const KX_PYATTRIBUTE_DEF * attrdef);
virtual PyObject* ConvertKeysToPython( void );
-
-#else
- CValue();
-#endif //NO_EXP_PYTHON_EMBEDDING
+#endif // DISABLE_PYTHON
@@ -416,12 +408,8 @@ public: \
class CPropValue : public CValue
{
public:
-#ifndef NO_EXP_PYTHON_EMBEDDING
CPropValue() :
CValue(),
-#else
- CPropValue() :
-#endif //NO_EXP_PYTHON_EMBEDDING
m_strNewName()
{
diff --git a/source/gameengine/GameLogic/CMakeLists.txt b/source/gameengine/GameLogic/CMakeLists.txt
index 601585f79d6..819af4b56f8 100644
--- a/source/gameengine/GameLogic/CMakeLists.txt
+++ b/source/gameengine/GameLogic/CMakeLists.txt
@@ -34,7 +34,6 @@ SET(INC
../../../source/gameengine/SceneGraph
../../../intern/moto/include
../../../source/gameengine/Rasterizer
- ${PYTHON_INC}
)
IF(WITH_SDL)
@@ -43,5 +42,11 @@ ELSE(WITH_SDL)
ADD_DEFINITIONS(-DDISABLE_SDL)
ENDIF(WITH_SDL)
+IF(WITH_PYTHON)
+ SET(INC ${INC} ${PYTHON_INC})
+ELSE(WITH_PYTHON)
+ ADD_DEFINITIONS(-DDISABLE_PYTHON)
+ENDIF(WITH_PYTHON)
+
BLENDERLIB(bf_logic "${SRC}" "${INC}")
#env.BlenderLib ( 'bf_logic', sources, Split(incs), [], libtype=['game','player'], priority=[30, 110] )
diff --git a/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp b/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp
index 9b04e263350..bd1e5fa7105 100644
--- a/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp
+++ b/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp
@@ -99,12 +99,12 @@ void SCA_2DFilterActuator::SetShaderText(const char *text)
m_shaderText = text;
}
+#ifndef DISABLE_PYTHON
+
/* ------------------------------------------------------------------------- */
/* Python functions */
/* ------------------------------------------------------------------------- */
-
-
/* Integration hooks ------------------------------------------------------- */
PyTypeObject SCA_2DFilterActuator::Type = {
PyVarObject_HEAD_INIT(NULL, 0)
@@ -141,3 +141,5 @@ PyAttributeDef SCA_2DFilterActuator::Attributes[] = {
KX_PYATTRIBUTE_FLOAT_RW("value", 0.0, 100.0, SCA_2DFilterActuator, m_float_arg),
{ NULL } //Sentinel
};
+
+#endif
diff --git a/source/gameengine/GameLogic/SCA_ANDController.cpp b/source/gameengine/GameLogic/SCA_ANDController.cpp
index ac9e238bd64..21380caf6a0 100644
--- a/source/gameengine/GameLogic/SCA_ANDController.cpp
+++ b/source/gameengine/GameLogic/SCA_ANDController.cpp
@@ -91,7 +91,7 @@ CValue* SCA_ANDController::GetReplica()
return replica;
}
-
+#ifndef DISABLE_PYTHON
/* ------------------------------------------------------------------------- */
/* Python functions */
@@ -127,5 +127,5 @@ PyMethodDef SCA_ANDController::Methods[] = {
PyAttributeDef SCA_ANDController::Attributes[] = {
{ NULL } //Sentinel
};
-
+#endif // DISABLE_PYTHON
/* eof */
diff --git a/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp b/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp
index 428362a0a24..c5ba95e2c2c 100644
--- a/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp
+++ b/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp
@@ -114,6 +114,7 @@ void SCA_ActuatorSensor::Update()
}
}
+#ifndef DISABLE_PYTHON
/* ------------------------------------------------------------------------- */
/* Python functions */
@@ -163,4 +164,6 @@ int SCA_ActuatorSensor::CheckActuator(void *self, const PyAttributeDef*)
return 1;
}
+#endif // DISABLE_PYTHON
+
/* eof */
diff --git a/source/gameengine/GameLogic/SCA_ActuatorSensor.h b/source/gameengine/GameLogic/SCA_ActuatorSensor.h
index 1a095148500..299684fc955 100644
--- a/source/gameengine/GameLogic/SCA_ActuatorSensor.h
+++ b/source/gameengine/GameLogic/SCA_ActuatorSensor.h
@@ -56,11 +56,15 @@ public:
virtual void ReParent(SCA_IObject* parent);
void Update();
+#ifndef DISABLE_PYTHON
+
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
-
+
static int CheckActuator(void *self, const PyAttributeDef*);
+
+#endif // DISABLE_PYTHON
};
#endif
diff --git a/source/gameengine/GameLogic/SCA_AlwaysSensor.cpp b/source/gameengine/GameLogic/SCA_AlwaysSensor.cpp
index 35b035f6466..898d0f4bb34 100644
--- a/source/gameengine/GameLogic/SCA_AlwaysSensor.cpp
+++ b/source/gameengine/GameLogic/SCA_AlwaysSensor.cpp
@@ -98,6 +98,8 @@ bool SCA_AlwaysSensor::Evaluate()
return result;
}
+#ifndef DISABLE_PYTHON
+
/* ------------------------------------------------------------------------- */
/* Python functions */
/* ------------------------------------------------------------------------- */
@@ -133,4 +135,6 @@ PyAttributeDef SCA_AlwaysSensor::Attributes[] = {
{ NULL } //Sentinel
};
+#endif
+
/* eof */
diff --git a/source/gameengine/GameLogic/SCA_DelaySensor.cpp b/source/gameengine/GameLogic/SCA_DelaySensor.cpp
index 0f67ddd56a5..2c2b588abd3 100644
--- a/source/gameengine/GameLogic/SCA_DelaySensor.cpp
+++ b/source/gameengine/GameLogic/SCA_DelaySensor.cpp
@@ -124,6 +124,8 @@ bool SCA_DelaySensor::Evaluate()
return trigger;
}
+#ifndef DISABLE_PYTHON
+
/* ------------------------------------------------------------------------- */
/* Python functions */
/* ------------------------------------------------------------------------- */
@@ -162,4 +164,6 @@ PyAttributeDef SCA_DelaySensor::Attributes[] = {
{ NULL } //Sentinel
};
+#endif // DISABLE_PYTHON
+
/* eof */
diff --git a/source/gameengine/GameLogic/SCA_ExpressionController.cpp b/source/gameengine/GameLogic/SCA_ExpressionController.cpp
index 60969300474..91135079fe6 100644
--- a/source/gameengine/GameLogic/SCA_ExpressionController.cpp
+++ b/source/gameengine/GameLogic/SCA_ExpressionController.cpp
@@ -36,6 +36,8 @@
#include "InputParser.h"
#include "MT_Transform.h" // for fuzzyZero
+#include <stdio.h>
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
diff --git a/source/gameengine/GameLogic/SCA_IActuator.cpp b/source/gameengine/GameLogic/SCA_IActuator.cpp
index 0338213b3cf..13deed12dd1 100644
--- a/source/gameengine/GameLogic/SCA_IActuator.cpp
+++ b/source/gameengine/GameLogic/SCA_IActuator.cpp
@@ -27,6 +27,7 @@
*/
#include "SCA_IActuator.h"
+#include <stdio.h>
#ifdef HAVE_CONFIG_H
#include <config.h>
diff --git a/source/gameengine/GameLogic/SCA_IController.cpp b/source/gameengine/GameLogic/SCA_IController.cpp
index 7cfd2adc1d0..65c9c4d0f57 100644
--- a/source/gameengine/GameLogic/SCA_IController.cpp
+++ b/source/gameengine/GameLogic/SCA_IController.cpp
@@ -33,6 +33,8 @@
#include "PyObjectPlus.h"
#include "../Ketsji/KX_PythonSeq.h" /* not nice, only need for KX_PythonSeq_CreatePyObject */
+#include <stdio.h>
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -196,6 +198,8 @@ void SCA_IController::ApplyState(unsigned int state)
}
}
+#ifndef DISABLE_PYTHON
+
/* Python api */
PyTypeObject SCA_IController::Type = {
@@ -247,3 +251,4 @@ PyObject* SCA_IController::pyattr_get_actuators(void *self_v, const KX_PYATTRIBU
{
return KX_PythonSeq_CreatePyObject((static_cast<SCA_IController*>(self_v))->m_proxy, KX_PYGENSEQ_CONT_TYPE_ACTUATORS);
}
+#endif // DISABLE_PYTHON
diff --git a/source/gameengine/GameLogic/SCA_IController.h b/source/gameengine/GameLogic/SCA_IController.h
index 202921c6986..48514121661 100644
--- a/source/gameengine/GameLogic/SCA_IController.h
+++ b/source/gameengine/GameLogic/SCA_IController.h
@@ -98,10 +98,12 @@ public:
}
}
+
+#ifndef DISABLE_PYTHON
static PyObject* pyattr_get_state(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
static PyObject* pyattr_get_sensors(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
static PyObject* pyattr_get_actuators(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
-
+#endif // DISABLE_PYTHON
};
#endif
diff --git a/source/gameengine/GameLogic/SCA_ILogicBrick.cpp b/source/gameengine/GameLogic/SCA_ILogicBrick.cpp
index f679d0ee487..6502fc6de41 100644
--- a/source/gameengine/GameLogic/SCA_ILogicBrick.cpp
+++ b/source/gameengine/GameLogic/SCA_ILogicBrick.cpp
@@ -173,6 +173,7 @@ CValue* SCA_ILogicBrick::GetEvent()
+#ifndef DISABLE_PYTHON
/* python stuff */
@@ -255,3 +256,5 @@ PyObject* SCA_ILogicBrick::BoolToPyArg(bool boolarg)
{
return PyLong_FromSsize_t(boolarg? KX_TRUE: KX_FALSE);
}
+
+#endif // DISABLE_PYTHON
diff --git a/source/gameengine/GameLogic/SCA_ILogicBrick.h b/source/gameengine/GameLogic/SCA_ILogicBrick.h
index ac533335f0b..11885f988f3 100644
--- a/source/gameengine/GameLogic/SCA_ILogicBrick.h
+++ b/source/gameengine/GameLogic/SCA_ILogicBrick.h
@@ -125,6 +125,7 @@ public:
static class SCA_LogicManager* m_sCurrentLogicManager;
+#ifndef DISABLE_PYTHON
// python methods
static PyObject* pyattr_get_owner(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
@@ -147,8 +148,9 @@ protected:
/** Convert a a c++ value to KX_TRUE, KX_FALSE in Python. */
PyObject* BoolToPyArg(bool);
-
+#endif // DISABLE_PYTHON
+
};
#endif
diff --git a/source/gameengine/GameLogic/SCA_IObject.cpp b/source/gameengine/GameLogic/SCA_IObject.cpp
index fbf66b64d08..e63b616cab0 100644
--- a/source/gameengine/GameLogic/SCA_IObject.cpp
+++ b/source/gameengine/GameLogic/SCA_IObject.cpp
@@ -307,7 +307,7 @@ void SCA_IObject::SetState(unsigned int state)
}
}
-
+#ifndef DISABLE_PYTHON
/* ------------------------------------------------------------------------- */
/* Python functions */
@@ -345,3 +345,5 @@ PyMethodDef SCA_IObject::Methods[] = {
PyAttributeDef SCA_IObject::Attributes[] = {
{ NULL } //Sentinel
};
+
+#endif // DISABLE_PYTHON
diff --git a/source/gameengine/GameLogic/SCA_IObject.h b/source/gameengine/GameLogic/SCA_IObject.h
index 64ea0a76af1..f078e129378 100644
--- a/source/gameengine/GameLogic/SCA_IObject.h
+++ b/source/gameengine/GameLogic/SCA_IObject.h
@@ -41,7 +41,9 @@ class SCA_ISensor;
class SCA_IController;
class SCA_IActuator;
+#ifndef DISABLE_PYTHON
template<class T> T PyVecTo(PyObject*);
+#endif
typedef std::vector<SCA_ISensor *> SCA_SensorList;
typedef std::vector<SCA_IController *> SCA_ControllerList;
@@ -217,6 +219,7 @@ public:
typedef enum ObjectTypes {
OBJ_ARMATURE=0,
OBJ_CAMERA=1,
+ OBJ_LIGHT=2,
}ObjectTypes;
};
diff --git a/source/gameengine/GameLogic/SCA_ISensor.cpp b/source/gameengine/GameLogic/SCA_ISensor.cpp
index 497a5d1095a..877563e3161 100644
--- a/source/gameengine/GameLogic/SCA_ISensor.cpp
+++ b/source/gameengine/GameLogic/SCA_ISensor.cpp
@@ -35,6 +35,8 @@
// needed for IsTriggered()
#include "SCA_PythonController.h"
+#include <stdio.h>
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -288,6 +290,9 @@ void SCA_ISensor::Activate(class SCA_LogicManager* logicmgr)
}
}
}
+
+#ifndef DISABLE_PYTHON
+
/* ----------------------------------------------- */
/* Python Functions */
/* ----------------------------------------------- */
@@ -379,5 +384,6 @@ int SCA_ISensor::pyattr_check_tap(void *self_v, const KX_PYATTRIBUTE_DEF *attrde
self->m_level = false;
return 0;
}
+#endif // DISABLE_PYTHON
/* eof */
diff --git a/source/gameengine/GameLogic/SCA_ISensor.h b/source/gameengine/GameLogic/SCA_ISensor.h
index 742b05bd88b..fce5f340be1 100644
--- a/source/gameengine/GameLogic/SCA_ISensor.h
+++ b/source/gameengine/GameLogic/SCA_ISensor.h
@@ -171,6 +171,7 @@ public:
bool IsNoLink() const
{ return !m_links; }
+#ifndef DISABLE_PYTHON
/* Python functions: */
KX_PYMETHOD_DOC_NOARGS(SCA_ISensor,reset);
@@ -178,6 +179,7 @@ public:
static PyObject* pyattr_get_positive(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
static int pyattr_check_level(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
static int pyattr_check_tap(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
+#endif // DISABLE_PYTHON
};
#endif //__SCA_ISENSOR
diff --git a/source/gameengine/GameLogic/SCA_JoystickSensor.cpp b/source/gameengine/GameLogic/SCA_JoystickSensor.cpp
index 4936b380352..9ac64b7f31e 100644
--- a/source/gameengine/GameLogic/SCA_JoystickSensor.cpp
+++ b/source/gameengine/GameLogic/SCA_JoystickSensor.cpp
@@ -32,6 +32,7 @@
#include "PyObjectPlus.h"
+#include <stdio.h>
#include <iostream>
@@ -244,6 +245,7 @@ bool SCA_JoystickSensor::isValid(SCA_JoystickSensor::KX_JOYSENSORMODE m)
return res;
}
+#ifndef DISABLE_PYTHON
/* ------------------------------------------------------------------------- */
/* Python functions */
@@ -413,3 +415,5 @@ PyObject* SCA_JoystickSensor::pyattr_get_connected(void *self_v, const KX_PYATTR
SCA_Joystick *joy = ((SCA_JoystickManager *)self->m_eventmgr)->GetJoystickDevice(self->m_joyindex);
return PyBool_FromLong( joy ? joy->Connected() : 0 );
}
+
+#endif
diff --git a/source/gameengine/GameLogic/SCA_JoystickSensor.h b/source/gameengine/GameLogic/SCA_JoystickSensor.h
index b793c591ac1..49ca58ee14f 100644
--- a/source/gameengine/GameLogic/SCA_JoystickSensor.h
+++ b/source/gameengine/GameLogic/SCA_JoystickSensor.h
@@ -117,6 +117,8 @@ public:
return m_joyindex;
}
+#ifndef DISABLE_PYTHON
+
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
@@ -155,6 +157,8 @@ public:
return 0;
}
+#endif // DISABLE_PYTHON
+
};
#endif
diff --git a/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp b/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
index d2e3871fec2..dcad65e6459 100644
--- a/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
+++ b/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
@@ -403,6 +403,7 @@ void SCA_KeyboardSensor::LogKeystrokes(void)
}
}
+#ifndef DISABLE_PYTHON
/* ------------------------------------------------------------------------- */
/* Python Functions */
@@ -495,6 +496,7 @@ PyObject* SCA_KeyboardSensor::pyattr_get_events(void *self_v, const KX_PYATTRIBU
return resultlist;
}
+#endif // DISABLE_PYTHON
/* Accessed from python */
diff --git a/source/gameengine/GameLogic/SCA_KeyboardSensor.h b/source/gameengine/GameLogic/SCA_KeyboardSensor.h
index d7e0f301a9d..0ce08b3e408 100644
--- a/source/gameengine/GameLogic/SCA_KeyboardSensor.h
+++ b/source/gameengine/GameLogic/SCA_KeyboardSensor.h
@@ -103,6 +103,7 @@ public:
virtual bool IsPositiveTrigger();
bool TriggerOnAllKeys();
+#ifndef DISABLE_PYTHON
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
@@ -113,6 +114,7 @@ public:
KX_PYMETHOD_DOC_O(SCA_KeyboardSensor,getKeyStatus);
static PyObject* pyattr_get_events(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
+#endif
};
diff --git a/source/gameengine/GameLogic/SCA_LogicManager.cpp b/source/gameengine/GameLogic/SCA_LogicManager.cpp
index b782c6dfb93..d93f2e70e36 100644
--- a/source/gameengine/GameLogic/SCA_LogicManager.cpp
+++ b/source/gameengine/GameLogic/SCA_LogicManager.cpp
@@ -305,6 +305,9 @@ void SCA_LogicManager::EndFrame()
void SCA_LogicManager::AddTriggeredController(SCA_IController* controller, SCA_ISensor* sensor)
{
controller->Activate(m_triggeredControllerSet);
+
+#ifndef DISABLE_PYTHON
+
// so that the controller knows which sensor has activited it
// only needed for python controller
// Note that this is safe even if the controller is subclassed.
@@ -313,6 +316,7 @@ void SCA_LogicManager::AddTriggeredController(SCA_IController* controller, SCA_I
SCA_PythonController* pythonController = (SCA_PythonController*)controller;
pythonController->AddTriggeredSensor(sensor);
}
+#endif
}
SCA_EventManager* SCA_LogicManager::FindEventManager(int eventmgrtype)
diff --git a/source/gameengine/GameLogic/SCA_MouseSensor.cpp b/source/gameengine/GameLogic/SCA_MouseSensor.cpp
index 9d32682eaa9..466b8f7e741 100644
--- a/source/gameengine/GameLogic/SCA_MouseSensor.cpp
+++ b/source/gameengine/GameLogic/SCA_MouseSensor.cpp
@@ -57,7 +57,7 @@ SCA_MouseSensor::SCA_MouseSensor(SCA_MouseManager* eventmgr,
m_mousemode = mousemode;
m_triggermode = true;
- UpdateHotkey(this, NULL);
+ UpdateHotkey(this);
Init();
}
@@ -72,7 +72,7 @@ SCA_MouseSensor::~SCA_MouseSensor()
/* Nothing to be done here. */
}
-int SCA_MouseSensor::UpdateHotkey(void *self, const PyAttributeDef*)
+void SCA_MouseSensor::UpdateHotkey(void *self)
{
// gosh, this function is so damn stupid
// its here because of a design mistake in the mouse sensor, it should only
@@ -100,9 +100,6 @@ int SCA_MouseSensor::UpdateHotkey(void *self, const PyAttributeDef*)
default:
; /* ignore, no hotkey */
}
- // return value is used in py_setattro(),
- // 0=attribute checked ok (see Attributes array definition)
- return 0;
}
CValue* SCA_MouseSensor::GetReplica()
@@ -239,6 +236,8 @@ bool SCA_MouseSensor::isValid(SCA_MouseSensor::KX_MOUSESENSORMODE m)
return ((m > KX_MOUSESENSORMODE_NODEF) && (m < KX_MOUSESENSORMODE_MAX));
}
+#ifndef DISABLE_PYTHON
+
/* ------------------------------------------------------------------------- */
/* Python functions */
/* ------------------------------------------------------------------------- */
@@ -296,10 +295,20 @@ PyMethodDef SCA_MouseSensor::Methods[] = {
{NULL,NULL} //Sentinel
};
+int SCA_MouseSensor::UpdateHotkeyPy(void *self, const PyAttributeDef*)
+{
+ UpdateHotkey(self);
+ // return value is used in py_setattro(),
+ // 0=attribute checked ok (see Attributes array definition)
+ return 0;
+}
+
PyAttributeDef SCA_MouseSensor::Attributes[] = {
- KX_PYATTRIBUTE_SHORT_RW_CHECK("mode",KX_MOUSESENSORMODE_NODEF,KX_MOUSESENSORMODE_MAX-1,true,SCA_MouseSensor,m_mousemode,UpdateHotkey),
+ KX_PYATTRIBUTE_SHORT_RW_CHECK("mode",KX_MOUSESENSORMODE_NODEF,KX_MOUSESENSORMODE_MAX-1,true,SCA_MouseSensor,m_mousemode,UpdateHotkeyPy),
KX_PYATTRIBUTE_SHORT_LIST_RO("position",SCA_MouseSensor,m_x,2),
{ NULL } //Sentinel
};
+#endif // DISABLE_PYTHON
+
/* eof */
diff --git a/source/gameengine/GameLogic/SCA_MouseSensor.h b/source/gameengine/GameLogic/SCA_MouseSensor.h
index a679e605428..25b3a6c2e6e 100644
--- a/source/gameengine/GameLogic/SCA_MouseSensor.h
+++ b/source/gameengine/GameLogic/SCA_MouseSensor.h
@@ -86,8 +86,6 @@ class SCA_MouseSensor : public SCA_ISensor
bool isValid(KX_MOUSESENSORMODE);
- static int UpdateHotkey(void *self, const PyAttributeDef*);
-
SCA_MouseSensor(class SCA_MouseManager* keybdmgr,
int startx,int starty,
short int mousemode,
@@ -102,14 +100,20 @@ class SCA_MouseSensor : public SCA_ISensor
SCA_IInputDevice::KX_EnumInputs GetHotKey();
void setX(short x);
void setY(short y);
-
+
+ static void UpdateHotkey(void *self);
+
+
+#ifndef DISABLE_PYTHON
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
+ static int UpdateHotkeyPy(void *self, const PyAttributeDef *);
+
// get button status
KX_PYMETHOD_DOC_O(SCA_MouseSensor,getButtonStatus);
-
+#endif
};
#endif //__KX_MOUSESENSOR
diff --git a/source/gameengine/GameLogic/SCA_NANDController.cpp b/source/gameengine/GameLogic/SCA_NANDController.cpp
index c971c06fadd..99c74e6d737 100644
--- a/source/gameengine/GameLogic/SCA_NANDController.cpp
+++ b/source/gameengine/GameLogic/SCA_NANDController.cpp
@@ -91,7 +91,7 @@ CValue* SCA_NANDController::GetReplica()
return replica;
}
-
+#ifndef DISABLE_PYTHON
/* ------------------------------------------------------------------------- */
/* Python functions */
@@ -128,4 +128,6 @@ PyAttributeDef SCA_NANDController::Attributes[] = {
{ NULL } //Sentinel
};
+#endif
+
/* eof */
diff --git a/source/gameengine/GameLogic/SCA_NORController.cpp b/source/gameengine/GameLogic/SCA_NORController.cpp
index 7a8b09e4bec..a84453de977 100644
--- a/source/gameengine/GameLogic/SCA_NORController.cpp
+++ b/source/gameengine/GameLogic/SCA_NORController.cpp
@@ -91,7 +91,7 @@ CValue* SCA_NORController::GetReplica()
return replica;
}
-
+#ifndef DISABLE_PYTHON
/* ------------------------------------------------------------------------- */
/* Python functions */
@@ -128,4 +128,6 @@ PyAttributeDef SCA_NORController::Attributes[] = {
{ NULL } //Sentinel
};
+#endif // DISABLE_PYTHON
+
/* eof */
diff --git a/source/gameengine/GameLogic/SCA_ORController.cpp b/source/gameengine/GameLogic/SCA_ORController.cpp
index 12e2f610986..0f750eedf77 100644
--- a/source/gameengine/GameLogic/SCA_ORController.cpp
+++ b/source/gameengine/GameLogic/SCA_ORController.cpp
@@ -87,6 +87,8 @@ void SCA_ORController::Trigger(SCA_LogicManager* logicmgr)
}
}
+#ifndef DISABLE_PYTHON
+
/* ------------------------------------------------------------------------- */
/* Python functions */
/* ------------------------------------------------------------------------- */
@@ -122,4 +124,6 @@ PyAttributeDef SCA_ORController::Attributes[] = {
{ NULL } //Sentinel
};
+#endif // DISABLE_PYTHON
+
/* eof */
diff --git a/source/gameengine/GameLogic/SCA_PropertyActuator.cpp b/source/gameengine/GameLogic/SCA_PropertyActuator.cpp
index 2a3e600a653..2b480a8e8cb 100644
--- a/source/gameengine/GameLogic/SCA_PropertyActuator.cpp
+++ b/source/gameengine/GameLogic/SCA_PropertyActuator.cpp
@@ -221,6 +221,7 @@ void SCA_PropertyActuator::Relink(GEN_Map<GEN_HashedPtr, void*> *obj_map)
}
}
+#ifndef DISABLE_PYTHON
/* ------------------------------------------------------------------------- */
/* Python functions */
@@ -260,4 +261,6 @@ PyAttributeDef SCA_PropertyActuator::Attributes[] = {
{ NULL } //Sentinel
};
+#endif
+
/* eof */
diff --git a/source/gameengine/GameLogic/SCA_PropertySensor.cpp b/source/gameengine/GameLogic/SCA_PropertySensor.cpp
index 9c09c8410fb..2a4222af355 100644
--- a/source/gameengine/GameLogic/SCA_PropertySensor.cpp
+++ b/source/gameengine/GameLogic/SCA_PropertySensor.cpp
@@ -38,6 +38,7 @@
#include "SCA_EventManager.h"
#include "SCA_LogicManager.h"
#include "BoolValue.h"
+#include "FloatValue.h"
#ifdef HAVE_CONFIG_H
#include <config.h>
@@ -190,6 +191,22 @@ bool SCA_PropertySensor::CheckPropertyCondition()
m_checkpropval.Upper();
}
result = (testprop == m_checkpropval);
+
+ /* Patch: floating point values cant use strings usefully since you can have "0.0" == "0.0000"
+ * this could be made into a generic Value class function for comparing values with a string.
+ */
+ if(result==false && dynamic_cast<CFloatValue *>(orgprop) != NULL) {
+ float f;
+
+ if(EOF == sscanf(m_checkpropval.ReadPtr(), "%f", &f))
+ {
+ //error
+ }
+ else {
+ result = (f == ((CFloatValue *)orgprop)->GetFloat());
+ }
+ }
+ /* end patch */
}
orgprop->Release();
@@ -290,16 +307,18 @@ CValue* SCA_PropertySensor::FindIdentifier(const STR_String& identifiername)
return GetParent()->FindIdentifier(identifiername);
}
+#ifndef DISABLE_PYTHON
+
+/* ------------------------------------------------------------------------- */
+/* Python functions */
+/* ------------------------------------------------------------------------- */
+
int SCA_PropertySensor::validValueForProperty(void *self, const PyAttributeDef*)
{
/* There is no type checking at this moment, unfortunately... */
return 0;
}
-/* ------------------------------------------------------------------------- */
-/* Python functions */
-/* ------------------------------------------------------------------------- */
-
/* Integration hooks ------------------------------------------------------- */
PyTypeObject SCA_PropertySensor::Type = {
PyVarObject_HEAD_INIT(NULL, 0)
@@ -334,4 +353,6 @@ PyAttributeDef SCA_PropertySensor::Attributes[] = {
{ NULL } //Sentinel
};
+#endif // DISABLE_PYTHON
+
/* eof */
diff --git a/source/gameengine/GameLogic/SCA_PropertySensor.h b/source/gameengine/GameLogic/SCA_PropertySensor.h
index a5bbfc8438b..cd8a6713148 100644
--- a/source/gameengine/GameLogic/SCA_PropertySensor.h
+++ b/source/gameengine/GameLogic/SCA_PropertySensor.h
@@ -84,6 +84,8 @@ public:
virtual bool IsPositiveTrigger();
virtual CValue* FindIdentifier(const STR_String& identifiername);
+#ifndef DISABLE_PYTHON
+
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
@@ -92,6 +94,8 @@ public:
* Test whether this is a sensible value (type check)
*/
static int validValueForProperty(void* self, const PyAttributeDef*);
+
+#endif
};
#endif
diff --git a/source/gameengine/GameLogic/SCA_PythonController.cpp b/source/gameengine/GameLogic/SCA_PythonController.cpp
index ecaa8c508db..ac3e0434d20 100644
--- a/source/gameengine/GameLogic/SCA_PythonController.cpp
+++ b/source/gameengine/GameLogic/SCA_PythonController.cpp
@@ -34,8 +34,12 @@
#include "SCA_ISensor.h"
#include "SCA_IActuator.h"
#include "PyObjectPlus.h"
+
+#ifndef DISABLE_PYTHON
#include "compile.h"
#include "eval.h"
+#endif // DISABLE_PYTHON
+
#include <algorithm>
@@ -49,13 +53,18 @@ SCA_PythonController* SCA_PythonController::m_sCurrentController = NULL;
SCA_PythonController::SCA_PythonController(SCA_IObject* gameobj, int mode)
: SCA_IController(gameobj),
+#ifndef DISABLE_PYTHON
m_bytecode(NULL),
m_function(NULL),
+#endif
m_function_argc(0),
m_bModified(true),
m_debug(false),
- m_mode(mode),
- m_pythondictionary(NULL)
+ m_mode(mode)
+#ifndef DISABLE_PYTHON
+ , m_pythondictionary(NULL)
+#endif
+
{
}
@@ -78,6 +87,8 @@ int SCA_PythonController::Release()
SCA_PythonController::~SCA_PythonController()
{
+
+#ifndef DISABLE_PYTHON
//printf("released python byte script\n");
Py_XDECREF(m_bytecode);
@@ -88,6 +99,7 @@ SCA_PythonController::~SCA_PythonController()
PyDict_Clear(m_pythondictionary);
Py_DECREF(m_pythondictionary);
}
+#endif
}
@@ -95,7 +107,8 @@ SCA_PythonController::~SCA_PythonController()
CValue* SCA_PythonController::GetReplica()
{
SCA_PythonController* replica = new SCA_PythonController(*this);
-
+
+#ifndef DISABLE_PYTHON
/* why is this needed at all??? - m_bytecode is NULL'd below so this doesnt make sense
* but removing it crashes blender (with YoFrankie). so leave in for now - Campbell */
Py_XINCREF(replica->m_bytecode);
@@ -113,6 +126,7 @@ CValue* SCA_PythonController::GetReplica()
if (m_pythondictionary)
Py_INCREF(replica->m_pythondictionary);
*/
+#endif
// this will copy properties and so on...
replica->ProcessReplica();
@@ -136,8 +150,8 @@ void SCA_PythonController::SetScriptName(const STR_String& name)
}
-
-void SCA_PythonController::SetDictionary(PyObject* pythondictionary)
+#ifndef DISABLE_PYTHON
+void SCA_PythonController::SetNamespace(PyObject* pythondictionary)
{
if (m_pythondictionary)
{
@@ -151,6 +165,7 @@ void SCA_PythonController::SetDictionary(PyObject* pythondictionary)
PyDict_SetItemString(m_pythondictionary, "__file__", PyUnicode_FromString(m_scriptName.Ptr()));
}
+#endif
int SCA_PythonController::IsTriggered(class SCA_ISensor* sensor)
{
@@ -160,6 +175,8 @@ int SCA_PythonController::IsTriggered(class SCA_ISensor* sensor)
return 0;
}
+#ifndef DISABLE_PYTHON
+
/* warning, self is not the SCA_PythonController, its a PyObjectPlus_Proxy */
PyObject* SCA_PythonController::sPyGetCurrentController(PyObject *self)
{
@@ -360,6 +377,7 @@ bool SCA_PythonController::Import()
return true;
}
+
void SCA_PythonController::Trigger(SCA_LogicManager* logicmgr)
{
m_sCurrentController = this;
@@ -514,5 +532,13 @@ int SCA_PythonController::pyattr_set_script(void *self_v, const KX_PYATTRIBUTE_D
return PY_SET_ATTR_SUCCESS;
}
+#else // DISABLE_PYTHON
+
+void SCA_PythonController::Trigger(SCA_LogicManager* logicmgr)
+{
+ /* intentionally blank */
+}
+
+#endif // DISABLE_PYTHON
/* eof */
diff --git a/source/gameengine/GameLogic/SCA_PythonController.h b/source/gameengine/GameLogic/SCA_PythonController.h
index 9311b3f355e..eeac710c6ea 100644
--- a/source/gameengine/GameLogic/SCA_PythonController.h
+++ b/source/gameengine/GameLogic/SCA_PythonController.h
@@ -42,8 +42,10 @@ class SCA_IObject;
class SCA_PythonController : public SCA_IController
{
Py_Header;
+#ifndef DISABLE_PYTHON
struct _object * m_bytecode; /* SCA_PYEXEC_SCRIPT only */
PyObject* m_function; /* SCA_PYEXEC_MODULE only */
+#endif
int m_function_argc;
bool m_bModified;
bool m_debug; /* use with SCA_PYEXEC_MODULE for reloading every logic run */
@@ -53,9 +55,10 @@ class SCA_PythonController : public SCA_IController
protected:
STR_String m_scriptText;
STR_String m_scriptName;
+#ifndef DISABLE_PYTHON
PyObject* m_pythondictionary; /* for SCA_PYEXEC_SCRIPT only */
PyObject* m_pythonfunction; /* for SCA_PYEXEC_MODULE only */
-
+#endif
std::vector<class SCA_ISensor*> m_triggeredSensors;
public:
@@ -80,7 +83,9 @@ class SCA_PythonController : public SCA_IController
void SetScriptText(const STR_String& text);
void SetScriptName(const STR_String& name);
- void SetDictionary(PyObject* pythondictionary);
+#ifndef DISABLE_PYTHON
+ void SetNamespace(PyObject* pythondictionary);
+#endif
void SetDebug(bool debug) { m_debug = debug; }
void AddTriggeredSensor(class SCA_ISensor* sensor)
{ m_triggeredSensors.push_back(sensor); }
@@ -89,7 +94,7 @@ class SCA_PythonController : public SCA_IController
bool Import();
void ErrorPrint(const char *error_msg);
-
+#ifndef DISABLE_PYTHON
static const char* sPyGetCurrentController__doc__;
static PyObject* sPyGetCurrentController(PyObject* self);
static const char* sPyAddActiveActuator__doc__;
@@ -106,8 +111,7 @@ class SCA_PythonController : public SCA_IController
static PyObject* pyattr_get_script(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
static int pyattr_set_script(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
-
-
+#endif
};
#endif //KX_PYTHONCONTROLLER_H
diff --git a/source/gameengine/GameLogic/SCA_RandomActuator.cpp b/source/gameengine/GameLogic/SCA_RandomActuator.cpp
index 8f9482b7826..fa85bdd768e 100644
--- a/source/gameengine/GameLogic/SCA_RandomActuator.cpp
+++ b/source/gameengine/GameLogic/SCA_RandomActuator.cpp
@@ -309,6 +309,8 @@ void SCA_RandomActuator::enforceConstraints() {
}
}
+#ifndef DISABLE_PYTHON
+
/* ------------------------------------------------------------------------- */
/* Python functions */
/* ------------------------------------------------------------------------- */
@@ -546,5 +548,7 @@ KX_PYMETHODDEF_DOC_VARARGS(SCA_RandomActuator, setFloatNegativeExponential,
enforceConstraints();
Py_RETURN_NONE;
}
-
+
+#endif
+
/* eof */
diff --git a/source/gameengine/GameLogic/SCA_RandomActuator.h b/source/gameengine/GameLogic/SCA_RandomActuator.h
index f84c44b43c9..2eb9b8d5d14 100644
--- a/source/gameengine/GameLogic/SCA_RandomActuator.h
+++ b/source/gameengine/GameLogic/SCA_RandomActuator.h
@@ -91,6 +91,8 @@ class SCA_RandomActuator : public SCA_IActuator
virtual CValue* GetReplica();
virtual void ProcessReplica();
+
+#ifndef DISABLE_PYTHON
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
@@ -109,6 +111,9 @@ class SCA_RandomActuator : public SCA_IActuator
KX_PYMETHOD_DOC_VARARGS(SCA_RandomActuator, setFloatUniform);
KX_PYMETHOD_DOC_VARARGS(SCA_RandomActuator, setFloatNormal);
KX_PYMETHOD_DOC_VARARGS(SCA_RandomActuator, setFloatNegativeExponential);
+
+#endif // DISABLE_PYTHON
+
}; /* end of class KX_EditObjectActuator : public SCA_PropertyActuator */
#endif
diff --git a/source/gameengine/GameLogic/SCA_RandomSensor.cpp b/source/gameengine/GameLogic/SCA_RandomSensor.cpp
index 890875e61c6..922e44b1c1d 100644
--- a/source/gameengine/GameLogic/SCA_RandomSensor.cpp
+++ b/source/gameengine/GameLogic/SCA_RandomSensor.cpp
@@ -124,6 +124,8 @@ bool SCA_RandomSensor::Evaluate()
return evaluateResult;
}
+#ifndef DISABLE_PYTHON
+
/* ------------------------------------------------------------------------- */
/* Python functions */
/* ------------------------------------------------------------------------- */
@@ -178,4 +180,6 @@ int SCA_RandomSensor::pyattr_set_seed(void *self_v, const KX_PYATTRIBUTE_DEF *at
return PY_SET_ATTR_SUCCESS;
}
+#endif // DISABLE_PYTHON
+
/* eof */
diff --git a/source/gameengine/GameLogic/SCA_RandomSensor.h b/source/gameengine/GameLogic/SCA_RandomSensor.h
index f93cf57370e..8126824c3dd 100644
--- a/source/gameengine/GameLogic/SCA_RandomSensor.h
+++ b/source/gameengine/GameLogic/SCA_RandomSensor.h
@@ -56,13 +56,15 @@ public:
virtual bool IsPositiveTrigger();
virtual void Init();
+#ifndef DISABLE_PYTHON
+
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
static PyObject* pyattr_get_seed(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
static int pyattr_set_seed(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
-
+#endif
};
#endif //__KX_RANDOMSENSOR
diff --git a/source/gameengine/GameLogic/SCA_XNORController.cpp b/source/gameengine/GameLogic/SCA_XNORController.cpp
index 17350feb98b..e726a49347c 100644
--- a/source/gameengine/GameLogic/SCA_XNORController.cpp
+++ b/source/gameengine/GameLogic/SCA_XNORController.cpp
@@ -95,7 +95,7 @@ CValue* SCA_XNORController::GetReplica()
return replica;
}
-
+#ifndef DISABLE_PYTHON
/* ------------------------------------------------------------------------- */
/* Python functions */
@@ -132,4 +132,6 @@ PyAttributeDef SCA_XNORController::Attributes[] = {
{ NULL } //Sentinel
};
+#endif // DISABLE_PYTHON
+
/* eof */
diff --git a/source/gameengine/GameLogic/SCA_XORController.cpp b/source/gameengine/GameLogic/SCA_XORController.cpp
index a6a7cc25897..71cc4374e95 100644
--- a/source/gameengine/GameLogic/SCA_XORController.cpp
+++ b/source/gameengine/GameLogic/SCA_XORController.cpp
@@ -95,7 +95,7 @@ CValue* SCA_XORController::GetReplica()
return replica;
}
-
+#ifndef DISABLE_PYTHON
/* ------------------------------------------------------------------------- */
/* Python functions */
@@ -131,5 +131,6 @@ PyMethodDef SCA_XORController::Methods[] = {
PyAttributeDef SCA_XORController::Attributes[] = {
{ NULL } //Sentinel
};
+#endif // DISABLE_PYTHON
/* eof */
diff --git a/source/gameengine/GameLogic/SConscript b/source/gameengine/GameLogic/SConscript
index 1530c71c7f3..3840754ed06 100644
--- a/source/gameengine/GameLogic/SConscript
+++ b/source/gameengine/GameLogic/SConscript
@@ -7,9 +7,6 @@ incs = '. #/source/kernel/gen_system #/intern/string'
incs += ' #/source/gameengine/Expressions #/intern/moto/include'
incs += ' #/source/gameengine/Rasterizer #/source/gameengine/SceneGraph'
-incs += ' ' + env['BF_PYTHON_INC']
-
-
defs = []
if env['WITH_BF_SDL']:
@@ -17,6 +14,11 @@ if env['WITH_BF_SDL']:
else:
defs.append('DISABLE_SDL')
+if env['WITH_BF_PYTHON']:
+ incs += ' ' + env['BF_PYTHON_INC']
+else:
+ defs.append('DISABLE_PYTHON')
+
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
if env['BF_DEBUG']:
defs.append('_DEBUG')
diff --git a/source/gameengine/GamePlayer/common/SConscript b/source/gameengine/GamePlayer/common/SConscript
index dd5a48c2b55..99eda4cb592 100644
--- a/source/gameengine/GamePlayer/common/SConscript
+++ b/source/gameengine/GamePlayer/common/SConscript
@@ -58,8 +58,14 @@ incs = ['.',
# 'unix/GPU_System.cpp']
# gp_common_env.Append ( CPPPATH = ['unix'])
-incs += Split(env['BF_PYTHON_INC'])
+defs = []
+
+if env['WITH_BF_PYTHON']:
+ incs += ' ' + env['BF_PYTHON_INC']
+else:
+ defs.append('DISABLE_PYTHON')
+
incs += Split(env['BF_PNG_INC'])
incs += Split(env['BF_ZLIB_INC'])
-env.BlenderLib (libname='gp_common', sources=source_files, includes=incs, defines = [], libtype=['player'], priority=[5], cxx_compileflags=env['BGE_CXXFLAGS'])
+env.BlenderLib (libname='gp_common', sources=source_files, includes=incs, defines = defs, libtype=['player'], priority=[5], cxx_compileflags=env['BGE_CXXFLAGS'])
diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
index 8ec41968042..3c989293c94 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
@@ -679,7 +679,7 @@ bool GPG_Application::startEngine(void)
// some python things
PyObject* dictionaryobject = initGamePlayerPythonScripting("Ketsji", psl_Lowest, m_maggie, m_argc, m_argv);
- m_ketsjiengine->SetPythonDictionary(dictionaryobject);
+ m_ketsjiengine->SetPyNamespace(dictionaryobject);
initRasterizer(m_rasterizer, m_canvas);
PyObject *gameLogic = initGameLogic(m_ketsjiengine, startscene);
PyDict_SetItemString(dictionaryobject, "GameLogic", gameLogic); // Same as importing the module
@@ -702,7 +702,6 @@ bool GPG_Application::startEngine(void)
m_sceneconverter->ConvertScene(
startscene,
- dictionaryobject,
m_rendertools,
m_canvas);
m_ketsjiengine->AddScene(startscene);
diff --git a/source/gameengine/GamePlayer/ghost/SConscript b/source/gameengine/GamePlayer/ghost/SConscript
index fdd7792b72a..cfb827cf8c3 100644
--- a/source/gameengine/GamePlayer/ghost/SConscript
+++ b/source/gameengine/GamePlayer/ghost/SConscript
@@ -40,9 +40,13 @@ incs = ['.',
'#source/blender/gpu',
'#extern/glew/include']
-incs += Split(env['BF_PYTHON_INC'])
-
defs = []
+
+if env['WITH_BF_PYTHON']:
+ incs += ' ' + env['BF_PYTHON_INC']
+else:
+ defs.append('DISABLE_PYTHON')
+
if env['WITH_BF_FFMPEG']:
defs.append('WITH_FFMPEG')
diff --git a/source/gameengine/Ketsji/BL_Shader.cpp b/source/gameengine/Ketsji/BL_Shader.cpp
index f548bcdaae1..35eb5dc124a 100644
--- a/source/gameengine/Ketsji/BL_Shader.cpp
+++ b/source/gameengine/Ketsji/BL_Shader.cpp
@@ -728,6 +728,8 @@ void BL_Shader::SetUniform(int uniform, const int* val, int len)
}
}
+#ifndef DISABLE_PYTHON
+
PyMethodDef BL_Shader::Methods[] =
{
// creation
@@ -1409,4 +1411,6 @@ KX_PYMETHODDEF_DOC( BL_Shader, setUniformDef, "setUniformDef(name, enum)" )
return NULL;
}
+#endif // DISABLE_PYTHON
+
// eof
diff --git a/source/gameengine/Ketsji/BL_Shader.h b/source/gameengine/Ketsji/BL_Shader.h
index b2610d7762a..ebd2e491f35 100644
--- a/source/gameengine/Ketsji/BL_Shader.h
+++ b/source/gameengine/Ketsji/BL_Shader.h
@@ -222,6 +222,7 @@ public:
void SetUniform(int uniform, const int val);
// Python interface
+#ifndef DISABLE_PYTHON
virtual PyObject* py_repr(void) { return PyUnicode_FromFormat("BL_Shader\n\tvertex shader:%s\n\n\tfragment shader%s\n\n", vertProg, fragProg); }
// -----------------------------------
@@ -249,6 +250,7 @@ public:
KX_PYMETHOD_DOC( BL_Shader, setUniformDef );
KX_PYMETHOD_DOC( BL_Shader, setAttrib );
KX_PYMETHOD_DOC( BL_Shader, setSampler);
+#endif
};
#endif//__BL_SHADER_H__
diff --git a/source/gameengine/Ketsji/CMakeLists.txt b/source/gameengine/Ketsji/CMakeLists.txt
index 01d369bc7a9..857be4bd827 100644
--- a/source/gameengine/Ketsji/CMakeLists.txt
+++ b/source/gameengine/Ketsji/CMakeLists.txt
@@ -59,7 +59,6 @@ SET(INC
../../../source/blender/gpu
../../../extern/bullet2/src
../../../extern/glew/include
- ${PYTHON_INC}
)
IF(WITH_SDL)
@@ -68,5 +67,11 @@ ELSE(WITH_SDL)
ADD_DEFINITIONS(-DDISABLE_SDL)
ENDIF(WITH_SDL)
+IF(WITH_PYTHON)
+ SET(INC ${INC} ${PYTHON_INC})
+ELSE(WITH_PYTHON)
+ ADD_DEFINITIONS(-DDISABLE_PYTHON)
+ENDIF(WITH_PYTHON)
+
BLENDERLIB(bf_ketsji "${SRC}" "${INC}")
#env.BlenderLib ( 'bf_ketsji', sources, Split(incs), [], libtype=['game','player'], priority=[25, 72], compileflags = cflags )
diff --git a/source/gameengine/Ketsji/KXNetwork/CMakeLists.txt b/source/gameengine/Ketsji/KXNetwork/CMakeLists.txt
index b89b0dcff9f..1a608713c51 100644
--- a/source/gameengine/Ketsji/KXNetwork/CMakeLists.txt
+++ b/source/gameengine/Ketsji/KXNetwork/CMakeLists.txt
@@ -36,8 +36,13 @@ SET(INC
../../../../source/gameengine/Expressions
../../../../source/gameengine/SceneGraph
../../../../source/gameengine/Network
- ${PYTHON_INC}
)
+IF(WITH_PYTHON)
+ SET(INC ${INC} ${PYTHON_INC})
+ELSE(WITH_PYTHON)
+ ADD_DEFINITIONS(-DDISABLE_PYTHON)
+ENDIF(WITH_PYTHON)
+
BLENDERLIB(kx_network "${SRC}" "${INC}")
#env.BlenderLib ( 'kx_network', Split(sources), Split(incs), defines=[],libtype=['game2', 'player'], priority=[5, 155] )
diff --git a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp
index 1cfab87d78b..04a7f2b3603 100644
--- a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp
+++ b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp
@@ -95,6 +95,8 @@ CValue* KX_NetworkMessageActuator::GetReplica()
return replica;
}
+#ifndef DISABLE_PYTHON
+
/* -------------------------------------------------------------------- */
/* Python interface --------------------------------------------------- */
/* -------------------------------------------------------------------- */
@@ -133,3 +135,5 @@ PyAttributeDef KX_NetworkMessageActuator::Attributes[] = {
KX_PYATTRIBUTE_STRING_RW("body", 0, 16384, false, KX_NetworkMessageActuator, m_body),
{ NULL } //Sentinel
};
+
+#endif // DISABLE_PYTHON
diff --git a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp
index 392e9dd9d1b..18dc416cc1b 100644
--- a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp
+++ b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp
@@ -158,6 +158,8 @@ bool KX_NetworkMessageSensor::IsPositiveTrigger()
return m_IsUp;
}
+#ifndef DISABLE_PYTHON
+
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
@@ -216,3 +218,5 @@ PyObject* KX_NetworkMessageSensor::pyattr_get_subjects(void *self_v, const KX_PY
return (new CListValue())->NewProxy(true);
}
}
+
+#endif // DISABLE_PYTHON
diff --git a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h
index d8a0651d2f1..3a8fe760bb9 100644
--- a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h
+++ b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h
@@ -66,6 +66,8 @@ public:
virtual void Init();
void EndFrame();
+#ifndef DISABLE_PYTHON
+
/* ------------------------------------------------------------- */
/* Python interface -------------------------------------------- */
/* ------------------------------------------------------------- */
@@ -74,6 +76,8 @@ public:
static PyObject* pyattr_get_bodies(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
static PyObject* pyattr_get_subjects(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
+#endif // DISABLE_PYTHON
+
};
#endif //__KX_NETWORKMESSAGE_SENSOR_H
diff --git a/source/gameengine/Ketsji/KXNetwork/SConscript b/source/gameengine/Ketsji/KXNetwork/SConscript
index 8f88511acca..64d00489c89 100644
--- a/source/gameengine/Ketsji/KXNetwork/SConscript
+++ b/source/gameengine/Ketsji/KXNetwork/SConscript
@@ -7,6 +7,11 @@ incs = '. #source/kernel/gen_system #intern/string #intern/moto/include #source/
incs += ' #source/gameengine/GameLogic #source/gameengine/Expressions'
incs += ' #source/gameengine/Network #source/gameengine/SceneGraph'
-incs += ' ' + env['BF_PYTHON_INC']
+defs = []
-env.BlenderLib ( 'bf_network', Split(sources), Split(incs), defines=[],libtype=['core','player'], priority=[400,125], cxx_compileflags=env['BGE_CXXFLAGS'])
+if env['WITH_BF_PYTHON']:
+ incs += ' ' + env['BF_PYTHON_INC']
+else:
+ defs.append('DISABLE_PYTHON')
+
+env.BlenderLib ( 'bf_network', Split(sources), Split(incs), defines=defs,libtype=['core','player'], priority=[400,125], cxx_compileflags=env['BGE_CXXFLAGS'])
diff --git a/source/gameengine/Ketsji/KX_ArmatureSensor.cpp b/source/gameengine/Ketsji/KX_ArmatureSensor.cpp
index 1b759bda28e..40e16744d71 100644
--- a/source/gameengine/Ketsji/KX_ArmatureSensor.cpp
+++ b/source/gameengine/Ketsji/KX_ArmatureSensor.cpp
@@ -153,6 +153,7 @@ bool KX_ArmatureSensor::Evaluate()
return (reset) ? true : false;
}
+#ifndef DISABLE_PYTHON
/* ------------------------------------------------------------------------- */
/* Python functions */
@@ -203,3 +204,5 @@ PyObject* KX_ArmatureSensor::pyattr_get_constraint(void *self, const struct KX_P
}
Py_RETURN_NONE;
}
+
+#endif // DISABLE_PYTHON
diff --git a/source/gameengine/Ketsji/KX_ArmatureSensor.h b/source/gameengine/Ketsji/KX_ArmatureSensor.h
index 2af002afff9..6dc6991873a 100644
--- a/source/gameengine/Ketsji/KX_ArmatureSensor.h
+++ b/source/gameengine/Ketsji/KX_ArmatureSensor.h
@@ -66,11 +66,15 @@ public:
// identify the constraint that this actuator controls
void FindConstraint();
+#ifndef DISABLE_PYTHON
+
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
static PyObject* pyattr_get_constraint(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
+#endif // DISABLE_PYTHON
+
private:
struct bConstraint* m_constraint;
STR_String m_posechannel;
diff --git a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp
index be3d4906761..f5086ca89ac 100644
--- a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp
+++ b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp
@@ -777,6 +777,18 @@ void KX_BlenderMaterial::UpdateIPO(
mMaterial->ref = (float)(ref);
}
+void KX_BlenderMaterial::SetBlenderGLSLShader(int layer)
+{
+ if(!mBlenderShader)
+ mBlenderShader = new BL_BlenderShader(mScene, mMaterial->material, layer);
+
+ if(!mBlenderShader->Ok()) {
+ delete mBlenderShader;
+ mBlenderShader = 0;
+ }
+}
+
+#ifndef DISABLE_PYTHON
PyMethodDef KX_BlenderMaterial::Methods[] =
{
@@ -870,18 +882,6 @@ KX_PYMETHODDEF_DOC( KX_BlenderMaterial, getShader , "getShader()")
return NULL;
}
-
-void KX_BlenderMaterial::SetBlenderGLSLShader(int layer)
-{
- if(!mBlenderShader)
- mBlenderShader = new BL_BlenderShader(mScene, mMaterial->material, layer);
-
- if(!mBlenderShader->Ok()) {
- delete mBlenderShader;
- mBlenderShader = 0;
- }
-}
-
KX_PYMETHODDEF_DOC( KX_BlenderMaterial, getMaterialIndex, "getMaterialIndex()")
{
return PyLong_FromSsize_t( GetMaterialIndex() );
@@ -941,3 +941,4 @@ KX_PYMETHODDEF_DOC( KX_BlenderMaterial, setBlending , "setBlending( GameLogic.sr
return NULL;
}
+#endif // DISABLE_PYTHON
diff --git a/source/gameengine/Ketsji/KX_BlenderMaterial.h b/source/gameengine/Ketsji/KX_BlenderMaterial.h
index cdbdc4bd429..0946cd320c5 100644
--- a/source/gameengine/Ketsji/KX_BlenderMaterial.h
+++ b/source/gameengine/Ketsji/KX_BlenderMaterial.h
@@ -83,6 +83,7 @@ public:
MT_Scalar ref, MT_Scalar emit, MT_Scalar alpha
);
+#ifndef DISABLE_PYTHON
// --------------------------------
virtual PyObject* py_repr(void) { return PyUnicode_FromString(mMaterial->matname.ReadPtr()); }
@@ -92,6 +93,7 @@ public:
KX_PYMETHOD_DOC( KX_BlenderMaterial, setTexture );
KX_PYMETHOD_DOC( KX_BlenderMaterial, setBlending );
+#endif // DISABLE_PYTHON
// --------------------------------
// pre calculate to avoid pops/lag at startup
diff --git a/source/gameengine/Ketsji/KX_Camera.cpp b/source/gameengine/Ketsji/KX_Camera.cpp
index 0832809772d..384125119a9 100644
--- a/source/gameengine/Ketsji/KX_Camera.cpp
+++ b/source/gameengine/Ketsji/KX_Camera.cpp
@@ -481,6 +481,7 @@ int KX_Camera::GetViewportTop() const
return m_camdata.m_viewporttop;
}
+#ifndef DISABLE_PYTHON
//----------------------------------------------------------------------------
//Python
@@ -1030,4 +1031,4 @@ KX_PYMETHODDEF_DOC_VARARGS(KX_Camera, getScreenRay,
return NULL;
}
-
+#endif
diff --git a/source/gameengine/Ketsji/KX_Camera.h b/source/gameengine/Ketsji/KX_Camera.h
index bf7a39d93c8..71c66efaa87 100644
--- a/source/gameengine/Ketsji/KX_Camera.h
+++ b/source/gameengine/Ketsji/KX_Camera.h
@@ -41,8 +41,10 @@
#include "IntValue.h"
#include "RAS_CameraData.h"
+#ifndef DISABLE_PYTHON
/* utility conversion function */
bool ConvertPythonToCamera(PyObject * value, KX_Camera **object, bool py_none_ok, const char *error_prefix);
+#endif
class KX_Camera : public KX_GameObject
{
@@ -267,6 +269,7 @@ public:
virtual int GetGameObjectType() { return OBJ_CAMERA; }
+#ifndef DISABLE_PYTHON
KX_PYMETHOD_DOC_VARARGS(KX_Camera, sphereInsideFrustum);
KX_PYMETHOD_DOC_O(KX_Camera, boxInsideFrustum);
KX_PYMETHOD_DOC_O(KX_Camera, pointInsideFrustum);
@@ -304,6 +307,7 @@ public:
static PyObject* pyattr_get_INSIDE(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
static PyObject* pyattr_get_OUTSIDE(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
static PyObject* pyattr_get_INTERSECT(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
+#endif
};
#endif //__KX_CAMERA
diff --git a/source/gameengine/Ketsji/KX_CameraActuator.cpp b/source/gameengine/Ketsji/KX_CameraActuator.cpp
index 99618fab8e3..3b02227451c 100644
--- a/source/gameengine/Ketsji/KX_CameraActuator.cpp
+++ b/source/gameengine/Ketsji/KX_CameraActuator.cpp
@@ -350,6 +350,8 @@ CValue *KX_CameraActuator::findObject(char *obName)
return NULL;
}
+#ifndef DISABLE_PYTHON
+
/* ------------------------------------------------------------------------- */
/* Python functions */
/* ------------------------------------------------------------------------- */
@@ -416,4 +418,6 @@ int KX_CameraActuator::pyattr_set_object(void *self_v, const KX_PYATTRIBUTE_DEF
return PY_SET_ATTR_SUCCESS;
}
+#endif // DISABLE_PYTHON
+
/* eof */
diff --git a/source/gameengine/Ketsji/KX_CameraActuator.h b/source/gameengine/Ketsji/KX_CameraActuator.h
index e047e3724ea..875922b36e7 100644
--- a/source/gameengine/Ketsji/KX_CameraActuator.h
+++ b/source/gameengine/Ketsji/KX_CameraActuator.h
@@ -114,6 +114,8 @@ private :
/** Methods inherited from SCA_ILogicBrick */
virtual void Relink(GEN_Map<GEN_HashedPtr, void*> *obj_map);
+#ifndef DISABLE_PYTHON
+
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
@@ -122,6 +124,8 @@ private :
static PyObject* pyattr_get_object(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
static int pyattr_set_object(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
+#endif // DISABLE_PYTHON
+
};
#endif //__KX_CAMERAACTUATOR
diff --git a/source/gameengine/Ketsji/KX_ConstraintActuator.cpp b/source/gameengine/Ketsji/KX_ConstraintActuator.cpp
index ea0b9f4f1e2..7bbc53211b6 100644
--- a/source/gameengine/Ketsji/KX_ConstraintActuator.cpp
+++ b/source/gameengine/Ketsji/KX_ConstraintActuator.cpp
@@ -38,6 +38,8 @@
#include "KX_RayCast.h"
#include "KX_PythonInit.h" // KX_GetActiveScene
+#include <stdio.h>
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -559,6 +561,8 @@ bool KX_ConstraintActuator::IsValidMode(KX_ConstraintActuator::KX_CONSTRAINTTYPE
return res;
}
+#ifndef DISABLE_PYTHON
+
/* ------------------------------------------------------------------------- */
/* Python functions */
/* ------------------------------------------------------------------------- */
@@ -618,4 +622,6 @@ int KX_ConstraintActuator::pyattr_check_direction(void *self, const struct KX_PY
return 0;
}
+#endif
+
/* eof */
diff --git a/source/gameengine/Ketsji/KX_ConstraintWrapper.cpp b/source/gameengine/Ketsji/KX_ConstraintWrapper.cpp
index 54e083b48f0..aee7b3cc44c 100644
--- a/source/gameengine/Ketsji/KX_ConstraintWrapper.cpp
+++ b/source/gameengine/Ketsji/KX_ConstraintWrapper.cpp
@@ -26,7 +26,7 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
-#include <Python.h>
+
#include "PyObjectPlus.h"
#include "KX_ConstraintWrapper.h"
#include "PHY_IPhysicsEnvironment.h"
@@ -49,6 +49,8 @@ KX_ConstraintWrapper::~KX_ConstraintWrapper()
{
}
+#ifndef DISABLE_PYTHON
+
PyObject* KX_ConstraintWrapper::PyGetConstraintId()
{
return PyLong_FromSsize_t(m_constraintId);
@@ -115,3 +117,5 @@ PyAttributeDef KX_ConstraintWrapper::Attributes[] = {
//KX_PYATTRIBUTE_TODO("constraintId"),
{ NULL } //Sentinel
};
+
+#endif // DISABLE_PYTHON
diff --git a/source/gameengine/Ketsji/KX_ConstraintWrapper.h b/source/gameengine/Ketsji/KX_ConstraintWrapper.h
index 74670944415..300455aef6b 100644
--- a/source/gameengine/Ketsji/KX_ConstraintWrapper.h
+++ b/source/gameengine/Ketsji/KX_ConstraintWrapper.h
@@ -40,9 +40,11 @@ public:
virtual ~KX_ConstraintWrapper ();
int getConstraintId() { return m_constraintId;};
+#ifndef DISABLE_PYTHON
KX_PYMETHOD_NOARGS(KX_ConstraintWrapper,GetConstraintId);
KX_PYMETHOD(KX_ConstraintWrapper,SetParam);
KX_PYMETHOD(KX_ConstraintWrapper,GetParam);
+#endif
private:
int m_constraintId;
diff --git a/source/gameengine/Ketsji/KX_Dome.cpp b/source/gameengine/Ketsji/KX_Dome.cpp
index daa31379985..c0d7b639077 100644
--- a/source/gameengine/Ketsji/KX_Dome.cpp
+++ b/source/gameengine/Ketsji/KX_Dome.cpp
@@ -18,13 +18,16 @@ http://www.gnu.org/copyleft/lesser.txt.
Contributor(s): Dalai Felinto
This code is originally inspired on some of the ideas and codes from Paul Bourke.
-Developed as part of a Research and Development project for SAT - La Société des arts technologiques.
+Developed as part of a Research and Development project for SAT - La Soci�t� des arts technologiques.
-----------------------------------------------------------------------------
*/
#include "KX_Dome.h"
+#ifndef DISABLE_PYTHON
#include <structmember.h>
+#endif
+
#include <float.h>
#include <math.h>
@@ -558,7 +561,7 @@ void KX_Dome::CreateMeshDome180(void)
m_radangle = m_angle * M_PI/180.0;//calculates the radians angle, used for flattening
- //creating faces for the env mapcube 180º Dome
+ //creating faces for the env mapcube 180� Dome
// Top Face - just a triangle
cubetop[0].verts[0][0] = -sqrt_2 / 2.0;
cubetop[0].verts[0][1] = 0.0;
@@ -743,7 +746,7 @@ void KX_Dome::CreateMeshDome250(void)
m_radangle = m_angle * M_PI/180.0;//calculates the radians angle, used for flattening
/*
verts_height is the exactly needed height of the cube faces (not always 1.0).
-When we want some horizontal information (e.g. for horizontal 220º domes) we don't need to create and tesselate the whole cube.
+When we want some horizontal information (e.g. for horizontal 220� domes) we don't need to create and tesselate the whole cube.
Therefore the lateral cube faces could be small, and the tesselate mesh would be completely used.
(if we always worked with verts_height = 1.0, we would be discarding a lot of the calculated and tesselated geometry).
@@ -760,7 +763,7 @@ Then we need to multiply it by sqrt(2.0) to get the coordinate of the verts on t
uv_height = uv_ratio * ((verts_height/2) + 0.5);
uv_base = uv_ratio * (1.0 - ((verts_height/2) + 0.5));
- //creating faces for the env mapcube 180º Dome
+ //creating faces for the env mapcube 180� Dome
// Front Face - 2 triangles
cubefront[0].verts[0][0] =-1.0;
cubefront[0].verts[0][1] = 1.0;
@@ -1101,7 +1104,7 @@ void KX_Dome::CreateMeshPanorama(void)
nfacesbottom = 2;
- /* Left Back (135º) face - two triangles */
+ /* Left Back (135�) face - two triangles */
cubeleftback[0].verts[0][0] = 0;
cubeleftback[0].verts[0][1] = -sqrt_2;
@@ -1223,7 +1226,7 @@ void KX_Dome::CreateMeshPanorama(void)
nfacesright = 2;
- /* Right Back (-135º) face - two triangles */
+ /* Right Back (-135�) face - two triangles */
cuberightback[0].verts[0][0] = sqrt_2;
cuberightback[0].verts[0][1] = 0;
cuberightback[0].verts[0][2] = -1.0;
@@ -1352,7 +1355,7 @@ void KX_Dome::FlattenDome(MT_Vector3 verts[3])
void KX_Dome::FlattenPanorama(MT_Vector3 verts[3])
{
-// it creates a full spherical panoramic (360º)
+// it creates a full spherical panoramic (360�)
int i;
double phi;
bool edge=false;
@@ -1445,7 +1448,7 @@ void KX_Dome::SplitFace(vector <DomeFace>& face, int *nfaces)
void KX_Dome::CalculateFrustum(KX_Camera * cam)
{
/*
- // manually creating a 90º Field of View Frustum
+ // manually creating a 90� Field of View Frustum
the original formula:
top = tan(fov*3.14159/360.0) * near [for fov in degrees]
@@ -1466,7 +1469,7 @@ void KX_Dome::CalculateFrustum(KX_Camera * cam)
m_frustrum.camfar = cam->GetCameraFar();
// float top = tan(90.0*MT_PI/360.0) * m_frustrum.camnear;
- float top = m_frustrum.camnear; // for deg = 90º, tan = 1
+ float top = m_frustrum.camnear; // for deg = 90�, tan = 1
m_frustrum.x1 = -top;
m_frustrum.x2 = top;
@@ -1481,9 +1484,9 @@ void KX_Dome::CalculateFrustum(KX_Camera * cam)
void KX_Dome::CalculateCameraOrientation()
{
/*
-Uses 4 cameras for angles up to 180º
-Uses 5 cameras for angles up to 250º
-Uses 6 cameras for angles up to 360º
+Uses 4 cameras for angles up to 180�
+Uses 5 cameras for angles up to 250�
+Uses 6 cameras for angles up to 360�
*/
int i;
float deg45 = MT_PI / 4;
@@ -1494,22 +1497,22 @@ Uses 6 cameras for angles up to 360º
|| m_mode == DOME_TRUNCATED_FRONT
|| m_mode == DOME_TRUNCATED_REAR)){
- m_locRot[0] = MT_Matrix3x3( // 90º - Top
+ m_locRot[0] = MT_Matrix3x3( // 90� - Top
c, -s, 0.0,
0.0,0.0, -1.0,
s, c, 0.0);
- m_locRot[1] = MT_Matrix3x3( // 90º - Bottom
+ m_locRot[1] = MT_Matrix3x3( // 90� - Bottom
-s, c, 0.0,
0.0,0.0, 1.0,
s, c, 0.0);
- m_locRot[2] = MT_Matrix3x3( // 45º - Left
+ m_locRot[2] = MT_Matrix3x3( // 45� - Left
c, 0.0, s,
0, 1.0, 0.0,
-s, 0.0, c);
- m_locRot[3] = MT_Matrix3x3( // 45º - Right
+ m_locRot[3] = MT_Matrix3x3( // 45� - Right
c, 0.0, -s,
0.0, 1.0, 0.0,
s, 0.0, c);
@@ -1518,32 +1521,32 @@ Uses 6 cameras for angles up to 360º
|| m_mode == DOME_TRUNCATED_FRONT
|| m_mode == DOME_TRUNCATED_REAR))){
- m_locRot[0] = MT_Matrix3x3( // 90º - Top
+ m_locRot[0] = MT_Matrix3x3( // 90� - Top
1.0, 0.0, 0.0,
0.0, 0.0,-1.0,
0.0, 1.0, 0.0);
- m_locRot[1] = MT_Matrix3x3( // 90º - Bottom
+ m_locRot[1] = MT_Matrix3x3( // 90� - Bottom
1.0, 0.0, 0.0,
0.0, 0.0, 1.0,
0.0,-1.0, 0.0);
- m_locRot[2] = MT_Matrix3x3( // -90º - Left
+ m_locRot[2] = MT_Matrix3x3( // -90� - Left
0.0, 0.0, 1.0,
0.0, 1.0, 0.0,
-1.0, 0.0, 0.0);
- m_locRot[3] = MT_Matrix3x3( // 90º - Right
+ m_locRot[3] = MT_Matrix3x3( // 90� - Right
0.0, 0.0,-1.0,
0.0, 1.0, 0.0,
1.0, 0.0, 0.0);
- m_locRot[4] = MT_Matrix3x3( // 0º - Front
+ m_locRot[4] = MT_Matrix3x3( // 0� - Front
1.0, 0.0, 0.0,
0.0, 1.0, 0.0,
0.0, 0.0, 1.0);
- m_locRot[5] = MT_Matrix3x3( // 180º - Back - USED for ENVMAP only
+ m_locRot[5] = MT_Matrix3x3( // 180� - Back - USED for ENVMAP only
-1.0, 0.0, 0.0,
0.0, 1.0, 0.0,
0.0, 0.0,-1.0);
@@ -1560,22 +1563,22 @@ Uses 6 cameras for angles up to 360º
0.0 ,0.0, 1.0,
s, -c, 0.0);
- m_locRot[2] = MT_Matrix3x3( // 45º - Left
+ m_locRot[2] = MT_Matrix3x3( // 45� - Left
-s, 0.0, c,
0, 1.0, 0.0,
-c, 0.0, -s);
- m_locRot[3] = MT_Matrix3x3( // 45º - Right
+ m_locRot[3] = MT_Matrix3x3( // 45� - Right
c, 0.0, s,
0, 1.0, 0.0,
-s, 0.0, c);
- m_locRot[4] = MT_Matrix3x3( // 135º - LeftBack
+ m_locRot[4] = MT_Matrix3x3( // 135� - LeftBack
-s, 0.0, -c,
0.0, 1.0, 0.0,
c, 0.0, -s);
- m_locRot[5] = MT_Matrix3x3( // 135º - RightBack
+ m_locRot[5] = MT_Matrix3x3( // 135� - RightBack
c, 0.0, -s,
0.0, 1.0, 0.0,
s, 0.0, c);
@@ -1734,7 +1737,7 @@ void KX_Dome::DrawEnvMap(void)
glVertex3f(-onebythree,-2 * onebythree, 3.0f);
glEnd();
- // domefacesId[2] => -90º (left)
+ // domefacesId[2] => -90� (left)
glBindTexture(GL_TEXTURE_2D, domefacesId[2]);
glBegin(GL_QUADS);
glTexCoord2f(uv_ratio,uv_ratio);
@@ -1747,7 +1750,7 @@ void KX_Dome::DrawEnvMap(void)
glVertex3f(-onebythree, 0.0f, 3.0f);
glEnd();
- // domefacesId[3] => 90º (right)
+ // domefacesId[3] => 90� (right)
glBindTexture(GL_TEXTURE_2D, domefacesId[3]);
glBegin(GL_QUADS);
glTexCoord2f(uv_ratio,uv_ratio);
@@ -1760,7 +1763,7 @@ void KX_Dome::DrawEnvMap(void)
glVertex3f(1.0f, 0.0f, 3.0f);
glEnd();
- // domefacesId[4] => 0º (front)
+ // domefacesId[4] => 0� (front)
glBindTexture(GL_TEXTURE_2D, domefacesId[4]);
glBegin(GL_QUADS);
glTexCoord2f(uv_ratio,uv_ratio);
@@ -1773,7 +1776,7 @@ void KX_Dome::DrawEnvMap(void)
glVertex3f(1.0f, -2 * onebythree, 3.0f);
glEnd();
- // domefacesId[5] => 180º (back)
+ // domefacesId[5] => 180� (back)
glBindTexture(GL_TEXTURE_2D, domefacesId[5]);
glBegin(GL_QUADS);
glTexCoord2f(uv_ratio,uv_ratio);
@@ -1950,19 +1953,19 @@ void KX_Dome::DrawPanorama(void)
glBindTexture(GL_TEXTURE_2D, domefacesId[1]);
GLDrawTriangles(cubebottom, nfacesbottom);
- // domefacesId[1] => -45º (left)
+ // domefacesId[1] => -45� (left)
glBindTexture(GL_TEXTURE_2D, domefacesId[2]);
GLDrawTriangles(cubeleft, nfacesleft);
- // domefacesId[2] => 45º (right)
+ // domefacesId[2] => 45� (right)
glBindTexture(GL_TEXTURE_2D, domefacesId[3]);
GLDrawTriangles(cuberight, nfacesright);
- // domefacesId[0] => -135º (leftback)
+ // domefacesId[0] => -135� (leftback)
glBindTexture(GL_TEXTURE_2D, domefacesId[4]);
GLDrawTriangles(cubeleftback, nfacesleftback);
- // domefacesId[3] => 135º (rightback)
+ // domefacesId[3] => 135� (rightback)
glBindTexture(GL_TEXTURE_2D, domefacesId[5]);
GLDrawTriangles(cuberightback, nfacesrightback);
}
diff --git a/source/gameengine/Ketsji/KX_GameActuator.cpp b/source/gameengine/Ketsji/KX_GameActuator.cpp
index 71980a3347e..bc0f875bca6 100644
--- a/source/gameengine/Ketsji/KX_GameActuator.cpp
+++ b/source/gameengine/Ketsji/KX_GameActuator.cpp
@@ -36,6 +36,9 @@
#include "KX_KetsjiEngine.h"
#include "KX_PythonInit.h" /* for config load/saving */
+#include <stdio.h>
+#include <stdlib.h>
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -125,6 +128,7 @@ bool KX_GameActuator::Update()
}
case KX_GAME_SAVECFG:
{
+#ifndef DISABLE_PYTHON
if (m_ketsjiengine)
{
char mashal_path[512];
@@ -152,9 +156,11 @@ bool KX_GameActuator::Update()
delete [] marshal_buffer;
}
break;
+#endif // DISABLE_PYTHON
}
case KX_GAME_LOADCFG:
{
+#ifndef DISABLE_PYTHON
if (m_ketsjiengine)
{
char mashal_path[512];
@@ -189,6 +195,7 @@ bool KX_GameActuator::Update()
}
}
break;
+#endif // DISABLE_PYTHON
}
default:
; /* do nothing? this is an internal error !!! */
@@ -198,8 +205,7 @@ bool KX_GameActuator::Update()
}
-
-
+#ifndef DISABLE_PYTHON
/* ------------------------------------------------------------------------- */
/* Python functions */
@@ -238,3 +244,5 @@ PyAttributeDef KX_GameActuator::Attributes[] = {
KX_PYATTRIBUTE_INT_RW("mode", KX_GAME_NODEF+1, KX_GAME_MAX-1, true, KX_GameActuator, m_mode),
{ NULL } //Sentinel
};
+
+#endif // DISABLE_PYTHON
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp
index a02fd9cec1b..9bb261fcba9 100644
--- a/source/gameengine/Ketsji/KX_GameObject.cpp
+++ b/source/gameengine/Ketsji/KX_GameObject.cpp
@@ -104,8 +104,10 @@ KX_GameObject::KX_GameObject(
m_pGraphicController(NULL),
m_xray(false),
m_pHitObject(NULL),
- m_isDeformable(false),
- m_attr_dict(NULL)
+ m_isDeformable(false)
+#ifndef DISABLE_PYTHON
+ , m_attr_dict(NULL)
+#endif
{
m_ignore_activity_culling = false;
m_pClient_info = new KX_ClientObjectInfo(this, KX_ClientObjectInfo::ACTOR);
@@ -142,16 +144,19 @@ KX_GameObject::~KX_GameObject()
(*contit)->ClearObject();
}
m_pSGNode->SetSGClientObject(NULL);
+
+ /* m_pSGNode is freed in KX_Scene::RemoveNodeDestructObject */
}
if (m_pGraphicController)
{
delete m_pGraphicController;
}
-
+#ifndef DISABLE_PYTHON
if (m_attr_dict) {
PyDict_Clear(m_attr_dict); /* incase of circular refs or other weired cases */
Py_DECREF(m_attr_dict);
}
+#endif // DISABLE_PYTHON
}
KX_GameObject* KX_GameObject::GetClientObject(KX_ClientObjectInfo* info)
@@ -340,8 +345,11 @@ void KX_GameObject::ProcessReplica()
m_pClient_info = new KX_ClientObjectInfo(*m_pClient_info);
m_pClient_info->m_gameobject = this;
m_state = 0;
+
+#ifndef DISABLE_PYTHON
if(m_attr_dict)
m_attr_dict= PyDict_Copy(m_attr_dict);
+#endif
}
@@ -1199,6 +1207,28 @@ CListValue* KX_GameObject::GetChildrenRecursive()
return list;
}
+/* ---------------------------------------------------------------------
+ * Some stuff taken from the header
+ * --------------------------------------------------------------------- */
+void KX_GameObject::Relink(GEN_Map<GEN_HashedPtr, void*> *map_parameter)
+{
+ // we will relink the sensors and actuators that use object references
+ // if the object is part of the replicated hierarchy, use the new
+ // object reference instead
+ SCA_SensorList& sensorlist = GetSensors();
+ SCA_SensorList::iterator sit;
+ for (sit=sensorlist.begin(); sit != sensorlist.end(); sit++)
+ {
+ (*sit)->Relink(map_parameter);
+ }
+ SCA_ActuatorList& actuatorlist = GetActuators();
+ SCA_ActuatorList::iterator ait;
+ for (ait=actuatorlist.begin(); ait != actuatorlist.end(); ait++)
+ {
+ (*ait)->Relink(map_parameter);
+ }
+}
+
#ifdef USE_MATHUTILS
/* These require an SGNode */
@@ -1375,8 +1405,8 @@ void KX_GameObject_Mathutils_Callback_Init(void)
#endif // USE_MATHUTILS
+#ifndef DISABLE_PYTHON
/* ------- python stuff ---------------------------------------------------*/
-
PyMethodDef KX_GameObject::Methods[] = {
{"applyForce", (PyCFunction) KX_GameObject::sPyApplyForce, METH_VARARGS},
{"applyTorque", (PyCFunction) KX_GameObject::sPyApplyTorque, METH_VARARGS},
@@ -1452,23 +1482,6 @@ PyAttributeDef KX_GameObject::Attributes[] = {
{NULL} //Sentinel
};
-
-/*
-bool KX_GameObject::ConvertPythonVectorArgs(PyObject* args,
- MT_Vector3& pos,
- MT_Vector3& pos2)
-{
- PyObject* pylist;
- PyObject* pylist2;
- bool error = (PyArg_ParseTuple(args,"OO",&pylist,&pylist2)) != 0;
-
- pos = ConvertPythonPylist(pylist);
- pos2 = ConvertPythonPylist(pylist2);
-
- return error;
-}
-*/
-
PyObject* KX_GameObject::PyReplaceMesh(PyObject* args)
{
KX_Scene *scene = KX_GetActiveScene();
@@ -2774,29 +2787,6 @@ PyObject* KX_GameObject::Pyget(PyObject *args)
return def;
}
-/* ---------------------------------------------------------------------
- * Some stuff taken from the header
- * --------------------------------------------------------------------- */
-void KX_GameObject::Relink(GEN_Map<GEN_HashedPtr, void*> *map_parameter)
-{
- // we will relink the sensors and actuators that use object references
- // if the object is part of the replicated hierarchy, use the new
- // object reference instead
- SCA_SensorList& sensorlist = GetSensors();
- SCA_SensorList::iterator sit;
- for (sit=sensorlist.begin(); sit != sensorlist.end(); sit++)
- {
- (*sit)->Relink(map_parameter);
- }
- SCA_ActuatorList& actuatorlist = GetActuators();
- SCA_ActuatorList::iterator ait;
- for (ait=actuatorlist.begin(); ait != actuatorlist.end(); ait++)
- {
- (*ait)->Relink(map_parameter);
- }
-}
-
-
bool ConvertPythonToGameObject(PyObject * value, KX_GameObject **object, bool py_none_ok, const char *error_prefix)
{
if (value==NULL) {
@@ -2852,3 +2842,4 @@ bool ConvertPythonToGameObject(PyObject * value, KX_GameObject **object, bool py
return false;
}
+#endif // DISABLE_PYTHON
diff --git a/source/gameengine/Ketsji/KX_GameObject.h b/source/gameengine/Ketsji/KX_GameObject.h
index 4c4eed9ca71..41e04eef91c 100644
--- a/source/gameengine/Ketsji/KX_GameObject.h
+++ b/source/gameengine/Ketsji/KX_GameObject.h
@@ -60,8 +60,10 @@ class PHY_IGraphicController;
class PHY_IPhysicsEnvironment;
struct Object;
+#ifndef DISABLE_PYTHON
/* utility conversion function */
bool ConvertPythonToGameObject(PyObject * value, KX_GameObject **object, bool py_none_ok, const char *error_prefix);
+#endif
#ifdef USE_MATHUTILS
void KX_GameObject_Mathutils_Callback_Init(void);
@@ -114,6 +116,7 @@ public:
*/
static KX_GameObject* GetClientObject(KX_ClientObjectInfo* info);
+#ifndef DISABLE_PYTHON
// Python attributes that wont convert into CValue
//
// there are 2 places attributes can be stored, in the CValue,
@@ -130,6 +133,7 @@ public:
// * when assigning a value, first see if it can be a CValue, if it can remove the "m_attr_dict" and set the CValue
//
PyObject* m_attr_dict;
+#endif
virtual void /* This function should be virtual - derived classed override it */
Relink(
@@ -745,14 +749,6 @@ public:
) { return m_bIsNegativeScaling; }
/**
- * Is this a light?
- */
- virtual bool
- IsLight(
- void
- ) { return false; }
-
- /**
* @section Logic bubbling methods.
*/
@@ -796,7 +792,8 @@ public:
CListValue* GetChildren();
CListValue* GetChildrenRecursive();
-
+
+#ifndef DISABLE_PYTHON
/**
* @section Python interface functions.
*/
@@ -894,22 +891,7 @@ public:
/* getitem/setitem */
static PyMappingMethods Mapping;
static PySequenceMethods Sequence;
-
-private :
-
- /**
- * Random internal function to convert python function arguments
- * to 2 vectors.
- * @return true if conversion was possible.
- */
-
- bool
- ConvertPythonVectorArgs(
- PyObject* args,
- MT_Vector3& pos,
- MT_Vector3& pos2
- );
-
+#endif
};
diff --git a/source/gameengine/Ketsji/KX_ISceneConverter.h b/source/gameengine/Ketsji/KX_ISceneConverter.h
index f098b0bebf5..e5b7c777fb4 100644
--- a/source/gameengine/Ketsji/KX_ISceneConverter.h
+++ b/source/gameengine/Ketsji/KX_ISceneConverter.h
@@ -53,7 +53,6 @@ public:
*/
virtual void ConvertScene(
class KX_Scene* destinationscene,
- PyObject* dictobj,
class RAS_IRenderTools* rendertools,
class RAS_ICanvas* canvas)=0;
diff --git a/source/gameengine/Ketsji/KX_IpoActuator.cpp b/source/gameengine/Ketsji/KX_IpoActuator.cpp
index d7f800fe5bd..58769b94d9b 100644
--- a/source/gameengine/Ketsji/KX_IpoActuator.cpp
+++ b/source/gameengine/Ketsji/KX_IpoActuator.cpp
@@ -404,12 +404,13 @@ int KX_IpoActuator::string2mode(char* modename) {
return res;
}
+#ifndef DISABLE_PYTHON
+
/* ------------------------------------------------------------------------- */
/* Python functions */
/* ------------------------------------------------------------------------- */
-
/* Integration hooks ------------------------------------------------------- */
PyTypeObject KX_IpoActuator::Type = {
PyVarObject_HEAD_INIT(NULL, 0)
@@ -451,4 +452,6 @@ PyAttributeDef KX_IpoActuator::Attributes[] = {
{ NULL } //Sentinel
};
+#endif // DISABLE_PYTHON
+
/* eof */
diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
index e95676ff9d2..9f4fa9a7c02 100644
--- a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
+++ b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
@@ -112,7 +112,9 @@ KX_KetsjiEngine::KX_KetsjiEngine(KX_ISystem* system)
m_rendertools(NULL),
m_sceneconverter(NULL),
m_networkdevice(NULL),
+#ifndef DISABLE_PYTHON
m_pythondictionary(NULL),
+#endif
m_keyboarddevice(NULL),
m_mousedevice(NULL),
@@ -231,17 +233,17 @@ void KX_KetsjiEngine::SetRasterizer(RAS_IRasterizer* rasterizer)
m_rasterizer = rasterizer;
}
-
+#ifndef DISABLE_PYTHON
/*
* At the moment the GameLogic module is imported into 'pythondictionary' after this function is called.
* if this function ever changes to assign a copy, make sure the game logic module is imported into this dictionary before hand.
*/
-void KX_KetsjiEngine::SetPythonDictionary(PyObject* pythondictionary)
+void KX_KetsjiEngine::SetPyNamespace(PyObject* pythondictionary)
{
MT_assert(pythondictionary);
m_pythondictionary = pythondictionary;
}
-
+#endif
void KX_KetsjiEngine::SetSceneConverter(KX_ISceneConverter* sceneconverter)
@@ -604,7 +606,9 @@ else
m_logger->StartLog(tc_physics, m_kxsystem->GetTimeInSeconds(), true);
SG_SetActiveStage(SG_STAGE_PHYSICS1);
// set Python hooks for each scene
+#ifndef DISABLE_PYTHON
PHY_SetActiveEnvironment(scene->GetPhysicsEnvironment());
+#endif
KX_SetActiveScene(scene);
scene->GetPhysicsEnvironment()->endFrame();
@@ -706,7 +710,9 @@ else
m_suspendeddelta = scene->getSuspendedDelta();
// set Python hooks for each scene
+#ifndef DISABLE_PYTHON
PHY_SetActiveEnvironment(scene->GetPhysicsEnvironment());
+#endif
KX_SetActiveScene(scene);
m_logger->StartLog(tc_scenegraph, m_kxsystem->GetTimeInSeconds(), true);
@@ -1612,7 +1618,6 @@ KX_Scene* KX_KetsjiEngine::CreateScene(const STR_String& scenename)
scene);
m_sceneconverter->ConvertScene(tmpscene,
- m_pythondictionary,
m_rendertools,
m_canvas);
diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.h b/source/gameengine/Ketsji/KX_KetsjiEngine.h
index 373e8bf218c..74d683fbad6 100644
--- a/source/gameengine/Ketsji/KX_KetsjiEngine.h
+++ b/source/gameengine/Ketsji/KX_KetsjiEngine.h
@@ -70,7 +70,9 @@ private:
class RAS_IRenderTools* m_rendertools;
class KX_ISceneConverter* m_sceneconverter;
class NG_NetworkDeviceInterface* m_networkdevice;
+#ifndef DISABLE_PYTHON
PyObject* m_pythondictionary;
+#endif
class SCA_IInputDevice* m_keyboarddevice;
class SCA_IInputDevice* m_mousedevice;
class KX_Dome* m_dome; // dome stereo mode
@@ -201,7 +203,10 @@ public:
void SetCanvas(RAS_ICanvas* canvas);
void SetRenderTools(RAS_IRenderTools* rendertools);
void SetRasterizer(RAS_IRasterizer* rasterizer);
- void SetPythonDictionary(PyObject* pythondictionary);
+#ifndef DISABLE_PYTHON
+ void SetPyNamespace(PyObject* pythondictionary);
+ PyObject* GetPyNamespace(){return m_pythondictionary;};
+#endif
void SetSceneConverter(KX_ISceneConverter* sceneconverter);
void SetGame2IpoMode(bool game2ipo,int startFrame);
diff --git a/source/gameengine/Ketsji/KX_Light.cpp b/source/gameengine/Ketsji/KX_Light.cpp
index 85c495bc2bd..a0ecac178b3 100644
--- a/source/gameengine/Ketsji/KX_Light.cpp
+++ b/source/gameengine/Ketsji/KX_Light.cpp
@@ -264,6 +264,7 @@ void KX_LightObject::UnbindShadowBuffer(RAS_IRasterizer *ras)
GPU_lamp_shadow_buffer_unbind(lamp);
}
+#ifndef DISABLE_PYTHON
/* ------------------------------------------------------------------------- */
/* Python Integration Hooks */
/* ------------------------------------------------------------------------- */
@@ -384,3 +385,4 @@ int KX_LightObject::pyattr_set_type(void* self_v, const KX_PYATTRIBUTE_DEF *attr
return PY_SET_ATTR_SUCCESS;
}
+#endif // DISABLE_PYTHON
diff --git a/source/gameengine/Ketsji/KX_Light.h b/source/gameengine/Ketsji/KX_Light.h
index 0b7ccbe81ab..0e8484a4fe5 100644
--- a/source/gameengine/Ketsji/KX_Light.h
+++ b/source/gameengine/Ketsji/KX_Light.h
@@ -64,15 +64,17 @@ public:
void BindShadowBuffer(class RAS_IRasterizer *ras, class KX_Camera *cam, class MT_Transform& camtrans);
void UnbindShadowBuffer(class RAS_IRasterizer *ras);
void Update();
+
+ virtual int GetGameObjectType() { return OBJ_LIGHT; }
+#ifndef DISABLE_PYTHON
/* attributes */
static PyObject* pyattr_get_color(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
static int pyattr_set_color(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject* value);
static PyObject* pyattr_get_typeconst(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
static PyObject* pyattr_get_type(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
static int pyattr_set_type(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject* value);
-
- virtual bool IsLight(void) { return true; }
+#endif
};
#endif //__KX_LIGHT
diff --git a/source/gameengine/Ketsji/KX_MeshProxy.cpp b/source/gameengine/Ketsji/KX_MeshProxy.cpp
index 744fdb75796..a4815c5bd20 100644
--- a/source/gameengine/Ketsji/KX_MeshProxy.cpp
+++ b/source/gameengine/Ketsji/KX_MeshProxy.cpp
@@ -26,6 +26,8 @@
* ***** END GPL LICENSE BLOCK *****
*/
+#ifndef DISABLE_PYTHON
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -309,3 +311,5 @@ bool ConvertPythonToMesh(PyObject * value, RAS_MeshObject **object, bool py_none
return false;
}
+
+#endif // DISABLE_PYTHON
diff --git a/source/gameengine/Ketsji/KX_MeshProxy.h b/source/gameengine/Ketsji/KX_MeshProxy.h
index 55684aa5ee9..12174f158f1 100644
--- a/source/gameengine/Ketsji/KX_MeshProxy.h
+++ b/source/gameengine/Ketsji/KX_MeshProxy.h
@@ -29,6 +29,8 @@
#ifndef __KX_MESHPROXY
#define __KX_MESHPROXY
+#ifndef DISABLE_PYTHON
+
#include "SCA_IObject.h"
/* utility conversion function */
@@ -72,5 +74,7 @@ public:
static PyObject * pyattr_get_numPolygons(void * self, const KX_PYATTRIBUTE_DEF * attrdef);
};
+#endif // DISABLE_PYTHON
+
#endif //__KX_MESHPROXY
diff --git a/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp b/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp
index 8abc4f6b897..2dbaf3c9081 100644
--- a/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp
+++ b/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp
@@ -340,6 +340,8 @@ const MT_Vector3& KX_MouseFocusSensor::HitNormal() const
return m_hitNormal;
}
+#ifndef DISABLE_PYTHON
+
/* ------------------------------------------------------------------------- */
/* Python functions */
/* ------------------------------------------------------------------------- */
@@ -426,7 +428,7 @@ PyObject* KX_MouseFocusSensor::pyattr_get_hit_normal(void *self_v, const KX_PYAT
return PyObjectFrom(self->HitNormal());
}
-
+#endif // DISABLE_PYTHON
/* eof */
diff --git a/source/gameengine/Ketsji/KX_MouseFocusSensor.h b/source/gameengine/Ketsji/KX_MouseFocusSensor.h
index 7b53557467f..d4063ef1d16 100644
--- a/source/gameengine/Ketsji/KX_MouseFocusSensor.h
+++ b/source/gameengine/Ketsji/KX_MouseFocusSensor.h
@@ -86,6 +86,8 @@ class KX_MouseFocusSensor : public SCA_MouseSensor
const MT_Point3& HitPosition() const;
const MT_Vector3& HitNormal() const;
+#ifndef DISABLE_PYTHON
+
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
@@ -98,6 +100,8 @@ class KX_MouseFocusSensor : public SCA_MouseSensor
static PyObject* pyattr_get_hit_position(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
static PyObject* pyattr_get_hit_normal(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
+#endif // DISABLE_PYTHON
+
/* --------------------------------------------------------------------- */
SCA_IObject* m_hitObject;
void* m_hitObject_Last; /* only use for comparison, never access */
diff --git a/source/gameengine/Ketsji/KX_NearSensor.cpp b/source/gameengine/Ketsji/KX_NearSensor.cpp
index c6a6304cb2c..9cb0faab046 100644
--- a/source/gameengine/Ketsji/KX_NearSensor.cpp
+++ b/source/gameengine/Ketsji/KX_NearSensor.cpp
@@ -245,13 +245,12 @@ bool KX_NearSensor::NewHandleCollision(void* obj1,void* obj2,const PHY_CollData
return false; // was DT_CONTINUE; but this was defined in Sumo as false
}
+#ifndef DISABLE_PYTHON
/* ------------------------------------------------------------------------- */
/* Python Functions */
/* ------------------------------------------------------------------------- */
-//No methods
-
/* ------------------------------------------------------------------------- */
/* Python Integration Hooks */
/* ------------------------------------------------------------------------- */
@@ -288,3 +287,5 @@ PyAttributeDef KX_NearSensor::Attributes[] = {
KX_PYATTRIBUTE_FLOAT_RW_CHECK("resetDistance", 0, 100, KX_NearSensor, m_ResetMargin, CheckResetDistance),
{NULL} //Sentinel
};
+
+#endif // DISABLE_PYTHON
diff --git a/source/gameengine/Ketsji/KX_NearSensor.h b/source/gameengine/Ketsji/KX_NearSensor.h
index 4f0247d209d..4bc4a7d1524 100644
--- a/source/gameengine/Ketsji/KX_NearSensor.h
+++ b/source/gameengine/Ketsji/KX_NearSensor.h
@@ -78,6 +78,8 @@ public:
virtual bool BroadPhaseSensorFilterCollision(void*obj1,void*obj2) { return false; };
virtual sensortype GetSensorType() { return ST_NEAR; }
+#ifndef DISABLE_PYTHON
+
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
@@ -97,6 +99,8 @@ public:
return 0;
}
+#endif // DISABLE_PYTHON
+
};
#endif //KX_NEARSENSOR_H
diff --git a/source/gameengine/Ketsji/KX_ObjectActuator.cpp b/source/gameengine/Ketsji/KX_ObjectActuator.cpp
index 924e4a47008..03a80fdbc28 100644
--- a/source/gameengine/Ketsji/KX_ObjectActuator.cpp
+++ b/source/gameengine/Ketsji/KX_ObjectActuator.cpp
@@ -317,7 +317,7 @@ bool KX_ObjectActuator::isValid(KX_ObjectActuator::KX_OBJECT_ACT_VEC_TYPE type)
return res;
}
-
+#ifndef DISABLE_PYTHON
/* ------------------------------------------------------------------------- */
/* Python functions */
@@ -641,4 +641,6 @@ int KX_ObjectActuator::pyattr_set_reference(void *self, const struct KX_PYATTRIB
return PY_SET_ATTR_SUCCESS;
}
+#endif // DISABLE_PYTHON
+
/* eof */
diff --git a/source/gameengine/Ketsji/KX_ObjectActuator.h b/source/gameengine/Ketsji/KX_ObjectActuator.h
index 7a8c7de16b1..900408a30ab 100644
--- a/source/gameengine/Ketsji/KX_ObjectActuator.h
+++ b/source/gameengine/Ketsji/KX_ObjectActuator.h
@@ -157,7 +157,7 @@ public:
}
virtual bool Update();
-
+#ifndef DISABLE_PYTHON
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
@@ -216,6 +216,9 @@ public:
return 0;
}
+
+#endif // DISABLE_PYTHON
+
};
#endif //__KX_OBJECTACTUATOR
diff --git a/source/gameengine/Ketsji/KX_ParentActuator.cpp b/source/gameengine/Ketsji/KX_ParentActuator.cpp
index a4a6b67ad10..b70aa43ae9f 100644
--- a/source/gameengine/Ketsji/KX_ParentActuator.cpp
+++ b/source/gameengine/Ketsji/KX_ParentActuator.cpp
@@ -134,6 +134,8 @@ bool KX_ParentActuator::Update()
return false;
}
+#ifndef DISABLE_PYTHON
+
/* ------------------------------------------------------------------------- */
/* Python functions */
/* ------------------------------------------------------------------------- */
@@ -201,4 +203,6 @@ int KX_ParentActuator::pyattr_set_object(void *self, const struct KX_PYATTRIBUTE
return PY_SET_ATTR_SUCCESS;
}
+#endif // DISABLE_PYTHON
+
/* eof */
diff --git a/source/gameengine/Ketsji/KX_ParentActuator.h b/source/gameengine/Ketsji/KX_ParentActuator.h
index f750affc8a1..501533486cf 100644
--- a/source/gameengine/Ketsji/KX_ParentActuator.h
+++ b/source/gameengine/Ketsji/KX_ParentActuator.h
@@ -77,6 +77,8 @@ class KX_ParentActuator : public SCA_IActuator
virtual void Relink(GEN_Map<GEN_HashedPtr, void*> *obj_map);
virtual bool UnlinkObject(SCA_IObject* clientobj);
+#ifndef DISABLE_PYTHON
+
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
@@ -85,6 +87,8 @@ class KX_ParentActuator : public SCA_IActuator
static PyObject* pyattr_get_object(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
static int pyattr_set_object(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
+#endif // DISABLE_PYTHON
+
}; /* end of class KX_ParentActuator : public SCA_PropertyActuator */
#endif
diff --git a/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp b/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp
index edb19002671..0e149783338 100644
--- a/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp
+++ b/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp
@@ -26,7 +26,7 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
-#include <Python.h>
+
#include "PyObjectPlus.h"
#include "KX_PhysicsObjectWrapper.h"
@@ -50,6 +50,7 @@ KX_PhysicsObjectWrapper::~KX_PhysicsObjectWrapper()
{
}
+#ifndef DISABLE_PYTHON
PyObject* KX_PhysicsObjectWrapper::PySetPosition(PyObject* args)
{
@@ -141,3 +142,5 @@ PyMethodDef KX_PhysicsObjectWrapper::Methods[] = {
{"setActive",(PyCFunction) KX_PhysicsObjectWrapper::sPySetActive, METH_VARARGS},
{NULL,NULL} //Sentinel
};
+
+#endif
diff --git a/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.h b/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.h
index fa6fd1d1f2a..6fba1d0d95f 100644
--- a/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.h
+++ b/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.h
@@ -39,11 +39,15 @@ public:
KX_PhysicsObjectWrapper(class PHY_IPhysicsController* ctrl,class PHY_IPhysicsEnvironment* physenv);
virtual ~KX_PhysicsObjectWrapper();
+#ifndef DISABLE_PYTHON
+
KX_PYMETHOD_VARARGS(KX_PhysicsObjectWrapper,SetPosition);
KX_PYMETHOD_VARARGS(KX_PhysicsObjectWrapper,SetLinearVelocity);
KX_PYMETHOD_VARARGS(KX_PhysicsObjectWrapper,SetAngularVelocity);
KX_PYMETHOD_VARARGS(KX_PhysicsObjectWrapper,SetActive);
+#endif // DISABLE_PYTHON
+
private:
class PHY_IPhysicsController* m_ctrl;
PHY_IPhysicsEnvironment* m_physenv;
diff --git a/source/gameengine/Ketsji/KX_PolyProxy.cpp b/source/gameengine/Ketsji/KX_PolyProxy.cpp
index af8e0510a11..3a9052bd95e 100644
--- a/source/gameengine/Ketsji/KX_PolyProxy.cpp
+++ b/source/gameengine/Ketsji/KX_PolyProxy.cpp
@@ -26,6 +26,8 @@
* ***** END GPL LICENSE BLOCK *****
*/
+#ifndef DISABLE_PYTHON
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -271,3 +273,5 @@ KX_PYMETHODDEF_DOC_NOARGS(KX_PolyProxy, getMaterial,
return mat->GetProxy();
}
}
+
+#endif // DISABLE_PYTHON
diff --git a/source/gameengine/Ketsji/KX_PolyProxy.h b/source/gameengine/Ketsji/KX_PolyProxy.h
index e619617d312..e7584727a77 100644
--- a/source/gameengine/Ketsji/KX_PolyProxy.h
+++ b/source/gameengine/Ketsji/KX_PolyProxy.h
@@ -29,6 +29,8 @@
#ifndef __KX_POLYROXY
#define __KX_POLYPROXY
+#ifndef DISABLE_PYTHON
+
#include "SCA_IObject.h"
class KX_PolyProxy : public CValue
@@ -65,5 +67,7 @@ public:
};
+#endif // DISABLE_PYTHON
+
#endif //__KX_POLYPROXY
diff --git a/source/gameengine/Ketsji/KX_PolygonMaterial.cpp b/source/gameengine/Ketsji/KX_PolygonMaterial.cpp
index 5b4322ae4cd..54a0f51aa7c 100644
--- a/source/gameengine/Ketsji/KX_PolygonMaterial.cpp
+++ b/source/gameengine/Ketsji/KX_PolygonMaterial.cpp
@@ -58,7 +58,9 @@ KX_PolygonMaterial::KX_PolygonMaterial()
m_tface(NULL),
m_mcol(NULL),
m_material(NULL),
+#ifndef DISABLE_PYTHON
m_pymaterial(NULL),
+#endif
m_pass(0)
{
}
@@ -92,21 +94,27 @@ void KX_PolygonMaterial::Initialize(
m_tface = tface;
m_mcol = mcol;
m_material = ma;
+#ifndef DISABLE_PYTHON
m_pymaterial = 0;
+#endif
m_pass = 0;
}
KX_PolygonMaterial::~KX_PolygonMaterial()
{
+#ifndef DISABLE_PYTHON
if (m_pymaterial)
{
Py_DECREF(m_pymaterial);
}
+#endif // DISABLE_PYTHON
}
bool KX_PolygonMaterial::Activate(RAS_IRasterizer* rasty, TCachingInfo& cachingInfo) const
{
bool dopass = false;
+
+#ifndef DISABLE_PYTHON
if (m_pymaterial)
{
PyObject *pyRasty = PyCObject_FromVoidPtr((void*)rasty, NULL); /* new reference */
@@ -126,6 +134,7 @@ bool KX_PolygonMaterial::Activate(RAS_IRasterizer* rasty, TCachingInfo& cachingI
}
}
else
+#endif // DISABLE_PYTHON
{
switch (m_pass++)
{
@@ -196,6 +205,7 @@ void KX_PolygonMaterial::GetMaterialRGBAColor(unsigned char *rgba) const
RAS_IPolyMaterial::GetMaterialRGBAColor(rgba);
}
+#ifndef DISABLE_PYTHON
//----------------------------------------------------------------------------
//Python
@@ -386,3 +396,5 @@ int KX_PolygonMaterial::pyattr_set_specular(void *self_v, const KX_PYATTRIBUTE_D
self->m_specular= vec;
return PY_SET_ATTR_SUCCESS;
}
+
+#endif // DISABLE_PYTHON
diff --git a/source/gameengine/Ketsji/KX_PolygonMaterial.h b/source/gameengine/Ketsji/KX_PolygonMaterial.h
index dc42bd2f81b..dba12acee7f 100644
--- a/source/gameengine/Ketsji/KX_PolygonMaterial.h
+++ b/source/gameengine/Ketsji/KX_PolygonMaterial.h
@@ -57,7 +57,10 @@ private:
MTFace* m_tface;
unsigned int* m_mcol;
Material* m_material;
+
+#ifndef DISABLE_PYTHON
PyObject* m_pymaterial;
+#endif
mutable int m_pass;
public:
@@ -114,6 +117,7 @@ public:
}
virtual void GetMaterialRGBAColor(unsigned char *rgba) const;
+#ifndef DISABLE_PYTHON
KX_PYMETHOD_DOC(KX_PolygonMaterial, updateTexture);
KX_PYMETHOD_DOC(KX_PolygonMaterial, setTexture);
KX_PYMETHOD_DOC(KX_PolygonMaterial, activate);
@@ -133,6 +137,7 @@ public:
static int pyattr_set_diffuse(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
static PyObject* pyattr_get_specular(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
static int pyattr_set_specular(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
+#endif
};
#endif // __KX_POLYGONMATERIAL_H__
diff --git a/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp b/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp
index 04cec3c9106..05513d85fc6 100644
--- a/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp
+++ b/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp
@@ -41,6 +41,8 @@
#include <config.h>
#endif
+#ifndef DISABLE_PYTHON
+
// nasty glob variable to connect scripting language
// if there is a better way (without global), please do so!
static PHY_IPhysicsEnvironment* g_CurrentActivePhysicsEnvironment = NULL;
@@ -661,3 +663,5 @@ PHY_IPhysicsEnvironment* PHY_GetActiveEnvironment()
return g_CurrentActivePhysicsEnvironment;
}
+#endif // DISABLE_PYTHON
+
diff --git a/source/gameengine/Ketsji/KX_PyConstraintBinding.h b/source/gameengine/Ketsji/KX_PyConstraintBinding.h
index b898cba3796..7eb2fe8909c 100644
--- a/source/gameengine/Ketsji/KX_PyConstraintBinding.h
+++ b/source/gameengine/Ketsji/KX_PyConstraintBinding.h
@@ -29,13 +29,15 @@
#ifndef PHY_PYTHON_CONSTRAINTBINDING
#define PHY_PYTHON_CONSTRAINTBINDING
+#ifndef DISABLE_PYTHON
+
#include <Python.h>
PyObject* initPythonConstraintBinding();
void PHY_RemovePythonConstraintBinding();
void PHY_SetActiveEnvironment(class PHY_IPhysicsEnvironment* env);
PHY_IPhysicsEnvironment* PHY_GetActiveEnvironment();
-
+#endif // DISABLE_PYTHON
#endif //PHY_PYTHON_CONSTRAINTBINDING
diff --git a/source/gameengine/Ketsji/KX_PyMath.cpp b/source/gameengine/Ketsji/KX_PyMath.cpp
index a41dab194dd..aef29286f4e 100644
--- a/source/gameengine/Ketsji/KX_PyMath.cpp
+++ b/source/gameengine/Ketsji/KX_PyMath.cpp
@@ -36,6 +36,8 @@
#pragma warning (disable : 4786)
#endif //WIN32
+#ifndef DISABLE_PYTHON
+
#include "MT_Vector3.h"
#include "MT_Vector4.h"
#include "MT_Matrix4x4.h"
@@ -191,3 +193,5 @@ PyObject* PyObjectFrom(const MT_Tuple2 &vec)
return list;
#endif
}
+
+#endif // DISABLE_PYTHON
diff --git a/source/gameengine/Ketsji/KX_PyMath.h b/source/gameengine/Ketsji/KX_PyMath.h
index 1ce8bcafbb6..0ad91799983 100644
--- a/source/gameengine/Ketsji/KX_PyMath.h
+++ b/source/gameengine/Ketsji/KX_PyMath.h
@@ -42,6 +42,7 @@
#include "KX_Python.h"
#include "PyObjectPlus.h"
+#ifndef DISABLE_PYTHON
#ifdef USE_MATHUTILS
extern "C" {
#include "../../blender/python/generic/Mathutils.h" /* so we can have mathutils callbacks */
@@ -237,3 +238,5 @@ PyObject* PyObjectFrom(const MT_Quaternion &qrot);
PyObject* PyObjectFrom(const MT_Tuple4 &pos);
#endif
+
+#endif // DISABLE_PYTHON
diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp
index bef00fb7a06..f09cdd7d720 100644
--- a/source/gameengine/Ketsji/KX_PythonInit.cpp
+++ b/source/gameengine/Ketsji/KX_PythonInit.cpp
@@ -37,12 +37,17 @@
#pragma warning (disable : 4786)
#endif //WIN32
+#ifndef DISABLE_PYTHON
+
extern "C" {
#include "bpy_internal_import.h" /* from the blender python api, but we want to import text too! */
#include "Mathutils.h" // Blender.Mathutils module copied here so the blenderlayer can use.
#include "Geometry.h" // Blender.Geometry module copied here so the blenderlayer can use.
#include "BGL.h"
+
+ #include "marshal.h" /* python header for loading/saving dicts */
}
+#endif
#include "KX_PythonInit.h"
//python physics binding
@@ -89,17 +94,7 @@ extern "C" {
#include "DNA_ID.h"
#include "DNA_scene_types.h"
-
-#include "marshal.h" /* python header for loading/saving dicts */
-
#include "PHY_IPhysicsEnvironment.h"
-// FIXME: Enable for access to blender python modules. This is disabled because
-// python has dependencies on a lot of other modules and is a pain to link.
-//#define USE_BLENDER_PYTHON
-#ifdef USE_BLENDER_PYTHON
-//#include "BPY_extern.h"
-#endif
-
#include "BKE_main.h"
#include "BKE_utildefines.h"
#include "BKE_global.h"
@@ -122,15 +117,34 @@ static KX_KetsjiEngine* gp_KetsjiEngine = NULL;
static RAS_IRasterizer* gp_Rasterizer = NULL;
static char gp_GamePythonPath[FILE_MAXDIR + FILE_MAXFILE] = "";
static char gp_GamePythonPathOrig[FILE_MAXDIR + FILE_MAXFILE] = ""; // not super happy about this, but we need to remember the first loaded file for the global/dict load save
-static PyObject *gp_OrigPythonSysPath= NULL;
-static PyObject *gp_OrigPythonSysModules= NULL;
+void KX_SetActiveScene(class KX_Scene* scene)
+{
+ gp_KetsjiScene = scene;
+}
+
+class KX_Scene* KX_GetActiveScene()
+{
+ return gp_KetsjiScene;
+}
+
+class KX_KetsjiEngine* KX_GetActiveEngine()
+{
+ return gp_KetsjiEngine;
+}
+
+/* why is this in python? */
void KX_RasterizerDrawDebugLine(const MT_Vector3& from,const MT_Vector3& to,const MT_Vector3& color)
{
if (gp_Rasterizer)
gp_Rasterizer->DrawDebugLine(from,to,color);
}
+#ifndef DISABLE_PYTHON
+
+static PyObject *gp_OrigPythonSysPath= NULL;
+static PyObject *gp_OrigPythonSysModules= NULL;
+
/* Macro for building the keyboard translation */
//#define KX_MACRO_addToDict(dict, name) PyDict_SetItemString(dict, #name, PyLong_FromSsize_t(SCA_IInputDevice::KX_##name))
#define KX_MACRO_addToDict(dict, name) PyDict_SetItemString(dict, #name, item=PyLong_FromSsize_t(name)); Py_DECREF(item)
@@ -1259,13 +1273,13 @@ PyObject* initGameLogic(KX_KetsjiEngine *engine, KX_Scene* scene) // quick hack
KX_MACRO_addTypesToDict(d, KX_ACT_ARMATURE_SETWEIGHT, ACT_ARM_SETWEIGHT);
/* BL_Armature Channel rotation_mode */
- KX_MACRO_addTypesToDict(d, PCHAN_ROT_QUAT, PCHAN_ROT_QUAT);
- KX_MACRO_addTypesToDict(d, PCHAN_ROT_XYZ, PCHAN_ROT_XYZ);
- KX_MACRO_addTypesToDict(d, PCHAN_ROT_XZY, PCHAN_ROT_XZY);
- KX_MACRO_addTypesToDict(d, PCHAN_ROT_YXZ, PCHAN_ROT_YXZ);
- KX_MACRO_addTypesToDict(d, PCHAN_ROT_YZX, PCHAN_ROT_YZX);
- KX_MACRO_addTypesToDict(d, PCHAN_ROT_ZXY, PCHAN_ROT_ZXY);
- KX_MACRO_addTypesToDict(d, PCHAN_ROT_ZYX, PCHAN_ROT_ZYX);
+ KX_MACRO_addTypesToDict(d, ROT_MODE_QUAT, ROT_MODE_QUAT);
+ KX_MACRO_addTypesToDict(d, ROT_MODE_XYZ, ROT_MODE_XYZ);
+ KX_MACRO_addTypesToDict(d, ROT_MODE_XZY, ROT_MODE_XZY);
+ KX_MACRO_addTypesToDict(d, ROT_MODE_YXZ, ROT_MODE_YXZ);
+ KX_MACRO_addTypesToDict(d, ROT_MODE_YZX, ROT_MODE_YZX);
+ KX_MACRO_addTypesToDict(d, ROT_MODE_ZXY, ROT_MODE_ZXY);
+ KX_MACRO_addTypesToDict(d, ROT_MODE_ZYX, ROT_MODE_ZYX);
// Check for errors
if (PyErr_Occurred())
@@ -1950,21 +1964,6 @@ PyObject* initBGL()
return BGL_Init();
}
-void KX_SetActiveScene(class KX_Scene* scene)
-{
- gp_KetsjiScene = scene;
-}
-
-class KX_Scene* KX_GetActiveScene()
-{
- return gp_KetsjiScene;
-}
-
-class KX_KetsjiEngine* KX_GetActiveEngine()
-{
- return gp_KetsjiEngine;
-}
-
// utility function for loading and saving the globalDict
int saveGamePythonConfig( char **marshal_buffer)
{
@@ -2065,3 +2064,5 @@ void resetGamePythonPath()
{
gp_GamePythonPathOrig[0] = '\0';
}
+
+#endif // DISABLE_PYTHON
diff --git a/source/gameengine/Ketsji/KX_PythonInit.h b/source/gameengine/Ketsji/KX_PythonInit.h
index 8f102d13a18..ad3cd15ab4a 100644
--- a/source/gameengine/Ketsji/KX_PythonInit.h
+++ b/source/gameengine/Ketsji/KX_PythonInit.h
@@ -39,7 +39,7 @@ typedef enum {
extern bool gUseVisibilityTemp;
-
+#ifndef DISABLE_PYTHON
PyObject* initGameLogic(class KX_KetsjiEngine *engine, class KX_Scene* ketsjiscene);
PyObject* initGameKeys();
PyObject* initRasterizer(class RAS_IRasterizer* rasty,class RAS_ICanvas* canvas);
@@ -57,6 +57,7 @@ void resetGamePythonPath();
void pathGamePythonConfig( char *path );
int saveGamePythonConfig( char **marshal_buffer);
int loadGamePythonConfig(char *marshal_buffer, int marshal_length);
+#endif
class KX_KetsjiEngine;
class KX_Scene;
diff --git a/source/gameengine/Ketsji/KX_PythonInitTypes.cpp b/source/gameengine/Ketsji/KX_PythonInitTypes.cpp
index c2c33918172..dd63163c663 100644
--- a/source/gameengine/Ketsji/KX_PythonInitTypes.cpp
+++ b/source/gameengine/Ketsji/KX_PythonInitTypes.cpp
@@ -32,6 +32,8 @@
#ifndef _adr_py_init_types_h_ // only process once,
#define _adr_py_init_types_h_ // even if multiply included
+#ifndef DISABLE_PYTHON
+
/* Only for Class::Parents */
#include "BL_BlenderShader.h"
#include "BL_ShapeActionActuator.h"
@@ -250,4 +252,6 @@ void initPyTypes(void)
#endif
}
+#endif // DISABLE_PYTHON
+
#endif
diff --git a/source/gameengine/Ketsji/KX_PythonInitTypes.h b/source/gameengine/Ketsji/KX_PythonInitTypes.h
index 6da79be9301..5b368d240f1 100644
--- a/source/gameengine/Ketsji/KX_PythonInitTypes.h
+++ b/source/gameengine/Ketsji/KX_PythonInitTypes.h
@@ -30,6 +30,8 @@
#ifndef _adr_py_init_types_h_ // only process once,
#define _adr_py_init_types_h_ // even if multiply included
+#ifndef DISABLE_PYTHON
void initPyTypes(void);
+#endif
#endif
diff --git a/source/gameengine/Ketsji/KX_PythonSeq.cpp b/source/gameengine/Ketsji/KX_PythonSeq.cpp
index f7ad7acb252..5b7e770f4e6 100644
--- a/source/gameengine/Ketsji/KX_PythonSeq.cpp
+++ b/source/gameengine/Ketsji/KX_PythonSeq.cpp
@@ -28,6 +28,7 @@
* Readonly sequence wrapper for lookups on logic bricks
*/
+#ifndef DISABLE_PYTHON
#include "KX_PythonSeq.h"
#include "KX_GameObject.h"
@@ -508,3 +509,5 @@ PyTypeObject KX_PythonSeq_Type = {
NULL, /* PyObject *tp_weaklist; */
NULL
};
+
+#endif // DISABLE_PYTHON
diff --git a/source/gameengine/Ketsji/KX_PythonSeq.h b/source/gameengine/Ketsji/KX_PythonSeq.h
index 34243aa9b9c..22b968e9362 100644
--- a/source/gameengine/Ketsji/KX_PythonSeq.h
+++ b/source/gameengine/Ketsji/KX_PythonSeq.h
@@ -31,6 +31,8 @@
#ifndef _adr_py_seq_h_ // only process once,
#define _adr_py_seq_h_ // even if multiply included
+#ifndef DISABLE_PYTHON
+
#include "PyObjectPlus.h"
// -------------------------
@@ -59,4 +61,6 @@ typedef struct {
PyObject *KX_PythonSeq_CreatePyObject(PyObject *base, short type);
+#endif // DISABLE_PYTHON
+
#endif // _adr_py_seq_h_
diff --git a/source/gameengine/Ketsji/KX_RadarSensor.cpp b/source/gameengine/Ketsji/KX_RadarSensor.cpp
index eb127be8044..de5c0533ad3 100644
--- a/source/gameengine/Ketsji/KX_RadarSensor.cpp
+++ b/source/gameengine/Ketsji/KX_RadarSensor.cpp
@@ -176,7 +176,7 @@ void KX_RadarSensor::SynchronizeTransform()
/* Python Functions */
/* ------------------------------------------------------------------------- */
-/* none */
+#ifndef DISABLE_PYTHON
/* ------------------------------------------------------------------------- */
/* Python Integration Hooks */
@@ -216,3 +216,4 @@ PyAttributeDef KX_RadarSensor::Attributes[] = {
{NULL} //Sentinel
};
+#endif // DISABLE_PYTHON
diff --git a/source/gameengine/Ketsji/KX_RayEventManager.h b/source/gameengine/Ketsji/KX_RayEventManager.h
index 030dae525e1..589a3f37d50 100644
--- a/source/gameengine/Ketsji/KX_RayEventManager.h
+++ b/source/gameengine/Ketsji/KX_RayEventManager.h
@@ -37,8 +37,6 @@ using namespace std;
class KX_RayEventManager : public SCA_EventManager
{
-
- class SCA_LogicManager* m_logicmgr;
public:
KX_RayEventManager(class SCA_LogicManager* logicmgr)
: SCA_EventManager(logicmgr, RAY_EVENTMGR)
diff --git a/source/gameengine/Ketsji/KX_RaySensor.cpp b/source/gameengine/Ketsji/KX_RaySensor.cpp
index 1f36945ccaa..4902315fd47 100644
--- a/source/gameengine/Ketsji/KX_RaySensor.cpp
+++ b/source/gameengine/Ketsji/KX_RaySensor.cpp
@@ -43,6 +43,8 @@
#include "KX_IPhysicsController.h"
#include "PHY_IPhysicsController.h"
+#include <stdio.h>
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -311,7 +313,7 @@ bool KX_RaySensor::Evaluate()
return result;
}
-
+#ifndef DISABLE_PYTHON
/* ------------------------------------------------------------------------- */
/* Python functions */
@@ -366,3 +368,5 @@ PyObject* KX_RaySensor::pyattr_get_hitobject(void *self_v, const KX_PYATTRIBUTE_
Py_RETURN_NONE;
}
+
+#endif // DISABLE_PYTHON
diff --git a/source/gameengine/Ketsji/KX_RaySensor.h b/source/gameengine/Ketsji/KX_RaySensor.h
index d3e92a14214..39b447b5657 100644
--- a/source/gameengine/Ketsji/KX_RaySensor.h
+++ b/source/gameengine/Ketsji/KX_RaySensor.h
@@ -84,10 +84,13 @@ public:
KX_RAY_AXIS_NEG_Z
};
+#ifndef DISABLE_PYTHON
/* Attributes */
static PyObject* pyattr_get_hitobject(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
+#endif // DISABLE_PYTHON
+
};
#endif //__KX_RAYSENSOR_H
diff --git a/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp b/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp
index c1e74070d72..fb96834c836 100644
--- a/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp
+++ b/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp
@@ -163,6 +163,7 @@ void KX_SCA_AddObjectActuator::Relink(GEN_Map<GEN_HashedPtr, void*> *obj_map)
}
}
+#ifndef DISABLE_PYTHON
/* ------------------------------------------------------------------------- */
/* Python functions */
@@ -242,6 +243,14 @@ PyObject* KX_SCA_AddObjectActuator::pyattr_get_objectLastCreated(void *self, con
return actuator->m_lastCreatedObject->GetProxy();
}
+PyObject* KX_SCA_AddObjectActuator::PyInstantAddObject()
+{
+ InstantAddObject();
+
+ Py_RETURN_NONE;
+}
+
+#endif // DISABLE_PYTHON
void KX_SCA_AddObjectActuator::InstantAddObject()
{
@@ -277,10 +286,3 @@ void KX_SCA_AddObjectActuator::InstantAddObject()
replica->Release();
}
}
-
-PyObject* KX_SCA_AddObjectActuator::PyInstantAddObject()
-{
- InstantAddObject();
-
- Py_RETURN_NONE;
-}
diff --git a/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.h b/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.h
index 7137ba5209e..4cccc406b58 100644
--- a/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.h
+++ b/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.h
@@ -115,12 +115,16 @@ public:
void InstantAddObject();
+#ifndef DISABLE_PYTHON
+
KX_PYMETHOD_DOC_NOARGS(KX_SCA_AddObjectActuator,InstantAddObject);
static PyObject* pyattr_get_object(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
static int pyattr_set_object(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
static PyObject* pyattr_get_objectLastCreated(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
+#endif // DISABLE_PYTHON
+
}; /* end of class KX_SCA_AddObjectActuator : public KX_EditObjectActuator */
#endif
diff --git a/source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp b/source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp
index 73c85ad07b3..07a0df8bf77 100644
--- a/source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp
+++ b/source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp
@@ -41,6 +41,8 @@
#include <config.h>
#endif
+#ifndef DISABLE_PYTHON
+
/* ------------------------------------------------------------------------- */
/* Python functions */
/* ------------------------------------------------------------------------- */
@@ -79,6 +81,8 @@ PyAttributeDef KX_SCA_DynamicActuator::Attributes[] = {
{ NULL } //Sentinel
};
+#endif // DISABLE_PYTHON
+
/* ------------------------------------------------------------------------- */
/* Native functions */
/* ------------------------------------------------------------------------- */
diff --git a/source/gameengine/Ketsji/KX_SCA_EndObjectActuator.cpp b/source/gameengine/Ketsji/KX_SCA_EndObjectActuator.cpp
index e7dc71d9b27..b37ea4d57c0 100644
--- a/source/gameengine/Ketsji/KX_SCA_EndObjectActuator.cpp
+++ b/source/gameengine/Ketsji/KX_SCA_EndObjectActuator.cpp
@@ -84,7 +84,7 @@ CValue* KX_SCA_EndObjectActuator::GetReplica()
return replica;
};
-
+#ifndef DISABLE_PYTHON
/* ------------------------------------------------------------------------- */
/* Python functions : integration hooks */
@@ -120,4 +120,6 @@ PyAttributeDef KX_SCA_EndObjectActuator::Attributes[] = {
{ NULL } //Sentinel
};
+#endif // DISABLE_PYTHON
+
/* eof */
diff --git a/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.cpp b/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.cpp
index e118972edc8..967bbfcdf1d 100644
--- a/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.cpp
+++ b/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.cpp
@@ -44,6 +44,8 @@
#include <config.h>
#endif
+#ifndef DISABLE_PYTHON
+
/* ------------------------------------------------------------------------- */
/* Python functions */
/* ------------------------------------------------------------------------- */
@@ -112,6 +114,8 @@ KX_PYMETHODDEF_DOC(KX_SCA_ReplaceMeshActuator, instantReplaceMesh,
Py_RETURN_NONE;
}
+#endif // DISABLE_PYTHON
+
/* ------------------------------------------------------------------------- */
/* Native functions */
/* ------------------------------------------------------------------------- */
diff --git a/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.h b/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.h
index e5482c29aa7..47c823afa9f 100644
--- a/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.h
+++ b/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.h
@@ -74,6 +74,8 @@ class KX_SCA_ReplaceMeshActuator : public SCA_IActuator
void InstantReplaceMesh();
+#ifndef DISABLE_PYTHON
+
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
@@ -83,6 +85,8 @@ class KX_SCA_ReplaceMeshActuator : public SCA_IActuator
KX_PYMETHOD_DOC(KX_SCA_ReplaceMeshActuator,instantReplaceMesh);
+#endif // DISABLE_PYTHON
+
};
#endif
diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp
index 140be3fb3db..c93ead74182 100644
--- a/source/gameengine/Ketsji/KX_Scene.cpp
+++ b/source/gameengine/Ketsji/KX_Scene.cpp
@@ -94,6 +94,8 @@
#include "KX_Light.h"
+#include <stdio.h>
+
void* KX_SceneReplicationFunc(SG_IObject* node,void* gameobj,void* scene)
{
KX_GameObject* replica = ((KX_Scene*)scene)->AddNodeReplicaObject(node,(KX_GameObject*)gameobj);
@@ -207,7 +209,9 @@ KX_Scene::KX_Scene(class SCA_IInputDevice* keyboarddevice,
m_bucketmanager=new RAS_BucketManager();
+#ifndef DISABLE_PYTHON
m_attr_dict = PyDict_New(); /* new ref */
+#endif
}
@@ -256,8 +260,11 @@ KX_Scene::~KX_Scene()
{
delete m_bucketmanager;
}
+
+#ifndef DISABLE_PYTHON
PyDict_Clear(m_attr_dict);
Py_DECREF(m_attr_dict);
+#endif
}
RAS_BucketManager* KX_Scene::GetBucketManager()
@@ -470,7 +477,7 @@ KX_GameObject* KX_Scene::AddNodeReplicaObject(class SG_IObject* node, class CVal
// this is the list of object that are send to the graphics pipeline
m_objectlist->Add(newobj->AddRef());
- if (newobj->IsLight())
+ if (newobj->GetGameObjectType()==SCA_IObject::OBJ_LIGHT)
m_lightlist->Add(newobj->AddRef());
newobj->AddMeshUser();
@@ -746,7 +753,7 @@ void KX_Scene::DupliGroupRecurse(CValue* obj, int level)
// add the object in the layer of the parent
(*git)->SetLayer(groupobj->GetLayer());
// If the object was a light, we need to update it's RAS_LightObject as well
- if ((*git)->IsLight())
+ if ((*git)->GetGameObjectType()==SCA_IObject::OBJ_LIGHT)
{
KX_LightObject* lightobj = static_cast<KX_LightObject*>(*git);
lightobj->GetLightData()->m_layer = groupobj->GetLayer();
@@ -854,7 +861,7 @@ SCA_IObject* KX_Scene::AddReplicaObject(class CValue* originalobject,
// add the object in the layer of the parent
(*git)->SetLayer(parentobj->GetLayer());
// If the object was a light, we need to update it's RAS_LightObject as well
- if ((*git)->IsLight())
+ if ((*git)->GetGameObjectType()==SCA_IObject::OBJ_LIGHT)
{
KX_LightObject* lightobj = static_cast<KX_LightObject*>(*git);
lightobj->GetLightData()->m_layer = parentobj->GetLayer();
@@ -975,7 +982,7 @@ int KX_Scene::NewRemoveObject(class CValue* gameobj)
newobj->RemoveMeshes();
ret = 1;
- if (newobj->IsLight() && m_lightlist->RemoveValue(newobj))
+ if (newobj->GetGameObjectType()==SCA_IObject::OBJ_LIGHT && m_lightlist->RemoveValue(newobj))
ret = newobj->Release();
if (m_objectlist->RemoveValue(newobj))
ret = newobj->Release();
@@ -1604,6 +1611,8 @@ double KX_Scene::getSuspendedDelta()
return m_suspendeddelta;
}
+#ifndef DISABLE_PYTHON
+
//----------------------------------------------------------------------------
//Python
@@ -1867,3 +1876,5 @@ KX_PYMETHODDEF_DOC(KX_Scene, get, "")
Py_INCREF(def);
return def;
}
+
+#endif // DISABLE_PYTHON
diff --git a/source/gameengine/Ketsji/KX_Scene.h b/source/gameengine/Ketsji/KX_Scene.h
index 3e0dc303d72..da72ba2ec98 100644
--- a/source/gameengine/Ketsji/KX_Scene.h
+++ b/source/gameengine/Ketsji/KX_Scene.h
@@ -90,7 +90,10 @@ struct KX_ClientObjectInfo;
class KX_Scene : public PyObjectPlus, public SCA_IScene
{
Py_Header;
+
+#ifndef DISABLE_PYTHON
PyObject* m_attr_dict;
+#endif
struct CullingInfo {
int m_layer;
@@ -517,6 +520,7 @@ public:
*/
void SetNodeTree(SG_Tree* root);
+#ifndef DISABLE_PYTHON
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
@@ -539,6 +543,8 @@ public:
static PyMappingMethods Mapping;
static PySequenceMethods Sequence;
+#endif
+
/**
* Sets the time the scene was suspended
*/
diff --git a/source/gameengine/Ketsji/KX_SceneActuator.cpp b/source/gameengine/Ketsji/KX_SceneActuator.cpp
index c7721c480e0..e0b6ab1a34c 100644
--- a/source/gameengine/Ketsji/KX_SceneActuator.cpp
+++ b/source/gameengine/Ketsji/KX_SceneActuator.cpp
@@ -214,7 +214,7 @@ KX_Scene* KX_SceneActuator::FindScene(char * sceneName)
}
-
+#ifndef DISABLE_PYTHON
/* ------------------------------------------------------------------------- */
/* Python functions */
@@ -287,4 +287,6 @@ int KX_SceneActuator::pyattr_set_camera(void *self, const struct KX_PYATTRIBUTE_
return PY_SET_ATTR_SUCCESS;
}
+#endif // DISABLE_PYTHON
+
/* eof */
diff --git a/source/gameengine/Ketsji/KX_SceneActuator.h b/source/gameengine/Ketsji/KX_SceneActuator.h
index e979a8ce559..e11a94798c9 100644
--- a/source/gameengine/Ketsji/KX_SceneActuator.h
+++ b/source/gameengine/Ketsji/KX_SceneActuator.h
@@ -87,6 +87,8 @@ class KX_SceneActuator : public SCA_IActuator
virtual bool Update();
+#ifndef DISABLE_PYTHON
+
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
@@ -94,6 +96,8 @@ class KX_SceneActuator : public SCA_IActuator
static PyObject* pyattr_get_camera(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
static int pyattr_set_camera(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
+#endif // DISABLE_PYTHON
+
}; /* end of class KXSceneActuator */
#endif
diff --git a/source/gameengine/Ketsji/KX_SoundActuator.cpp b/source/gameengine/Ketsji/KX_SoundActuator.cpp
index 9d261137497..c97b4618f28 100644
--- a/source/gameengine/Ketsji/KX_SoundActuator.cpp
+++ b/source/gameengine/Ketsji/KX_SoundActuator.cpp
@@ -264,7 +264,7 @@ bool KX_SoundActuator::Update(double curtime, bool frame)
}
-
+#ifndef DISABLE_PYTHON
/* ------------------------------------------------------------------------- */
/* Python functions */
@@ -416,3 +416,5 @@ int KX_SoundActuator::pyattr_set_rollOffFactor(void *self, const struct KX_PYATT
return PY_SET_ATTR_SUCCESS;
}
+
+#endif // DISABLE_PYTHON
diff --git a/source/gameengine/Ketsji/KX_SoundActuator.h b/source/gameengine/Ketsji/KX_SoundActuator.h
index 43198f1a253..de862473aac 100644
--- a/source/gameengine/Ketsji/KX_SoundActuator.h
+++ b/source/gameengine/Ketsji/KX_SoundActuator.h
@@ -93,6 +93,8 @@ public:
CValue* GetReplica();
void ProcessReplica();
+#ifndef DISABLE_PYTHON
+
/* -------------------------------------------------------------------- */
/* Python interface --------------------------------------------------- */
/* -------------------------------------------------------------------- */
@@ -110,6 +112,9 @@ public:
static PyObject* pyattr_get_pitch(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
static PyObject* pyattr_get_rollOffFactor(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
static PyObject* pyattr_get_type(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
+
+#endif // DISABLE_PYTHON
+
};
#endif //__KX_SOUNDACTUATOR
diff --git a/source/gameengine/Ketsji/KX_StateActuator.cpp b/source/gameengine/Ketsji/KX_StateActuator.cpp
index 60812220953..21ed087a3c1 100644
--- a/source/gameengine/Ketsji/KX_StateActuator.cpp
+++ b/source/gameengine/Ketsji/KX_StateActuator.cpp
@@ -128,6 +128,7 @@ void KX_StateActuator::Activate(SG_DList& head)
}
}
+#ifndef DISABLE_PYTHON
/* ------------------------------------------------------------------------- */
/* Python functions */
@@ -167,3 +168,5 @@ PyAttributeDef KX_StateActuator::Attributes[] = {
KX_PYATTRIBUTE_INT_RW("mask",0,0x3FFFFFFF,false,KX_StateActuator,m_mask),
{ NULL } //Sentinel
};
+
+#endif // DISABLE_PYTHON
diff --git a/source/gameengine/Ketsji/KX_TouchSensor.cpp b/source/gameengine/Ketsji/KX_TouchSensor.cpp
index cde67787e2f..2ce5b8d1496 100644
--- a/source/gameengine/Ketsji/KX_TouchSensor.cpp
+++ b/source/gameengine/Ketsji/KX_TouchSensor.cpp
@@ -287,6 +287,7 @@ bool KX_TouchSensor::NewHandleCollision(void*object1,void*object2,const PHY_Coll
return false; // was DT_CONTINUE but this was defined in sumo as false.
}
+#ifndef DISABLE_PYTHON
/* ------------------------------------------------------------------------- */
/* Python functions */
@@ -345,5 +346,6 @@ PyObject* KX_TouchSensor::pyattr_get_object_hit_list(void *self_v, const KX_PYAT
return self->m_colliders->GetProxy();
}
+#endif
/* eof */
diff --git a/source/gameengine/Ketsji/KX_TouchSensor.h b/source/gameengine/Ketsji/KX_TouchSensor.h
index ad1830e05c9..ae5b68da845 100644
--- a/source/gameengine/Ketsji/KX_TouchSensor.h
+++ b/source/gameengine/Ketsji/KX_TouchSensor.h
@@ -116,13 +116,16 @@ public:
// todo: put some info for collision maybe
+#ifndef DISABLE_PYTHON
+
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
static PyObject* pyattr_get_object_hit(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
static PyObject* pyattr_get_object_hit_list(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
-
+
+#endif
};
diff --git a/source/gameengine/Ketsji/KX_TrackToActuator.cpp b/source/gameengine/Ketsji/KX_TrackToActuator.cpp
index ace1cf8a6f4..01c7244b9d0 100644
--- a/source/gameengine/Ketsji/KX_TrackToActuator.cpp
+++ b/source/gameengine/Ketsji/KX_TrackToActuator.cpp
@@ -421,14 +421,12 @@ bool KX_TrackToActuator::Update(double curtime, bool frame)
return result;
}
-
+#ifndef DISABLE_PYTHON
/* ------------------------------------------------------------------------- */
/* Python functions */
/* ------------------------------------------------------------------------- */
-
-
/* Integration hooks ------------------------------------------------------- */
PyTypeObject KX_TrackToActuator::Type = {
PyVarObject_HEAD_INIT(NULL, 0)
@@ -492,4 +490,6 @@ int KX_TrackToActuator::pyattr_set_object(void *self, const struct KX_PYATTRIBUT
return PY_SET_ATTR_SUCCESS;
}
+#endif // DISABLE_PYTHON
+
/* eof */
diff --git a/source/gameengine/Ketsji/KX_TrackToActuator.h b/source/gameengine/Ketsji/KX_TrackToActuator.h
index bbfc1d17576..880c3712e1f 100644
--- a/source/gameengine/Ketsji/KX_TrackToActuator.h
+++ b/source/gameengine/Ketsji/KX_TrackToActuator.h
@@ -69,12 +69,16 @@ class KX_TrackToActuator : public SCA_IActuator
virtual void Relink(GEN_Map<GEN_HashedPtr, void*> *obj_map);
virtual bool Update(double curtime, bool frame);
+#ifndef DISABLE_PYTHON
+
/* Python part */
/* These are used to get and set m_ob */
static PyObject* pyattr_get_object(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
static int pyattr_set_object(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
+#endif // DISABLE_PYTHON
+
}; /* end of class KX_TrackToActuator : public KX_EditObjectActuator */
#endif
diff --git a/source/gameengine/Ketsji/KX_VehicleWrapper.cpp b/source/gameengine/Ketsji/KX_VehicleWrapper.cpp
index 1f46cbf53be..4adeefe32b4 100644
--- a/source/gameengine/Ketsji/KX_VehicleWrapper.cpp
+++ b/source/gameengine/Ketsji/KX_VehicleWrapper.cpp
@@ -1,6 +1,5 @@
-#include <Python.h>
#include "PyObjectPlus.h"
#include "KX_VehicleWrapper.h"
@@ -34,6 +33,7 @@ KX_VehicleWrapper::~KX_VehicleWrapper()
m_motionStates.clear();
}
+#ifndef DISABLE_PYTHON
PyObject* KX_VehicleWrapper::PyAddWheel(PyObject* args)
{
@@ -322,3 +322,5 @@ PyMethodDef KX_VehicleWrapper::Methods[] = {
PyAttributeDef KX_VehicleWrapper::Attributes[] = {
{ NULL } //Sentinel
};
+
+#endif // DISABLE_PYTHON
diff --git a/source/gameengine/Ketsji/KX_VehicleWrapper.h b/source/gameengine/Ketsji/KX_VehicleWrapper.h
index d7f2da5cd7c..2ca06da18fc 100644
--- a/source/gameengine/Ketsji/KX_VehicleWrapper.h
+++ b/source/gameengine/Ketsji/KX_VehicleWrapper.h
@@ -20,6 +20,7 @@ public:
virtual ~KX_VehicleWrapper ();
int getConstraintId();
+#ifndef DISABLE_PYTHON
KX_PYMETHOD_VARARGS(KX_VehicleWrapper,AddWheel);
KX_PYMETHOD_VARARGS(KX_VehicleWrapper,GetNumWheels);
@@ -46,7 +47,7 @@ public:
KX_PYMETHOD_VARARGS(KX_VehicleWrapper,SetSuspensionCompression);
KX_PYMETHOD_VARARGS(KX_VehicleWrapper,SetRollInfluence);
-
+#endif // DISABLE_PYTHON
private:
PHY_IVehicle* m_vehicle;
diff --git a/source/gameengine/Ketsji/KX_VertexProxy.cpp b/source/gameengine/Ketsji/KX_VertexProxy.cpp
index 6a47dec181b..62ae502cd39 100644
--- a/source/gameengine/Ketsji/KX_VertexProxy.cpp
+++ b/source/gameengine/Ketsji/KX_VertexProxy.cpp
@@ -26,6 +26,8 @@
* ***** END GPL LICENSE BLOCK *****
*/
+#ifndef DISABLE_PYTHON
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -442,3 +444,5 @@ PyObject* KX_VertexProxy::PySetUV2(PyObject* args)
m_mesh->SetMeshModified(true);
Py_RETURN_NONE;
}
+
+#endif // DISABLE_PYTHON
diff --git a/source/gameengine/Ketsji/KX_VertexProxy.h b/source/gameengine/Ketsji/KX_VertexProxy.h
index 13c57e9f556..77ca0ad853a 100644
--- a/source/gameengine/Ketsji/KX_VertexProxy.h
+++ b/source/gameengine/Ketsji/KX_VertexProxy.h
@@ -29,6 +29,8 @@
#ifndef __KX_VERTEXPROXY
#define __KX_VERTEXPROXY
+#ifndef DISABLE_PYTHON
+
#include "SCA_IObject.h"
class KX_VertexProxy : public CValue
@@ -69,5 +71,7 @@ public:
};
+#endif // DISABLE_PYTHON
+
#endif //__KX_VERTEXPROXY
diff --git a/source/gameengine/Ketsji/KX_VisibilityActuator.cpp b/source/gameengine/Ketsji/KX_VisibilityActuator.cpp
index 5b0f6e6e9f2..8154c87ab42 100644
--- a/source/gameengine/Ketsji/KX_VisibilityActuator.cpp
+++ b/source/gameengine/Ketsji/KX_VisibilityActuator.cpp
@@ -83,6 +83,8 @@ KX_VisibilityActuator::Update()
return false;
}
+#ifndef DISABLE_PYTHON
+
/* ------------------------------------------------------------------------- */
/* Python functions */
/* ------------------------------------------------------------------------- */
@@ -122,3 +124,5 @@ PyAttributeDef KX_VisibilityActuator::Attributes[] = {
KX_PYATTRIBUTE_BOOL_RW("useRecursion", KX_VisibilityActuator, m_recursive),
{ NULL } //Sentinel
};
+
+#endif // DISABLE_PYTHON
diff --git a/source/gameengine/Ketsji/SConscript b/source/gameengine/Ketsji/SConscript
index b20da20d0e2..69d146776db 100644
--- a/source/gameengine/Ketsji/SConscript
+++ b/source/gameengine/Ketsji/SConscript
@@ -20,7 +20,6 @@ incs += ' #source/gameengine/SceneGraph #source/gameengine/Physics/common #sourc
incs += ' #source/gameengine/Physics/Dummy'
incs += ' #source/blender/misc #source/blender/blenloader #extern/glew/include #source/blender/gpu'
-incs += ' ' + env['BF_PYTHON_INC']
incs += ' ' + env['BF_BULLET_INC']
incs += ' ' + env['BF_OPENGL_INC']
@@ -28,6 +27,11 @@ if env['WITH_BF_SDL']:
incs += ' ' + env['BF_SDL_INC']
else:
defs.append('DISABLE_SDL')
+
+if env['WITH_BF_PYTHON']:
+ incs += ' ' + env['BF_PYTHON_INC']
+else:
+ defs.append('DISABLE_PYTHON')
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc', 'win32-mingw'):
if env['BF_DEBUG']:
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
index df8dc3560ac..b7d0dd2f6e7 100644
--- a/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
+++ b/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
@@ -593,7 +593,7 @@ bool CcdPhysicsController::ReplaceControllerShape(btCollisionShape *newShape)
for(int i= 0; i < obarr.size(); i++) {
ob= obarr[i];
if (ob->getCollisionShape() == newShape); {
- proxy = obarr[i]->getBroadphaseHandle();
+ proxy = ob->getBroadphaseHandle();
if(proxy)
dw->getPairCache()->cleanProxyFromPairs(proxy,dw->getDispatcher());
diff --git a/source/gameengine/Physics/Bullet/SConscript b/source/gameengine/Physics/Bullet/SConscript
index 49f2af1b001..976c6825351 100644
--- a/source/gameengine/Physics/Bullet/SConscript
+++ b/source/gameengine/Physics/Bullet/SConscript
@@ -19,6 +19,12 @@ incs += ' #source/blender/blenlib'
incs += ' #intern/guardedalloc'
incs += ' ' + env['BF_BULLET_INC']
-incs += ' ' + env['BF_PYTHON_INC']
-env.BlenderLib ( 'bf_bullet', Split(sources), Split(incs), [], libtype=['core','player'], priority=[350,50], cxx_compileflags=env['BGE_CXXFLAGS'])
+defs = []
+
+if env['WITH_BF_PYTHON']:
+ incs += ' ' + env['BF_PYTHON_INC']
+else:
+ defs.append('DISABLE_PYTHON')
+
+env.BlenderLib ( 'bf_bullet', Split(sources), Split(incs), defs, libtype=['core','player'], priority=[350,50], cxx_compileflags=env['BGE_CXXFLAGS'])
diff --git a/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp b/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp
index 239031866ca..75d80f4b3d5 100644
--- a/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp
+++ b/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp
@@ -49,6 +49,8 @@
#include "GL/glew.h"
+#include <stdio.h>
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
diff --git a/source/gameengine/Rasterizer/SConscript b/source/gameengine/Rasterizer/SConscript
index dbec2d92e31..ea99fa966d8 100644
--- a/source/gameengine/Rasterizer/SConscript
+++ b/source/gameengine/Rasterizer/SConscript
@@ -5,6 +5,12 @@ sources = env.Glob('*.cpp')
incs = '. #source/kernel/gen_system #intern/string #intern/moto/include #source/gameengine/BlenderRoutines #extern/glew/include #source/gameengine/Expressions #source/gameengine/SceneGraph #source/blender/blenkernel #source/blender/makesdna'
-incs += ' ' + env['BF_PYTHON_INC']
-env.BlenderLib ( 'bf_rasterizer', sources, Split(incs), [], libtype=['core','player'], priority=[350,70], cxx_compileflags=env['BGE_CXXFLAGS'])
+defs = []
+
+if env['WITH_BF_PYTHON']:
+ incs += ' ' + env['BF_PYTHON_INC']
+else:
+ defs.append('DISABLE_PYTHON')
+
+env.BlenderLib ( 'bf_rasterizer', sources, Split(incs), defs, libtype=['core','player'], priority=[350,70], cxx_compileflags=env['BGE_CXXFLAGS'])
diff --git a/source/gameengine/SConscript b/source/gameengine/SConscript
index 592b138583f..e7c9328688f 100644
--- a/source/gameengine/SConscript
+++ b/source/gameengine/SConscript
@@ -14,9 +14,11 @@ SConscript(['BlenderRoutines/SConscript',
'Rasterizer/SConscript',
'Rasterizer/RAS_OpenGLRasterizer/SConscript',
'SceneGraph/SConscript',
- 'Physics/Bullet/SConscript',
- 'VideoTexture/SConscript'
+ 'Physics/Bullet/SConscript'
])
+if env['WITH_BF_PYTHON']:
+ SConscript(['VideoTexture/SConscript'])
+
if env['WITH_BF_PLAYER']:
SConscript(['GamePlayer/SConscript'])
diff --git a/source/gameengine/VideoTexture/CMakeLists.txt b/source/gameengine/VideoTexture/CMakeLists.txt
index 935c5a2c292..d914783cff3 100644
--- a/source/gameengine/VideoTexture/CMakeLists.txt
+++ b/source/gameengine/VideoTexture/CMakeLists.txt
@@ -48,7 +48,6 @@ SET(INC
../../../intern/moto/include
../../../intern/guardedalloc
../../../extern/glew/include
- ${PYTHON_INC}
)
IF(WITH_FFMPEG)
@@ -57,5 +56,11 @@ IF(WITH_FFMPEG)
ADD_DEFINITIONS(-D__STDC_CONSTANT_MACROS)
ENDIF(WITH_FFMPEG)
+IF(WITH_PYTHON)
+ SET(INC ${INC} ${PYTHON_INC})
+ELSE(WITH_PYTHON)
+ ADD_DEFINITIONS(-DDISABLE_PYTHON)
+ENDIF(WITH_PYTHON)
+
BLENDERLIB(bf_videotex "${SRC}" "${INC}")
#env.BlenderLib ( 'bf_videotex', sources, Split(incs), [], libtype=['game','player'], priority=[25, 72], compileflags = cflags )
diff --git a/source/gameengine/VideoTexture/SConscript b/source/gameengine/VideoTexture/SConscript
index dac0b6d32ab..b6b60c593ed 100644
--- a/source/gameengine/VideoTexture/SConscript
+++ b/source/gameengine/VideoTexture/SConscript
@@ -19,7 +19,10 @@ if env['OURPLATFORM'] in ('win32-vc', 'win64-vc','win32-mingw'):
if env['BF_DEBUG']:
defs.append('_DEBUG')
-incs += ' ' + env['BF_PYTHON_INC']
+if env['WITH_BF_PYTHON']:
+ incs += ' ' + env['BF_PYTHON_INC']
+else:
+ defs.append('DISABLE_PYTHON')
if env['WITH_BF_FFMPEG']:
defs.append('WITH_FFMPEG')
diff --git a/source/gameengine/VideoTexture/VideoFFmpeg.h b/source/gameengine/VideoTexture/VideoFFmpeg.h
index fbd04e7e1fc..b56984588c1 100644
--- a/source/gameengine/VideoTexture/VideoFFmpeg.h
+++ b/source/gameengine/VideoTexture/VideoFFmpeg.h
@@ -24,6 +24,7 @@ http://www.gnu.org/copyleft/lesser.txt.
#ifdef WITH_FFMPEG
extern "C" {
+#undef __cplusplus
#include <pthread.h>
#include <libavformat/avformat.h>
#include <libavcodec/avcodec.h>
@@ -32,6 +33,7 @@ extern "C" {
#include "DNA_listBase.h"
#include "BLI_threads.h"
#include "BLI_blenlib.h"
+#define __cplusplus
}
diff --git a/tools/Blender.py b/tools/Blender.py
index 1b0573cfda4..04f2676deb3 100644
--- a/tools/Blender.py
+++ b/tools/Blender.py
@@ -327,6 +327,59 @@ def set_quiet_output(env):
env['BUILDERS']['Library'] = static_lib
env['BUILDERS']['Program'] = program
+
+def unzip_pybundle(from_zip,to_dir,exclude_re):
+ import zipfile
+
+ zip= zipfile.ZipFile(from_zip, mode='r')
+ exclude_re= list(exclude_re) #single re object or list of re objects
+ debug= 0 #list files instead of unpacking
+ good= []
+ if debug: print '\nFiles not being unpacked:\n'
+ for name in zip.namelist():
+ is_bad= 0
+ for r in exclude_re:
+ if r.match(name):
+ is_bad=1
+ if debug: print name
+ break
+ if not is_bad:
+ good.append(name)
+ if debug:
+ print '\nFiles being unpacked:\n'
+ for g in good:
+ print g
+ else:
+ zip.extractall(to_dir, good)
+
+def my_winpybundle_print(target, source, env):
+ pass
+
+def WinPyBundle(target=None, source=None, env=None):
+ import shutil, re
+ py_zip= env.subst( env['LCGDIR'] )
+ if py_zip[0]=='#':
+ py_zip= py_zip[1:]
+ py_zip+= '/release/python' + env['BF_PYTHON_VERSION'].replace('.','') + '.zip'
+
+ py_target = env.subst( env['BF_INSTALLDIR'] )
+ if py_target[0]=='#':
+ py_target=py_target[1:]
+ py_target+= '/.blender/python/lib/'
+ def printexception(func,path,ex):
+ if os.path.exists(path): #do not report if path does not exist. eg on a fresh build.
+ print str(func) + ' failed on ' + str(path)
+ print "Trying to remove existing py bundle."
+ shutil.rmtree(py_target, False, printexception)
+ exclude_re=[re.compile('.*/test/.*'),
+ re.compile('^config/.*'),
+ re.compile('^distutils/.*'),
+ re.compile('^idlelib/.*'),
+ re.compile('^lib2to3/.*'),
+ re.compile('^tkinter/.*')]
+ print "Unpacking '" + py_zip + "' to '" + py_target + "'"
+ unzip_pybundle(py_zip,py_target,exclude_re)
+
def my_appit_print(target, source, env):
a = '%s' % (target[0])
d, f = os.path.split(a)
@@ -392,10 +445,10 @@ def AppIt(target=None, source=None, env=None):
# extract copy system python, be sure to update other build systems
# when making changes to the files that are copied.
-def my_pyinst_print(target, source, env):
+def my_unixpybundle_print(target, source, env):
pass
-def PyInstall(target=None, source=None, env=None):
+def UnixPyBundle(target=None, source=None, env=None):
# Any Unix except osx
#-- .blender/python/lib/python3.1
@@ -522,6 +575,9 @@ class BlenderEnvironment(SConsEnvironment):
lenv.Append(CCFLAGS = lenv['CC_WARN'])
lenv.Append(CXXFLAGS = lenv['CXX_WARN'])
+ if lenv['OURPLATFORM'] == 'win64-vc':
+ lenv.Append(LINKFLAGS = ['/MACHINE:X64'])
+
if lenv['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
if lenv['BF_DEBUG']:
lenv.Append(CCFLAGS = ['/MTd'])
@@ -602,8 +658,11 @@ class BlenderEnvironment(SConsEnvironment):
elif os.sep == '/': # any unix
if lenv['WITH_BF_PYTHON']:
if not lenv['WITHOUT_BF_INSTALL'] and not lenv['WITHOUT_BF_PYTHON_INSTALL']:
- lenv.AddPostAction(prog,Action(PyInstall,strfunction=my_pyinst_print))
-
+ lenv.AddPostAction(prog,Action(UnixPyBundle,strfunction=my_unixpybundle_print))
+ elif lenv['OURPLATFORM'].startswith('win'): # windows
+ if lenv['WITH_BF_PYTHON']:
+ if not lenv['WITHOUT_BF_PYTHON_INSTALL']:
+ lenv.AddPostAction(prog,Action(WinPyBundle,strfunction=my_winpybundle_print))
return prog
def Glob(lenv, pattern):