svn merge -r 19958:20307 https://svn.blender.org/svnroot/bf-blender/trunk/blender
authorBenoit Bolsee <benoit.bolsee@online.be>
Wed, 20 May 2009 21:32:56 +0000 (21:32 +0000)
committerBenoit Bolsee <benoit.bolsee@online.be>
Wed, 20 May 2009 21:32:56 +0000 (21:32 +0000)
489 files changed:
CMake/macros.cmake
CMakeLists.txt
config/irix6-config.py
config/linux2-config.py
extern/CMakeLists.txt
extern/bullet2/src/CMakeLists.txt
extern/verse/CMakeLists.txt
extern/verse/dist/CMakeLists.txt
intern/CMakeLists.txt
intern/SoundSystem/openal/SND_OpenALDevice.cpp
intern/ghost/intern/GHOST_SystemCarbon.cpp
intern/ghost/intern/GHOST_SystemCarbon.h
intern/ghost/intern/GHOST_SystemWin32.cpp
intern/ghost/intern/GHOST_SystemX11.cpp
intern/ghost/intern/GHOST_SystemX11.h
projectfiles_vc9/gameengine/expression/EXP_expressions.vcproj
projectfiles_vc9/gameengine/gamelogic/SCA_GameLogic.vcproj
projectfiles_vc9/gameengine/ketsji/KX_ketsji.vcproj
projectfiles_vc9/gameengine/ketsji/network/KX_network.vcproj
projectfiles_vc9/gameengine/physics/PHY_Physics/PHY_Bullet/PHY_Bullet.vcproj
projectfiles_vc9/gameengine/rasterizer/RAS_rasterizer.vcproj
projectfiles_vc9/gameengine/rasterizer/openglrasterizer/RAS_openglrasterizer.vcproj
projectfiles_vc9/gameengine/scenegraph/SG_SceneGraph.vcproj
release/scripts/3ds_export.py
release/scripts/3ds_import.py
release/scripts/DirectX8Exporter.py
release/scripts/add_mesh_torus.py
release/scripts/bpymodules/BPyMesh_octree.py [deleted file]
release/scripts/bpymodules/dxfLibrary.py
release/scripts/envelope_symmetry.py
release/scripts/export_dxf.py
release/scripts/export_fbx.py
release/scripts/export_obj.py
release/scripts/help_bpy_api.py
release/scripts/help_getting_started.py
release/scripts/help_manual.py
release/scripts/help_release_notes.py
release/scripts/help_tutorials.py
release/scripts/help_web_blender.py
release/scripts/help_web_devcomm.py
release/scripts/help_web_eshop.py
release/scripts/help_web_usercomm.py
release/scripts/image_2d_cutout.py [new file with mode: 0644]
release/scripts/import_obj.py
release/scripts/import_web3d.py
release/scripts/lightwave_export.py
release/scripts/mesh_mirror_tool.py
release/scripts/mesh_poly_reduce_grid.py
release/scripts/object_active_to_other.py [new file with mode: 0644]
release/scripts/object_cookie_cutter.py
release/scripts/scripttemplate_gamelogic.py
release/scripts/scripttemplate_gamelogic_basic.py
release/scripts/vertexpaint_selfshadow_ao.py
release/scripts/wizard_bolt_factory.py [new file with mode: 0644]
release/scripts/wizard_landscape_ant.py [new file with mode: 0644]
release/scripts/xfig_export.py [deleted file]
source/CMakeLists.txt
source/Makefile
source/blender/CMakeLists.txt
source/blender/blenkernel/BKE_bad_level_calls.h
source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/bad_level_call_stubs/stubs.c
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/blender.c
source/blender/blenkernel/intern/bmfont.c
source/blender/blenkernel/intern/customdata.c
source/blender/blenkernel/intern/displist.c
source/blender/blenkernel/intern/exotic.c
source/blender/blenkernel/intern/fluidsim.c
source/blender/blenkernel/intern/font.c
source/blender/blenkernel/intern/image.c
source/blender/blenkernel/intern/mball.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/particle.c
source/blender/blenkernel/intern/particle_system.c
source/blender/blenkernel/intern/sca.c
source/blender/blenkernel/intern/scene.c
source/blender/blenlib/BLI_blenlib.h
source/blender/blenlib/BLI_vfontdata.h
source/blender/blenlib/intern/storage.c
source/blender/blenlib/intern/util.c
source/blender/blenloader/intern/readfile.c
source/blender/gpu/GPU_material.h
source/blender/gpu/intern/gpu_material.c
source/blender/imbuf/intern/imageprocess.c
source/blender/imbuf/intern/scaling.c
source/blender/include/BIF_editfont.h
source/blender/makesdna/CMakeLists.txt
source/blender/makesdna/DNA_actuator_types.h
source/blender/makesdna/DNA_controller_types.h
source/blender/makesdna/DNA_object_force.h
source/blender/makesdna/DNA_object_types.h
source/blender/makesdna/DNA_scene_types.h
source/blender/makesdna/DNA_sensor_types.h
source/blender/makesdna/DNA_space_types.h
source/blender/nodes/intern/SHD_nodes/SHD_dynamic.c
source/blender/nodes/intern/SHD_nodes/SHD_math.c
source/blender/python/BPY_interface.c
source/blender/python/SConscript
source/blender/python/api2_2x/Blender.c
source/blender/python/api2_2x/Draw.c
source/blender/python/api2_2x/Geometry.c
source/blender/python/api2_2x/Geometry.h
source/blender/python/api2_2x/Mathutils.c
source/blender/python/api2_2x/Mathutils.h
source/blender/python/api2_2x/Modifier.c
source/blender/python/api2_2x/Object.c
source/blender/python/api2_2x/Particle.c
source/blender/python/api2_2x/bpy_internal_import.c
source/blender/python/api2_2x/bpy_internal_import.h
source/blender/python/api2_2x/doc/Geometry.py
source/blender/python/api2_2x/doc/Image.py
source/blender/python/api2_2x/doc/Mathutils.py
source/blender/python/api2_2x/doc/Modifier.py
source/blender/python/api2_2x/doc/Particle.py
source/blender/python/api2_2x/euler.c
source/blender/python/api2_2x/euler.h
source/blender/python/api2_2x/matrix.c
source/blender/python/api2_2x/matrix.h
source/blender/python/api2_2x/quat.c
source/blender/python/api2_2x/quat.h
source/blender/python/api2_2x/vector.c
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/rayshade.c
source/blender/render/intern/source/rendercore.c
source/blender/render/intern/source/shadeoutput.c
source/blender/render/intern/source/texture.c
source/blender/src/buttons_logic.c
source/blender/src/buttons_scene.c
source/blender/src/buttons_shading.c
source/blender/src/drawgpencil.c
source/blender/src/drawview.c
source/blender/src/editarmature.c
source/blender/src/editarmature_sketch.c
source/blender/src/editdeform.c
source/blender/src/editfont.c
source/blender/src/editmesh_tools.c
source/blender/src/editnla.c
source/blender/src/editnode.c
source/blender/src/editobject.c
source/blender/src/editseq.c
source/blender/src/filelist.c
source/blender/src/filesel.c
source/blender/src/header_node.c
source/blender/src/header_view3d.c
source/blender/src/imagepaint.c
source/blender/src/previewrender.c
source/blender/src/reeb.c
source/blender/src/space.c
source/blender/src/toets.c
source/blender/src/transform.c
source/blender/src/transform_conversions.c
source/creator/creator.c
source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp
source/gameengine/CMakeLists.txt
source/gameengine/Converter/BL_ActionActuator.cpp
source/gameengine/Converter/BL_BlenderDataConversion.cpp
source/gameengine/Converter/BL_DeformableGameObject.cpp
source/gameengine/Converter/BL_DeformableGameObject.h
source/gameengine/Converter/BL_MeshDeformer.cpp
source/gameengine/Converter/BL_MeshDeformer.h
source/gameengine/Converter/BL_ModifierDeformer.cpp
source/gameengine/Converter/BL_ModifierDeformer.h
source/gameengine/Converter/BL_ShapeActionActuator.cpp
source/gameengine/Converter/BL_ShapeDeformer.cpp
source/gameengine/Converter/BL_ShapeDeformer.h
source/gameengine/Converter/BL_SkinDeformer.cpp
source/gameengine/Converter/BL_SkinDeformer.h
source/gameengine/Converter/KX_BlenderSceneConverter.cpp
source/gameengine/Converter/KX_ConvertActuators.cpp
source/gameengine/Converter/KX_ConvertActuators.h
source/gameengine/Converter/KX_ConvertControllers.cpp
source/gameengine/Converter/KX_ConvertControllers.h
source/gameengine/Converter/KX_ConvertProperties.cpp
source/gameengine/Converter/KX_ConvertSensors.cpp
source/gameengine/Converter/KX_ConvertSensors.h
source/gameengine/Expressions/BoolValue.cpp
source/gameengine/Expressions/BoolValue.h
source/gameengine/Expressions/CMakeLists.txt
source/gameengine/Expressions/ErrorValue.cpp
source/gameengine/Expressions/ErrorValue.h
source/gameengine/Expressions/FloatValue.cpp
source/gameengine/Expressions/FloatValue.h
source/gameengine/Expressions/IfExpr.cpp
source/gameengine/Expressions/InputParser.cpp
source/gameengine/Expressions/InputParser.h
source/gameengine/Expressions/IntValue.cpp
source/gameengine/Expressions/IntValue.h
source/gameengine/Expressions/ListValue.cpp
source/gameengine/Expressions/ListValue.h
source/gameengine/Expressions/Makefile
source/gameengine/Expressions/PyObjectPlus.cpp
source/gameengine/Expressions/PyObjectPlus.h
source/gameengine/Expressions/SConscript
source/gameengine/Expressions/StringValue.cpp
source/gameengine/Expressions/StringValue.h
source/gameengine/Expressions/Value.cpp
source/gameengine/Expressions/Value.h
source/gameengine/Expressions/VectorValue.cpp
source/gameengine/Expressions/VectorValue.h
source/gameengine/GameLogic/CMakeLists.txt
source/gameengine/GameLogic/Joystick/Makefile
source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
source/gameengine/GameLogic/Makefile
source/gameengine/GameLogic/SCA_2DFilterActuator.cpp
source/gameengine/GameLogic/SCA_2DFilterActuator.h
source/gameengine/GameLogic/SCA_ANDController.cpp
source/gameengine/GameLogic/SCA_ActuatorEventManager.cpp
source/gameengine/GameLogic/SCA_ActuatorSensor.cpp
source/gameengine/GameLogic/SCA_ActuatorSensor.h
source/gameengine/GameLogic/SCA_AlwaysEventManager.cpp
source/gameengine/GameLogic/SCA_AlwaysSensor.cpp
source/gameengine/GameLogic/SCA_AlwaysSensor.h
source/gameengine/GameLogic/SCA_DelaySensor.cpp
source/gameengine/GameLogic/SCA_DelaySensor.h
source/gameengine/GameLogic/SCA_EventManager.cpp
source/gameengine/GameLogic/SCA_EventManager.h
source/gameengine/GameLogic/SCA_ExpressionController.cpp
source/gameengine/GameLogic/SCA_IActuator.cpp
source/gameengine/GameLogic/SCA_IActuator.h
source/gameengine/GameLogic/SCA_IController.cpp
source/gameengine/GameLogic/SCA_IController.h
source/gameengine/GameLogic/SCA_ILogicBrick.cpp
source/gameengine/GameLogic/SCA_ILogicBrick.h
source/gameengine/GameLogic/SCA_IObject.cpp
source/gameengine/GameLogic/SCA_IObject.h
source/gameengine/GameLogic/SCA_IScene.cpp
source/gameengine/GameLogic/SCA_IScene.h
source/gameengine/GameLogic/SCA_ISensor.cpp
source/gameengine/GameLogic/SCA_ISensor.h
source/gameengine/GameLogic/SCA_JoystickManager.cpp
source/gameengine/GameLogic/SCA_JoystickSensor.cpp
source/gameengine/GameLogic/SCA_JoystickSensor.h
source/gameengine/GameLogic/SCA_KeyboardManager.cpp
source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
source/gameengine/GameLogic/SCA_KeyboardSensor.h
source/gameengine/GameLogic/SCA_LogicManager.cpp
source/gameengine/GameLogic/SCA_LogicManager.h
source/gameengine/GameLogic/SCA_MouseManager.cpp
source/gameengine/GameLogic/SCA_MouseSensor.cpp
source/gameengine/GameLogic/SCA_MouseSensor.h
source/gameengine/GameLogic/SCA_NANDController.cpp
source/gameengine/GameLogic/SCA_NORController.cpp
source/gameengine/GameLogic/SCA_ORController.cpp
source/gameengine/GameLogic/SCA_PropertyActuator.cpp
source/gameengine/GameLogic/SCA_PropertyEventManager.cpp
source/gameengine/GameLogic/SCA_PropertySensor.cpp
source/gameengine/GameLogic/SCA_PropertySensor.h
source/gameengine/GameLogic/SCA_PythonController.cpp
source/gameengine/GameLogic/SCA_PythonController.h
source/gameengine/GameLogic/SCA_RandomActuator.cpp
source/gameengine/GameLogic/SCA_RandomEventManager.cpp
source/gameengine/GameLogic/SCA_RandomSensor.cpp
source/gameengine/GameLogic/SCA_RandomSensor.h
source/gameengine/GameLogic/SCA_TimeEventManager.cpp
source/gameengine/GameLogic/SCA_XNORController.cpp
source/gameengine/GameLogic/SCA_XORController.cpp
source/gameengine/GameLogic/SConscript
source/gameengine/GamePlayer/CMakeLists.txt
source/gameengine/GamePlayer/ghost/GPG_Application.cpp
source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
source/gameengine/Ketsji/BL_BlenderShader.cpp
source/gameengine/Ketsji/BL_BlenderShader.h
source/gameengine/Ketsji/BL_Material.cpp
source/gameengine/Ketsji/BL_Material.h
source/gameengine/Ketsji/BL_Shader.cpp
source/gameengine/Ketsji/CMakeLists.txt
source/gameengine/Ketsji/KXNetwork/CMakeLists.txt
source/gameengine/Ketsji/KXNetwork/KX_NetworkEventManager.cpp
source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp
source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp
source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h
source/gameengine/Ketsji/KXNetwork/Makefile
source/gameengine/Ketsji/KXNetwork/SConscript
source/gameengine/Ketsji/KX_BlenderMaterial.cpp
source/gameengine/Ketsji/KX_BlenderMaterial.h
source/gameengine/Ketsji/KX_BulletPhysicsController.cpp
source/gameengine/Ketsji/KX_BulletPhysicsController.h
source/gameengine/Ketsji/KX_CDActuator.cpp
source/gameengine/Ketsji/KX_Camera.cpp
source/gameengine/Ketsji/KX_Camera.h
source/gameengine/Ketsji/KX_CameraActuator.cpp
source/gameengine/Ketsji/KX_ClientObjectInfo.h
source/gameengine/Ketsji/KX_ConstraintActuator.cpp
source/gameengine/Ketsji/KX_ConstraintWrapper.cpp
source/gameengine/Ketsji/KX_ConvertPhysicsObject.h
source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp
source/gameengine/Ketsji/KX_Dome.cpp
source/gameengine/Ketsji/KX_Dome.h
source/gameengine/Ketsji/KX_GameActuator.cpp
source/gameengine/Ketsji/KX_GameObject.cpp
source/gameengine/Ketsji/KX_GameObject.h
source/gameengine/Ketsji/KX_IPO_SGController.cpp
source/gameengine/Ketsji/KX_IPhysicsController.cpp
source/gameengine/Ketsji/KX_IPhysicsController.h
source/gameengine/Ketsji/KX_IpoActuator.cpp
source/gameengine/Ketsji/KX_KetsjiEngine.cpp
source/gameengine/Ketsji/KX_KetsjiEngine.h
source/gameengine/Ketsji/KX_Light.cpp
source/gameengine/Ketsji/KX_Light.h
source/gameengine/Ketsji/KX_MeshProxy.cpp
source/gameengine/Ketsji/KX_MeshProxy.h
source/gameengine/Ketsji/KX_MotionState.cpp
source/gameengine/Ketsji/KX_MotionState.h
source/gameengine/Ketsji/KX_MouseFocusSensor.cpp
source/gameengine/Ketsji/KX_MouseFocusSensor.h
source/gameengine/Ketsji/KX_NearSensor.cpp
source/gameengine/Ketsji/KX_NearSensor.h
source/gameengine/Ketsji/KX_ObjectActuator.cpp
source/gameengine/Ketsji/KX_ObjectActuator.h
source/gameengine/Ketsji/KX_OdePhysicsController.h
source/gameengine/Ketsji/KX_ParentActuator.cpp
source/gameengine/Ketsji/KX_ParentActuator.h
source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp
source/gameengine/Ketsji/KX_PolyProxy.cpp
source/gameengine/Ketsji/KX_PolyProxy.h
source/gameengine/Ketsji/KX_PolygonMaterial.cpp
source/gameengine/Ketsji/KX_PolygonMaterial.h
source/gameengine/Ketsji/KX_PyConstraintBinding.cpp
source/gameengine/Ketsji/KX_PythonInit.cpp
source/gameengine/Ketsji/KX_PythonInit.h
source/gameengine/Ketsji/KX_PythonInitTypes.cpp
source/gameengine/Ketsji/KX_PythonSeq.cpp [new file with mode: 0644]
source/gameengine/Ketsji/KX_PythonSeq.h [new file with mode: 0644]
source/gameengine/Ketsji/KX_RadarSensor.cpp
source/gameengine/Ketsji/KX_RadarSensor.h
source/gameengine/Ketsji/KX_RayEventManager.cpp
source/gameengine/Ketsji/KX_RaySensor.cpp
source/gameengine/Ketsji/KX_RaySensor.h
source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp
source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp
source/gameengine/Ketsji/KX_SCA_EndObjectActuator.cpp
source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.cpp
source/gameengine/Ketsji/KX_SG_BoneParentNodeRelationship.cpp
source/gameengine/Ketsji/KX_SG_NodeRelationships.cpp
source/gameengine/Ketsji/KX_Scene.cpp
source/gameengine/Ketsji/KX_Scene.h
source/gameengine/Ketsji/KX_SceneActuator.cpp
source/gameengine/Ketsji/KX_SceneActuator.h
source/gameengine/Ketsji/KX_SoundActuator.cpp
source/gameengine/Ketsji/KX_SoundActuator.h
source/gameengine/Ketsji/KX_StateActuator.cpp
source/gameengine/Ketsji/KX_StateActuator.h
source/gameengine/Ketsji/KX_SumoPhysicsController.h
source/gameengine/Ketsji/KX_TouchEventManager.cpp
source/gameengine/Ketsji/KX_TouchSensor.cpp
source/gameengine/Ketsji/KX_TouchSensor.h
source/gameengine/Ketsji/KX_TrackToActuator.cpp
source/gameengine/Ketsji/KX_VehicleWrapper.cpp
source/gameengine/Ketsji/KX_VertexProxy.cpp
source/gameengine/Ketsji/KX_VertexProxy.h
source/gameengine/Ketsji/KX_VisibilityActuator.cpp
source/gameengine/Ketsji/SConscript
source/gameengine/Network/NG_NetworkScene.cpp
source/gameengine/Physics/BlOde/OdePhysicsController.cpp
source/gameengine/Physics/BlOde/OdePhysicsController.h
source/gameengine/Physics/BlOde/OdePhysicsEnvironment.cpp
source/gameengine/Physics/BlOde/OdePhysicsEnvironment.h
source/gameengine/Physics/Bullet/CMakeLists.txt
source/gameengine/Physics/Bullet/CcdGraphicController.cpp
source/gameengine/Physics/Bullet/CcdGraphicController.h
source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
source/gameengine/Physics/Bullet/CcdPhysicsController.h
source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h
source/gameengine/Physics/Bullet/Makefile
source/gameengine/Physics/Bullet/SConscript
source/gameengine/Physics/Dummy/DummyPhysicsEnvironment.cpp
source/gameengine/Physics/Dummy/DummyPhysicsEnvironment.h
source/gameengine/Physics/Sumo/SumoPhysicsController.cpp
source/gameengine/Physics/Sumo/SumoPhysicsController.h
source/gameengine/Physics/Sumo/SumoPhysicsEnvironment.cpp
source/gameengine/Physics/Sumo/SumoPhysicsEnvironment.h
source/gameengine/Physics/common/PHY_IGraphicController.h
source/gameengine/Physics/common/PHY_IMotionState.h
source/gameengine/Physics/common/PHY_IPhysicsController.h
source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h
source/gameengine/PyDoc/API_intro.py [new file with mode: 0644]
source/gameengine/PyDoc/BL_ActionActuator.py [deleted file]
source/gameengine/PyDoc/BL_Shader.py [deleted file]
source/gameengine/PyDoc/BL_ShapeActionActuator.py [deleted file]
source/gameengine/PyDoc/CListValue.py [deleted file]
source/gameengine/PyDoc/CPropValue.py [deleted file]
source/gameengine/PyDoc/CValue.py [deleted file]
source/gameengine/PyDoc/GameLogic.py
source/gameengine/PyDoc/GameTypes.py
source/gameengine/PyDoc/KX_BlenderMaterial.py [deleted file]
source/gameengine/PyDoc/KX_CDActuator.py [deleted file]
source/gameengine/PyDoc/KX_Camera.py [deleted file]
source/gameengine/PyDoc/KX_CameraActuator.py [deleted file]
source/gameengine/PyDoc/KX_ConstraintActuator.py [deleted file]
source/gameengine/PyDoc/KX_ConstraintWrapper.py [deleted file]
source/gameengine/PyDoc/KX_GameActuator.py [deleted file]
source/gameengine/PyDoc/KX_GameObject.py [deleted file]
source/gameengine/PyDoc/KX_IpoActuator.py [deleted file]
source/gameengine/PyDoc/KX_LightObject.py [deleted file]
source/gameengine/PyDoc/KX_MeshProxy.py [deleted file]
source/gameengine/PyDoc/KX_MouseFocusSensor.py [deleted file]
source/gameengine/PyDoc/KX_NearSensor.py [deleted file]
source/gameengine/PyDoc/KX_NetworkMessageActuator.py [deleted file]
source/gameengine/PyDoc/KX_NetworkMessageSensor.py [deleted file]
source/gameengine/PyDoc/KX_ObjectActuator.py [deleted file]
source/gameengine/PyDoc/KX_ParentActuator.py [deleted file]
source/gameengine/PyDoc/KX_PhysicsObjectWrapper.py [deleted file]
source/gameengine/PyDoc/KX_PolyProxy.py [deleted file]
source/gameengine/PyDoc/KX_PolygonMaterial.py [deleted file]
source/gameengine/PyDoc/KX_RadarSensor.py [deleted file]
source/gameengine/PyDoc/KX_RaySensor.py [deleted file]
source/gameengine/PyDoc/KX_SCA_AddObjectActuator.py [deleted file]
source/gameengine/PyDoc/KX_SCA_DynamicActuator.py [deleted file]
source/gameengine/PyDoc/KX_SCA_EndObjectActuator.py [deleted file]
source/gameengine/PyDoc/KX_SCA_ReplaceMeshActuator.py [deleted file]
source/gameengine/PyDoc/KX_Scene.py [deleted file]
source/gameengine/PyDoc/KX_SceneActuator.py [deleted file]
source/gameengine/PyDoc/KX_SoundActuator.py [deleted file]
source/gameengine/PyDoc/KX_StateActuator.py [deleted file]
source/gameengine/PyDoc/KX_TouchSensor.py [deleted file]
source/gameengine/PyDoc/KX_TrackToActuator.py [deleted file]
source/gameengine/PyDoc/KX_VehicleWrapper.py [deleted file]
source/gameengine/PyDoc/KX_VertexProxy.py [deleted file]
source/gameengine/PyDoc/KX_VisibilityActuator.py [deleted file]
source/gameengine/PyDoc/PyObjectPlus.py [deleted file]
source/gameengine/PyDoc/Rasterizer.py
source/gameengine/PyDoc/SCA_2DFilterActuator.py [deleted file]
source/gameengine/PyDoc/SCA_ANDController.py [deleted file]
source/gameengine/PyDoc/SCA_ActuatorSensor.py [deleted file]
source/gameengine/PyDoc/SCA_AlwaysSensor.py [deleted file]
source/gameengine/PyDoc/SCA_DelaySensor.py [deleted file]
source/gameengine/PyDoc/SCA_IActuator.py [deleted file]
source/gameengine/PyDoc/SCA_IController.py [deleted file]
source/gameengine/PyDoc/SCA_ILogicBrick.py [deleted file]
source/gameengine/PyDoc/SCA_IObject.py [deleted file]
source/gameengine/PyDoc/SCA_ISensor.py [deleted file]
source/gameengine/PyDoc/SCA_JoystickSensor.py [deleted file]
source/gameengine/PyDoc/SCA_KeyboardSensor.py [deleted file]
source/gameengine/PyDoc/SCA_MouseSensor.py [deleted file]
source/gameengine/PyDoc/SCA_NANDController.py [deleted file]
source/gameengine/PyDoc/SCA_NORController.py [deleted file]
source/gameengine/PyDoc/SCA_ORController.py [deleted file]
source/gameengine/PyDoc/SCA_PropertyActuator.py [deleted file]
source/gameengine/PyDoc/SCA_PropertySensor.py [deleted file]
source/gameengine/PyDoc/SCA_PythonController.py [deleted file]
source/gameengine/PyDoc/SCA_RandomActuator.py [deleted file]
source/gameengine/PyDoc/SCA_RandomSensor.py [deleted file]
source/gameengine/PyDoc/SCA_XNORController.py [deleted file]
source/gameengine/PyDoc/SCA_XORController.py [deleted file]
source/gameengine/PyDoc/WhatsNew.py [deleted file]
source/gameengine/PyDoc/bge_api_validate_py.txt
source/gameengine/PyDoc/epy_docgen.sh
source/gameengine/Rasterizer/CMakeLists.txt
source/gameengine/Rasterizer/Makefile
source/gameengine/Rasterizer/RAS_2DFilterManager.cpp
source/gameengine/Rasterizer/RAS_BucketManager.cpp
source/gameengine/Rasterizer/RAS_BucketManager.h
source/gameengine/Rasterizer/RAS_Deformer.h
source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp
source/gameengine/Rasterizer/RAS_IPolygonMaterial.h
source/gameengine/Rasterizer/RAS_MaterialBucket.cpp
source/gameengine/Rasterizer/RAS_MaterialBucket.h
source/gameengine/Rasterizer/RAS_MeshObject.cpp
source/gameengine/Rasterizer/RAS_MeshObject.h
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/Makefile
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.h
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript
source/gameengine/Rasterizer/SConscript
source/gameengine/SceneGraph/SG_DList.h [new file with mode: 0644]
source/gameengine/SceneGraph/SG_IObject.cpp
source/gameengine/SceneGraph/SG_IObject.h
source/gameengine/SceneGraph/SG_Node.cpp
source/gameengine/SceneGraph/SG_Node.h
source/gameengine/SceneGraph/SG_QList.h [new file with mode: 0644]
source/gameengine/SceneGraph/SG_Spatial.cpp
source/gameengine/SceneGraph/SG_Spatial.h
source/gameengine/VideoTexture/FilterBlueScreen.cpp
source/gameengine/VideoTexture/FilterColor.cpp
source/gameengine/VideoTexture/FilterNormal.cpp
source/gameengine/VideoTexture/FilterSource.cpp
source/gameengine/VideoTexture/ImageBuff.cpp
source/gameengine/VideoTexture/ImageMix.cpp
source/gameengine/VideoTexture/ImageRender.cpp
source/gameengine/VideoTexture/ImageViewport.cpp
source/gameengine/VideoTexture/Texture.cpp
source/gameengine/VideoTexture/VideoFFmpeg.cpp
source/gameengine/VideoTexture/blendVideoTex.cpp
source/kernel/gen_system/GEN_HashedPtr.cpp
tools/btools.py

index 95799a2c1fdbc1189e3829dbdb53c4610ddf05e6..e4ba662eefb9c3da73594bef4d31d7765c9ae800 100644 (file)
@@ -59,7 +59,24 @@ 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_LIB} ${LLIBS})
+  #TARGET_LINK_LIBRARIES(${target} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${PYTHON_LIB} ${PYTHON_LINKFLAGS} ${JPEG_LIB} ${PNG_LIB} ${ZLIB_LIB} ${SDL_LIB} ${LLIBS})
+
+  TARGET_LINK_LIBRARIES(${target} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${PYTHON_LINKFLAGS} ${JPEG_LIB} ${PNG_LIB} ${ZLIB_LIB} ${SDL_LIB} ${LLIBS})
+
+  # 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} ${FREETYPE_LIB})
     TARGET_LINK_LIBRARIES(${target} ${GETTEXT_LIB})
index 1340ec0f3b90d6636a50dbc3a1de137f6dcd0e74..00d53282fed4dc1b724d2c64318f28f6f7bf8f8b 100644 (file)
@@ -99,20 +99,6 @@ IF(UNIX)
     ENDIF(OPENAL_FOUND)
   ENDIF(WITH_OPENAL)
 
-  FIND_LIBRARY(ALUT_LIBRARY
-    NAMES alut
-    PATHS
-    /usr/local/lib
-    /usr/lib
-    /sw/lib
-    /opt/local/lib
-    /opt/csw/lib
-    /opt/lib
-  )
-  IF(ALUT_LIBRARY)
-    SET(OPENAL_LIB ${OPENAL_LIB} ${ALUT_LIBRARY})
-  ENDIF(ALUT_LIBRARY)
-
   FIND_LIBRARY(INTL_LIBRARY
     NAMES intl
     PATHS
@@ -464,20 +450,18 @@ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PLATFORM_CFLAGS} ")
 #-----------------------------------------------------------------------------
 # Libraries
 FILE(WRITE ${CMAKE_BINARY_DIR}/cmake_blender_libs.txt "")
-SUBDIRS(
-  intern
-  extern
-  source
-)
+ADD_SUBDIRECTORY(intern)
+ADD_SUBDIRECTORY(extern)
+ADD_SUBDIRECTORY(source)
 
 
 #-----------------------------------------------------------------------------
 # Blender Application
-SUBDIRS(source/creator)
+ADD_SUBDIRECTORY(source/creator)
 
 
 #-----------------------------------------------------------------------------
 # Blender Player
 IF(WITH_PLAYER)
-  SUBDIRS(blenderplayer)
+  ADD_SUBDIRECTORY(blenderplayer)
 ENDIF(WITH_PLAYER)
index 2c57a2bba8a700d5e9d5cd8b9b68cab148d0cd22..e4c989952cfa5f81f712b46f77ba142c2004b18f 100644 (file)
@@ -24,11 +24,6 @@ BF_OPENAL_LIB = 'openal'
 BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
 BF_OPENAL_LIBPATH = LIBDIR + '/lib'
 
-# some distros have a separate libalut
-# if you get linker complaints, you need to uncomment the line below
-# BF_OPENAL_LIB = 'openal alut'  
-# BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a ${BF_OPENAL}/lib/libalut.a'
-
 BF_CXX = '/usr'
 WITH_BF_STATICCXX = 'false'
 BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
index 5bd9a4c80849eb94148eb4d84b7267ffe82ea345..b0ff0b89d3ddf8b67820a74c026f8ec913ec3d4e 100644 (file)
@@ -4,8 +4,16 @@ LIBDIR = "${LCGDIR}"
 WITH_BF_VERSE = False
 BF_VERSE_INCLUDE = "#extern/verse/dist"
 
+def py_version_string():
+       '''
+       returns py version - "2.5", "2.6" etc
+       '''
+       import platform
+       ver = platform.python_version_tuple()
+       return '%d.%d' % (int(ver[0]), int(ver[1])) # py2.5 uses strings, 2.6 ints
+
 BF_PYTHON = '/usr'
-BF_PYTHON_VERSION = '2.5'
+BF_PYTHON_VERSION = py_version_string()
 WITH_BF_STATICPYTHON = False
 BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
 BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
@@ -20,11 +28,6 @@ BF_OPENAL_INC = '${BF_OPENAL}/include'
 BF_OPENAL_LIB = 'openal'
 BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
 
-# some distros have a separate libalut
-# if you get linker complaints, you need to uncomment the line below
-# BF_OPENAL_LIB = 'openal alut'  
-# BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a ${BF_OPENAL}/lib/libalut.a'
-
 BF_CXX = '/usr'
 WITH_BF_STATICCXX = False
 BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
@@ -78,7 +81,8 @@ BF_FTGL = '#extern/bFTGL'
 BF_FTGL_INC = '${BF_FTGL}/include'
 BF_FTGL_LIB = 'extern_ftgl'
 
-WITH_BF_GAMEENGINE=False
+WITH_BF_GAMEENGINE = True
+WITH_BF_PLAYER = True
 
 WITH_BF_ODE = False
 BF_ODE = LIBDIR + '/ode'
index b81efb52de901d06ee2b68f92e96940e6f1c79f5..eeb09491ce6d9bcd6f54177688eb6c13a5400475 100644 (file)
 # ***** END GPL LICENSE BLOCK *****
 
 IF(WITH_GAMEENGINE)
-  SUBDIRS(qhull solid)
+  ADD_SUBDIRECTORY(qhull)
+  ADD_SUBDIRECTORY(solid)
 ENDIF(WITH_GAMEENGINE)
 
 IF(WITH_BULLET)
-  SUBDIRS(bullet2)
+  ADD_SUBDIRECTORY(bullet2)
 ENDIF(WITH_BULLET)
 
 IF(WITH_INTERNATIONAL)
-  SUBDIRS(bFTGL)
+  ADD_SUBDIRECTORY(bFTGL)
 ENDIF(WITH_INTERNATIONAL)
 
 IF(WITH_VERSE)
-  SUBDIRS(verse)
+  ADD_SUBDIRECTORY(verse)
 ENDIF(WITH_VERSE)
 
 IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
-  SUBDIRS(binreloc)
+  ADD_SUBDIRECTORY(binreloc)
 ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
 
-SUBDIRS(glew)
+ADD_SUBDIRECTORY(glew)
 
 IF(WITH_OPENJPEG)
-  SUBDIRS(libopenjpeg)
+  ADD_SUBDIRECTORY(libopenjpeg)
 ENDIF(WITH_OPENJPEG)
index 043fd3f6e7f566531f4b352ee1a21ffa5548a2b3..9b8a5a7e00e21c1147a756be9a429e92dbda6e63 100644 (file)
@@ -1 +1,4 @@
-SUBDIRS( BulletCollision BulletDynamics LinearMath BulletSoftBody )
+ADD_SUBDIRECTORY(BulletCollision)
+ADD_SUBDIRECTORY(BulletDynamics)
+ADD_SUBDIRECTORY(LinearMath)
+ADD_SUBDIRECTORY(BulletSoftBody )
index 318a550668e5b012e60ab0b87f26d84c7962f3b2..90f727bbfdfdbea75a8883422ae97c1f8e5cc5f9 100644 (file)
@@ -24,5 +24,5 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SUBDIRS(dist)
+ADD_SUBDIRECTORY(dist)
 
index ae130df641092867a9d0fd2dc67cb1bfc9c90027..f46099cb2897767c365e84153e38cea91df5f6c8 100644 (file)
@@ -24,7 +24,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SUBDIRS(mkprot_cmd)
+ADD_SUBDIRECTORY(mkprot_cmd)
 
 SET(SRC_MKPROT_OUT
   v_gen_pack_init.c
index 8451602e425ce329cbc15c31444a8586c230269d..98820db1fd87a2a93b83adab311e87add4a8e437 100644 (file)
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SUBDIRS(SoundSystem string ghost guardedalloc bmfont moto container memutil decimation iksolver itasc boolop opennl)
+ADD_SUBDIRECTORY(SoundSystem)
+ADD_SUBDIRECTORY(string)
+ADD_SUBDIRECTORY(ghost)
+ADD_SUBDIRECTORY(guardedalloc)
+ADD_SUBDIRECTORY(bmfont)
+ADD_SUBDIRECTORY(moto)
+ADD_SUBDIRECTORY(container)
+ADD_SUBDIRECTORY(memutil)
+ADD_SUBDIRECTORY(decimation)
+ADD_SUBDIRECTORY(iksolver)
+ADD_SUBDIRECTORY(itasc)
+ADD_SUBDIRECTORY(boolop)
+ADD_SUBDIRECTORY(opennl)
 
 IF(WITH_ELBEEM)
-  SUBDIRS(elbeem)
+  ADD_SUBDIRECTORY(elbeem)
 ENDIF(WITH_ELBEEM)
 
-SUBDIRS(bsp)
+ADD_SUBDIRECTORY(bsp)
index 3649cf6de5a760bf87cb11785407ab20d317d101..424a05246aca44c77887daa2804a521a0f9ac332 100644 (file)
 #ifdef APPLE_FRAMEWORK_FIX
 #include <al.h>
 #include <alc.h>
-#include <alut.h>
 #else
 #include <AL/al.h>
 #include <AL/alc.h>
-#include <AL/alut.h>
 #endif
 
 #include <stdio.h>
 
 #include <signal.h>
 
-/* untill openal gets unified we need this hack for non-windows systems */
-#if !defined(WIN32) && !defined(ALC_MAJOR_VERSION)
+/*************************** ALUT replacement *****************************/
 
-#include <malloc.h>
+/* instead of relying on alut, we just implement our own
+ * WAV loading functions, hopefully more reliable */
 
-ALvoid alutLoadWAVMemory(ALbyte *memory,ALenum *format,ALvoid **data,ALsizei *size,ALsizei *freq,ALboolean *loop);
-ALvoid alutUnloadWAV(ALenum format,ALvoid *data,ALsizei size,ALsizei freq);
+#include <stdlib.h>
 
 typedef struct                                  /* WAV File-header */
 {
@@ -120,93 +117,189 @@ typedef struct                                  /* WAV Chunk-header */
   ALuint   Size;
 } WAVChunkHdr_Struct;
 
-ALvoid alutLoadWAVMemory(ALbyte *memory,ALenum *format,ALvoid **data,ALsizei *size,ALsizei *freq,ALboolean *loop)
+static void *SND_loadFileIntoMemory(const char *filename, int *len_r)
+{
+       FILE *fp= fopen(filename, "rb");
+       void *data;
+
+       if (!fp) {
+               *len_r= -1;
+               return NULL;
+       }
+
+       fseek(fp, 0L, SEEK_END);
+       *len_r= ftell(fp);
+       fseek(fp, 0L, SEEK_SET);
+
+       data= malloc(*len_r);
+       if (!data) {
+               *len_r= -1;
+               return NULL;
+       }
+
+       if (fread(data, *len_r, 1, fp)!=1) {
+               *len_r= -1;
+               free(data);
+               return NULL;
+       }
+
+       return data;
+}
+
+#define TEST_SWITCH_INT(a) if(big_endian) { \
+    char s_i, *p_i; \
+    p_i= (char *)&(a); \
+    s_i=p_i[0]; p_i[0]=p_i[3]; p_i[3]=s_i; \
+    s_i=p_i[1]; p_i[1]=p_i[2]; p_i[2]=s_i; }
+
+#define TEST_SWITCH_SHORT(a) if(big_endian) { \
+    char s_i, *p_i; \
+    p_i= (char *)&(a); \
+    s_i=p_i[0]; p_i[0]=p_i[1]; p_i[1]=s_i; }
+
+static int stream_read(void *out, ALbyte **stream, ALsizei size, ALsizei *memsize)
+{
+       if(size <= *memsize) {
+               memcpy(out, *stream, size);
+               return 1;
+       }
+       else {
+               memset(out, 0, size);
+               return 0;
+       }
+}
+
+static int stream_skip(ALbyte **stream, ALsizei size, ALsizei *memsize)
+{
+       if(size <= *memsize) {
+               *stream += size;
+               *memsize -= size;
+               return 1;
+       }
+       else
+               return 0;
+}
+
+ALvoid SND_alutLoadWAVMemory(ALbyte *memory,ALsizei memsize,ALenum *format,ALvoid **data,ALsizei *size,ALsizei *freq,ALboolean *loop)
 {
        WAVChunkHdr_Struct ChunkHdr;
        WAVFmtExHdr_Struct FmtExHdr;
        WAVFileHdr_Struct FileHdr;
        WAVSmplHdr_Struct SmplHdr;
        WAVFmtHdr_Struct FmtHdr;
-       ALbyte *Stream;
+       ALbyte *Stream= memory;
+       int test_endian= 1;
+       int big_endian= !((char*)&test_endian)[0];
        
        *format=AL_FORMAT_MONO16;
        *data=NULL;
        *size=0;
        *freq=22050;
        *loop=AL_FALSE;
-       if (memory)
+
+       if(!Stream)
+               return;
+       stream_read(&FileHdr,&Stream,sizeof(WAVFileHdr_Struct),&memsize);
+       stream_skip(&Stream,sizeof(WAVFileHdr_Struct),&memsize);
+
+       TEST_SWITCH_INT(FileHdr.Size);
+       FileHdr.Size=((FileHdr.Size+1)&~1)-4;
+
+       while((FileHdr.Size!=0) && stream_read(&ChunkHdr,&Stream,sizeof(WAVChunkHdr_Struct),&memsize))
        {
-               Stream=memory;
-               if (Stream)
+               TEST_SWITCH_INT(ChunkHdr.Size);
+               stream_skip(&Stream,sizeof(WAVChunkHdr_Struct),&memsize);
+
+               if (!memcmp(ChunkHdr.Id,"fmt ",4))
                {
-                       memcpy(&FileHdr,Stream,sizeof(WAVFileHdr_Struct));
-                       Stream+=sizeof(WAVFileHdr_Struct);
-                       FileHdr.Size=((FileHdr.Size+1)&~1)-4;
-                       while ((FileHdr.Size!=0)&&(memcpy(&ChunkHdr,Stream,sizeof(WAVChunkHdr_Struct))))
+                       stream_read(&FmtHdr,&Stream,sizeof(WAVFmtHdr_Struct),&memsize);
+
+                       TEST_SWITCH_SHORT(FmtHdr.Format);
+                       TEST_SWITCH_SHORT(FmtHdr.Channels);
+                       TEST_SWITCH_INT(FmtHdr.SamplesPerSec);
+                       TEST_SWITCH_INT(FmtHdr.BytesPerSec);
+                       TEST_SWITCH_SHORT(FmtHdr.BlockAlign);
+                       TEST_SWITCH_SHORT(FmtHdr.BitsPerSample);
+
+                       if (FmtHdr.Format==0x0001)
                        {
-                               Stream+=sizeof(WAVChunkHdr_Struct);
-                               if (!memcmp(ChunkHdr.Id,"fmt ",4))
-                               {
-                                       memcpy(&FmtHdr,Stream,sizeof(WAVFmtHdr_Struct));
-                                       if (FmtHdr.Format==0x0001)
-                                       {
-                                               *format=(FmtHdr.Channels==1?
-                                                               (FmtHdr.BitsPerSample==8?AL_FORMAT_MONO8:AL_FORMAT_MONO16):
-                                                               (FmtHdr.BitsPerSample==8?AL_FORMAT_STEREO8:AL_FORMAT_STEREO16));
-                                               *freq=FmtHdr.SamplesPerSec;
-                                               Stream+=ChunkHdr.Size;
-                                       } 
-                                       else
-                                       {
-                                               memcpy(&FmtExHdr,Stream,sizeof(WAVFmtExHdr_Struct));
-                                               Stream+=ChunkHdr.Size;
-                                       }
-                               }
-                               else if (!memcmp(ChunkHdr.Id,"data",4))
+                               *format=(FmtHdr.Channels==1?
+                                               (FmtHdr.BitsPerSample==8?AL_FORMAT_MONO8:AL_FORMAT_MONO16):
+                                               (FmtHdr.BitsPerSample==8?AL_FORMAT_STEREO8:AL_FORMAT_STEREO16));
+                               *freq=FmtHdr.SamplesPerSec;
+                       } 
+                       else
+                       {
+                               stream_read(&FmtExHdr,&Stream,sizeof(WAVFmtExHdr_Struct),&memsize);
+                               TEST_SWITCH_SHORT(FmtExHdr.Size);
+                               TEST_SWITCH_SHORT(FmtExHdr.SamplesPerBlock);
+                       }
+               }
+               else if (!memcmp(ChunkHdr.Id,"data",4))
+               {
+                       if (FmtHdr.Format==0x0001)
+                       {
+                               if((ALsizei)ChunkHdr.Size <= memsize)
                                {
-                                       if (FmtHdr.Format==0x0001)
-                                       {
-                                               *size=ChunkHdr.Size;
-                                               *data=malloc(ChunkHdr.Size+31);
-                                               if (*data) memcpy(*data,Stream,ChunkHdr.Size);
+                                       *size=ChunkHdr.Size;
+                                       *data=malloc(ChunkHdr.Size+31);
+
+                                       if (*data) {
+                                               stream_read(*data,&Stream,ChunkHdr.Size,&memsize);
                                                memset(((char *)*data)+ChunkHdr.Size,0,31);
-                                               Stream+=ChunkHdr.Size;
-                                       }
-                                       else if (FmtHdr.Format==0x0011)
-                                       {
-                                               //IMA ADPCM
-                                       }
-                                       else if (FmtHdr.Format==0x0055)
-                                       {
-                                               //MP3 WAVE
+
+                                               if(FmtHdr.BitsPerSample == 16 && big_endian) {
+                                                       int a, len= *size/2;
+                                                       short *samples= (short*)*data;
+
+                                                       for(a=0; a<len; a++) {
+                                                               TEST_SWITCH_SHORT(samples[a])
+                                                       }
+                                               }
                                        }
                                }
-                               else if (!memcmp(ChunkHdr.Id,"smpl",4))
-                               {
-                                       memcpy(&SmplHdr,Stream,sizeof(WAVSmplHdr_Struct));
-                                       *loop = (SmplHdr.Loops ? AL_TRUE : AL_FALSE);
-                                       Stream+=ChunkHdr.Size;
-                               }
-                               else Stream+=ChunkHdr.Size;
-                               Stream+=ChunkHdr.Size&1;
-                               FileHdr.Size-=(((ChunkHdr.Size+1)&~1)+8);
+                       }
+                       else if (FmtHdr.Format==0x0011)
+                       {
+                               //IMA ADPCM
+                       }
+                       else if (FmtHdr.Format==0x0055)
+                       {
+                               //MP3 WAVE
                        }
                }
+               else if (!memcmp(ChunkHdr.Id,"smpl",4))
+               {
+                       stream_read(&SmplHdr,&Stream,sizeof(WAVSmplHdr_Struct),&memsize);
+
+                       TEST_SWITCH_INT(SmplHdr.Manufacturer);
+                       TEST_SWITCH_INT(SmplHdr.Product);
+                       TEST_SWITCH_INT(SmplHdr.SamplePeriod);
+                       TEST_SWITCH_INT(SmplHdr.Note);
+                       TEST_SWITCH_INT(SmplHdr.FineTune);
+                       TEST_SWITCH_INT(SmplHdr.SMPTEFormat);
+                       TEST_SWITCH_INT(SmplHdr.SMPTEOffest);
+                       TEST_SWITCH_INT(SmplHdr.Loops);
+                       TEST_SWITCH_INT(SmplHdr.SamplerData);
+
+                       *loop = (SmplHdr.Loops ? AL_TRUE : AL_FALSE);
+               }
+
+               if(!stream_skip(&Stream, ChunkHdr.Size + (ChunkHdr.Size&1), &memsize))
+                       break;
+
+               FileHdr.Size-=(((ChunkHdr.Size+1)&~1)+8);
        }
 }
 
-ALvoid alutUnloadWAV(ALenum format,ALvoid *data,ALsizei size,ALsizei freq)
+ALvoid SND_alutUnloadWAV(ALenum format,ALvoid *data,ALsizei size,ALsizei freq)
 {
        if (data)
                free(data);
 }
 
-#endif /* WIN32 */
-
-#ifdef __APPLE__
-#define OUDE_OPENAL 1
-#endif
-
+/************************ Device Implementation ****************************/
 
 SND_OpenALDevice::SND_OpenALDevice()
        : SND_AudioDevice(),
@@ -223,10 +316,6 @@ SND_OpenALDevice::SND_OpenALDevice()
        // let's check if we can get openal to initialize...
        if (m_audio)
        {
-#ifdef OUDE_OPENAL
-               m_audio = true;                 // openal_2.12
-               alutInit(NULL, NULL);   // openal_2.12
-#else
                m_audio = false;
 
                ALCdevice *dev = alcOpenDevice(NULL);
@@ -236,7 +325,6 @@ SND_OpenALDevice::SND_OpenALDevice()
                        if (m_context) {
 #ifdef AL_VERSION_1_1
                        alcMakeContextCurrent((ALCcontext*)m_context);
-                       alutInitWithoutContext(NULL, NULL); /* in this case we dont want alut to initialize the context, see above */
 #else
                        alcMakeContextCurrent(m_context);
 #endif
@@ -259,7 +347,6 @@ SND_OpenALDevice::SND_OpenALDevice()
                        }
                }
 
-#endif
        }
 
        // then try to generate some buffers
@@ -283,7 +370,7 @@ SND_OpenALDevice::SND_OpenALDevice()
        // next: the sources
        if (m_audio)
        {
-#ifdef OUDE_OPENAL
+#ifdef __APPLE__
                ALenum alc_error = ALC_NO_ERROR;        // openal_2.12
 #elif defined(_WIN32)
                // alcGetError has no arguments on windows
@@ -375,20 +462,11 @@ SND_OpenALDevice::~SND_OpenALDevice()
        if (m_cdrom)
                delete m_cdrom;
 #endif
-#ifdef OUDE_OPENAL
-       if (m_audio)
-               alutExit();
-#else
        if (m_device)
                alcCloseDevice((ALCdevice*) m_device);
-#ifdef AL_VERSION_1_1
-       alutExit();
-#endif
-#endif
 }
 
 
-
 SND_WaveSlot* SND_OpenALDevice::LoadSample(const STR_String& name,
                                                                                  void* memlocation,
                                                                                  int size)
@@ -406,23 +484,22 @@ SND_WaveSlot* SND_OpenALDevice::LoadSample(const STR_String& name,
                {
                        if (waveslot)
                        {
+                               bool freemem = false;
                                int buffer = waveslot->GetBuffer();
                                void* data = NULL;
-#ifndef __APPLE__
                                char loop = 'a';
-#endif
                                int sampleformat, bitrate, numberofchannels;
                                ALenum al_error = alGetError();
-                               
-#ifdef OUDE_OPENAL
-                               ALsizei samplerate, numberofsamples;            // openal_2.12
-#else
-                               int samplerate, numberofsamples;  // openal_2.14+
-#endif
+                               ALsizei samplerate, numberofsamples;  // openal_2.14+
                                
                                /* Give them some safe defaults just incase */
                                bitrate = numberofchannels = 0;
 
+                               if (!(size && memlocation)) {
+                                       memlocation = SND_loadFileIntoMemory(samplename.Ptr(), &size);
+                                       freemem = true;
+                               }
+
                                /* load the sample from memory? */
                                if (size && memlocation)
                                {
@@ -437,33 +514,14 @@ SND_WaveSlot* SND_OpenALDevice::LoadSample(const STR_String& name,
                                        bitrate = SND_GetBitRate(memlocation);
                                        
                                        /* load the sample into openal */
-#if defined(OUDE_OPENAL) || defined (__APPLE__)
-                                       alutLoadWAVMemory((char*)memlocation, &sampleformat, &data, &numberofsamples, &samplerate);                             //      openal_2.12
-#else
-#ifdef AL_VERSION_1_1                                  
-                                       float frequency = 0.0f;
-                                       data = alutLoadMemoryFromFileImage(memlocation, size, &sampleformat, &numberofsamples, &frequency);
-                                       samplerate = (int)frequency;
-#else
-                                        alutLoadWAVMemory((signed char*)memlocation, &sampleformat, &data, &numberofsamples, &samplerate, &loop);//  openal_2.14+
-                                        
-#endif 
-#endif
-                                       /* put it in the buffer */
-                                       alBufferData(m_buffers[buffer], sampleformat, data, numberofsamples, samplerate);
-                               }
-                               /* or from file? */
-                               else
-                               {
-#ifdef __APPLE__
-                                       alutLoadWAVFile((ALbyte *)samplename.Ptr(), &sampleformat, &data, &numberofsamples, &samplerate);
-#else
-                                       alutLoadWAVFile((ALbyte *)samplename.Ptr(), &sampleformat, &data, &numberofsamples, &samplerate, &loop);
-#endif
+                                       SND_alutLoadWAVMemory((ALbyte*)memlocation, size, &sampleformat, &data, &numberofsamples, &samplerate, &loop);
                                        /* put it in the buffer */
                                        alBufferData(m_buffers[buffer], sampleformat, data, numberofsamples, samplerate);
                                }
                                
+                               if(freemem)
+                                               free(memlocation);
+                                                               
                                /* fill the waveslot with info */
                                al_error = alGetError();
                                if (al_error == AL_NO_ERROR && m_buffers[buffer])
@@ -486,11 +544,7 @@ SND_WaveSlot* SND_OpenALDevice::LoadSample(const STR_String& name,
                                }
                                
                                /* and free the original stuff (copy was made in openal) */
-#if defined(OUDE_OPENAL) || defined (__APPLE__) || !defined(AL_VERSION_1_1)
-                               alutUnloadWAV(sampleformat, data, numberofsamples, samplerate);
-#else
-                               free(data);
-#endif
+                               SND_alutUnloadWAV(sampleformat, data, numberofsamples, samplerate);
                        }
                }
                else
@@ -594,7 +648,7 @@ int SND_OpenALDevice::GetPlayState(int id)
 #ifdef __APPLE__
        alGetSourcei(m_sources[id], AL_SOURCE_STATE, &alstate);
 #else
-    alGetSourceiv(m_sources[id], AL_SOURCE_STATE, &alstate);
+       alGetSourceiv(m_sources[id], AL_SOURCE_STATE, &alstate);
 #endif
        
        switch(alstate)
index 067c8deee32c391375b8a172d8f1b30fcd02599c..e6ab6528c70178d12faf07ae937f7af0384ce777 100644 (file)
@@ -34,7 +34,6 @@
  * @date       May 7, 2001
  */
 
-
 #include <Carbon/Carbon.h>
 #include <ApplicationServices/ApplicationServices.h>
 #include "GHOST_SystemCarbon.h"
@@ -430,6 +429,29 @@ GHOST_IWindow* GHOST_SystemCarbon::createWindow(
     return window;
 }
 
+GHOST_TSuccess GHOST_SystemCarbon::beginFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow** window, const bool stereoVisual)
+{      
+       GHOST_TSuccess success = GHOST_kFailure;
+
+       // 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_SystemCarbon::endFullScreen(void)
+{      
+       CGReleaseAllDisplays();
+       return GHOST_System::endFullScreen();
+}
+
 /* this is an old style low level event queue.
   As we want to handle our own timers, this is ok.
   the full screen hack should be removed */
index 2a1d63257843ba49d6135f2269faa35a58f13923..71ac5719370e7208b053ae75f60f0b110b4a2d84 100644 (file)
@@ -118,6 +118,14 @@ public:
                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
         ***************************************************************************************/
index feb0fe39040eb8bebf567d558fb5d97b57da01e4..2cee48032f59710d9a2b36ff89c197b2c967fa35 100644 (file)
@@ -41,7 +41,7 @@
 #pragma warning (disable:4786) // get rid of stupid stl-visual compiler debug warning
 
 #include "GHOST_SystemWin32.h"
-
+//#include <stdio.h> //for printf()
 // win64 doesn't define GWL_USERDATA
 #ifdef WIN32
 #ifndef GWL_USERDATA
@@ -537,7 +537,7 @@ GHOST_Event* GHOST_SystemWin32::processWindowEvent(GHOST_TEventType type, GHOST_
 LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 {
        GHOST_Event* event = 0;
-       LRESULT lResult;
+       LRESULT lResult = 0;
        GHOST_SystemWin32* system = ((GHOST_SystemWin32*)getSystem());
        GHOST_ASSERT(system, "GHOST_SystemWin32::s_wndProc(): system not initialized")
 
@@ -747,6 +747,9 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
                                         * the message is sent asynchronously, so the window is activated immediately. 
                                         */
                                        event = processWindowEvent(LOWORD(wParam) ? GHOST_kEventWindowActivate : GHOST_kEventWindowDeactivate, window);
+                                       /* WARNING: Let DefWindowProc handle WM_ACTIVATE, otherwise WM_MOUSEWHEEL
+                                       will not be dispatched to OUR active window if we minimize one of OUR windows. */
+                                       lResult = ::DefWindowProc(hwnd, msg, wParam, lParam);
                                        break;
                                case WM_PAINT:
                                        /* An application sends the WM_PAINT message when the system or another application 
@@ -766,6 +769,7 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
                                         * message without calling DefWindowProc.
                                         */
                                        event = processWindowEvent(GHOST_kEventWindowSize, window);
+                                       break;
                                case WM_CAPTURECHANGED:
                                        window->lostMouseCapture();
                                        break;
@@ -904,7 +908,6 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
 
        if (event) {
                system->pushEvent(event);
-               lResult = 0;
        }
        else {
                lResult = ::DefWindowProc(hwnd, msg, wParam, lParam);
index 02dfdc2e25ca49cf9c4961bf3a87012a523c992d..e7e47a6bf3830165b2f63401dac87478c8e5eae1 100644 (file)
@@ -107,6 +107,15 @@ GHOST_SystemX11(
 
        m_wm_protocols= XInternAtom(m_display, "WM_PROTOCOLS", False);
        m_wm_take_focus= XInternAtom(m_display, "WM_TAKE_FOCUS", False);
+       m_targets= XInternAtom(m_display, "TARGETS", False);
+       m_string= XInternAtom(m_display, "STRING", False);
+       m_compound_text= XInternAtom(m_display, "COMPOUND_TEXT", False);
+       m_text= XInternAtom(m_display, "TEXT", False);
+       m_clipboard= XInternAtom(m_display, "CLIPBOARD", False);
+       m_primary= XInternAtom(m_display, "PRIMARY", False);
+       m_xclip_out= XInternAtom(m_display, "XCLIP_OUT", False);
+       m_incr= XInternAtom(m_display, "INCR", False);
+       m_utf8_string= XInternAtom(m_display, "UTF8_STRING", False);
 
        // compute the initial time
        timeval tv;
@@ -515,11 +524,28 @@ GHOST_SystemX11::processEvent(XEvent *xe)
                                                                      window, data);
                                }
                        } else if (((Atom)xcme.data.l[0]) == m_wm_take_focus) {
+                               XWindowAttributes attr;
+                               Window fwin;
+                               int revert_to;
+
                                /* as ICCCM say, we need reply this event
                                 * with a SetInputFocus, the data[1] have
                                 * the valid timestamp (send by the wm).
+                                *
+                                * Some WM send this event before the
+                                * window is really mapped (for example
+                                * change from virtual desktop), so we need
+                                * to be sure that our windows is mapped
+                                * or this call fail and close blender.
                                 */
-                               XSetInputFocus(m_display, xcme.window, RevertToParent, xcme.data.l[1]);
+                               if (XGetWindowAttributes(m_display, xcme.window, &attr) == True) {
+                                       if (XGetInputFocus(m_display, &fwin, &revert_to) == True) {
+                                               if (attr.map_state == IsViewable) {
+                                                       if (fwin != xcme.window)
+                                                               XSetInputFocus(m_display, xcme.window, RevertToParent, xcme.data.l[1]);
+                                               }
+                                       }
+                               }
                        } else {
                                /* Unknown client message, ignore */
                        }
@@ -975,144 +1001,299 @@ convertXKey(
 
 #undef GXMAP
 
-       GHOST_TUns8*
-GHOST_SystemX11::
-getClipboard(int flag
-) const {
-       //Flag 
-       //0 = Regular clipboard 1 = selection
-       static Atom Primary_atom, clip_String, compound_text, a_text, a_string;
-       Atom rtype;
-       Window m_window, owner;
-       unsigned char *data, *tmp_data;
-       int bits, count;
-       unsigned long len, bytes;
-       XEvent xevent;
-       
+
+/* from xclip.c xcout() v0.11 */
+
+#define XCLIB_XCOUT_NONE               0 /* no context */
+#define XCLIB_XCOUT_SENTCONVSEL                1 /* sent a request */
+#define XCLIB_XCOUT_INCR               2 /* in an incr loop */
+#define XCLIB_XCOUT_FALLBACK           3 /* STRING failed, need fallback to UTF8 */
+#define XCLIB_XCOUT_FALLBACK_UTF8      4 /* UTF8 failed, move to compouned */
+#define XCLIB_XCOUT_FALLBACK_COMP      5 /* compouned failed, move to text. */
+#define XCLIB_XCOUT_FALLBACK_TEXT      6
+
+// Retrieves the contents of a selections.
+void GHOST_SystemX11::getClipboard_xcout(XEvent evt,
+       Atom sel, Atom target, unsigned char **txt,
+       unsigned long *len, unsigned int *context) const
+{
+       Atom pty_type;
+       int pty_format;
+       unsigned char *buffer;
+       unsigned long pty_size, pty_items;
+       unsigned char *ltxt= *txt;
+
        vector<GHOST_IWindow *> & win_vec = m_windowManager->getWindows();
        vector<GHOST_IWindow *>::iterator win_it = win_vec.begin();
        GHOST_WindowX11 * window = static_cast<GHOST_WindowX11 *>(*win_it);
-       m_window = window->getXWindow();
+       Window win = window->getXWindow();
+
+       switch (*context) {
+               // There is no context, do an XConvertSelection()
+               case XCLIB_XCOUT_NONE:
+                       // Initialise return length to 0
+                       if (*len > 0) {
+                               free(*txt);
+                               *len = 0;
+                       }
 
-       clip_String = XInternAtom(m_display, "_BLENDER_STRING", False);
-       compound_text = XInternAtom(m_display, "COMPOUND_TEXT", False);
-       a_text= XInternAtom(m_display, "TEXT", False);
-       a_string= XInternAtom(m_display, "STRING", False);
-
-       //lets check the owner and if it is us then return the static buffer
-       if(flag == 0) {
-               Primary_atom = XInternAtom(m_display, "CLIPBOARD", False);
-               owner = XGetSelectionOwner(m_display, Primary_atom);
-               if (owner == m_window) {
-                       data = (unsigned char*) malloc(strlen(txt_cut_buffer)+1);
-                       strcpy((char*)data, txt_cut_buffer);
-                       return (GHOST_TUns8*)data;
-               } else if (owner == None) {
-                       return NULL;
-               }
-       } else {
-               Primary_atom = XInternAtom(m_display, "PRIMARY", False);
-               owner = XGetSelectionOwner(m_display, Primary_atom);
-               if (owner == m_window) {
-                       data = (unsigned char*) malloc(strlen(txt_select_buffer)+1);
-                       strcpy((char*)data, txt_select_buffer);
-                       return (GHOST_TUns8*)data;
-               } else if (owner == None) {
-                       return NULL;
-               }
-       }
+                       // Send a selection request
+                       XConvertSelection(m_display, sel, target, m_xclip_out, win, CurrentTime);
+                       *context = XCLIB_XCOUT_SENTCONVSEL;
+                       return;
 
-       if(!Primary_atom) {
-               return NULL;
-       }
-       
-       XDeleteProperty(m_display, m_window, Primary_atom);
-       XConvertSelection(m_display, Primary_atom, compound_text, clip_String, m_window, CurrentTime); //XA_STRING
-       XFlush(m_display);
+               case XCLIB_XCOUT_SENTCONVSEL:
+                       if (evt.type != SelectionNotify)
+                               return;
 
-       //This needs to change so we do not wait for ever or check owner first
-       count= 1;
-       while(1) {
-               XNextEvent(m_display, &xevent);
-               if(xevent.type == SelectionNotify) {
-                       if (xevent.xselection.property == None) {
-                               /* Ok, the client can't convert the property
-                                * to some that we can handle, try other types..
-                                */
-                               if (count == 1) {
-                                       XConvertSelection(m_display, Primary_atom, a_text, clip_String, m_window, CurrentTime);
-                                       count++;
-                               }
-                               else if (count == 2) {
-                                       XConvertSelection(m_display, Primary_atom, a_string, clip_String, m_window, CurrentTime);
-                                       count++;
-                               }
-                               else {
-                                       /* Ok, the owner of the selection can't 
-                                        * convert the data to something that we can
-                                        * handle.
-                                        */
-                                       return(NULL);
-                               }
+                       if (target == m_utf8_string && evt.xselection.property == None) {
+                               *context= XCLIB_XCOUT_FALLBACK_UTF8;
+                               return;
+                       }
+                       else if (target == m_compound_text && evt.xselection.property == None) {
+                               *context= XCLIB_XCOUT_FALLBACK_COMP;
+                               return;
+                       }
+                       else if (target == m_text && evt.xselection.property == None) {
+                               *context= XCLIB_XCOUT_FALLBACK_TEXT;
+                               return;
                        }
-                       else {
-                               if(XGetWindowProperty(m_display, m_window, xevent.xselection.property , 0L, 4096L, False, AnyPropertyType, &rtype, &bits, &len, &bytes, &data) == Success) {
-                                       if (data) {
-                                               if (bits == 8 && (rtype == compound_text || rtype == a_text || rtype == a_string)) {
-                                                       tmp_data = (unsigned char*) malloc(strlen((char*)data)+1);
-                                                       strcpy((char*)tmp_data, (char*)data);
-                                               }
-                                               else
-                                                       tmp_data= NULL;
 
-                                               XFree(data);
-                                               return (GHOST_TUns8*)tmp_data;
-                                       }
-                               }
-                               return(NULL);
+                       // find the size and format of the data in property
+                       XGetWindowProperty(m_display, win, m_xclip_out, 0, 0, False,
+                               AnyPropertyType, &pty_type, &pty_format,
+                               &pty_items, &pty_size, &buffer);
+                       XFree(buffer);
+
+                       if (pty_type == m_incr) {
+                               // start INCR mechanism by deleting property
+                               XDeleteProperty(m_display, win, m_xclip_out);
+                               XFlush(m_display);
+                               *context = XCLIB_XCOUT_INCR;
+                               return;
                        }
-               }
+
+                       // if it's not incr, and not format == 8, then there's
+                       // nothing in the selection (that xclip understands, anyway)
+
+                       if (pty_format != 8) {
+                               *context = XCLIB_XCOUT_NONE;
+                               return;
+                       }
+
+                       // not using INCR mechanism, just read the property
+                       XGetWindowProperty(m_display, win, m_xclip_out, 0, (long) pty_size,
+                                       False, AnyPropertyType, &pty_type,
+                                       &pty_format, &pty_items, &pty_size, &buffer);
+
+                       // finished with property, delete it
+                       XDeleteProperty(m_display, win, m_xclip_out);
+
+                       // copy the buffer to the pointer for returned data
+                       ltxt = (unsigned char *) malloc(pty_items);
+                       memcpy(ltxt, buffer, pty_items);
+
+                       // set the length of the returned data
+                       *len = pty_items;
+                       *txt = ltxt;
+
+                       // free the buffer
+                       XFree(buffer);
+
+                       *context = XCLIB_XCOUT_NONE;
+
+                       // complete contents of selection fetched, return 1
+                       return;
+
+               case XCLIB_XCOUT_INCR:
+                       // To use the INCR method, we basically delete the
+                       // property with the selection in it, wait for an
+                       // event indicating that the property has been created,
+                       // then read it, delete it, etc.
+
+                       // make sure that the event is relevant
+                       if (evt.type != PropertyNotify)
+                               return;
+
+                       // skip unless the property has a new value
+                       if (evt.xproperty.state != PropertyNewValue)
+                               return;
+
+                       // check size and format of the property
+                       XGetWindowProperty(m_display, win, m_xclip_out, 0, 0, False,
+                               AnyPropertyType, &pty_type, &pty_format,
+                               &pty_items, &pty_size, (unsigned char **) &buffer);
+
+                       if (pty_format != 8) {
+                               // property does not contain text, delete it
+                               // to tell the other X client that we have read 
+                               // it and to send the next property
+                               XFree(buffer);
+                               XDeleteProperty(m_display, win, m_xclip_out);
+                               return;
+                       }
+
+                       if (pty_size == 0) {
+                               // no more data, exit from loop
+                               XFree(buffer);
+                               XDeleteProperty(m_display, win, m_xclip_out);
+                               *context = XCLIB_XCOUT_NONE;
+
+                               // this means that an INCR transfer is now
+                               // complete, return 1
+                               return;
+                       }
+
+                       XFree(buffer);
+
+                       // if we have come this far, the propery contains
+                       // text, we know the size.
+                       XGetWindowProperty(m_display, win, m_xclip_out, 0, (long) pty_size,
+                               False, AnyPropertyType, &pty_type, &pty_format,
+                               &pty_items, &pty_size, (unsigned char **) &buffer);
+
+                       // allocate memory to accommodate data in *txt
+                       if (*len == 0) {
+                               *len = pty_items;
+                               ltxt = (unsigned char *) malloc(*len);
+                       }
+                       else {
+                               *len += pty_items;
+                               ltxt = (unsigned char *) realloc(ltxt, *len);
+                       }
+
+                       // add data to ltxt
+                       memcpy(&ltxt[*len - pty_items], buffer, pty_items);
+
+                       *txt = ltxt;
+                       XFree(buffer);
+
+                       // delete property to get the next item
+                       XDeleteProperty(m_display, win, m_xclip_out);
+                       XFlush(m_display);
+                       return;
        }
+       return;
 }
 
-       void
-GHOST_SystemX11::
-putClipboard(
-GHOST_TInt8 *buffer, int flag) const
+GHOST_TUns8 *GHOST_SystemX11::getClipboard(int flag) const
 {
-       static Atom Primary_atom;
-       Window m_window, owner;
-       
-       if(!buffer) {return;}
+       //Flag 
+       //0 = Regular clipboard 1 = selection
        
-       if(flag == 0) {
-               Primary_atom = XInternAtom(m_display, "CLIPBOARD", False);
-               if(txt_cut_buffer) { free((void*)txt_cut_buffer); }
+       // Options for where to get the selection from
+       Atom sseln= flag ? m_primary : m_clipboard;
+       Atom target= m_string;
+       Window owner;
+
+       // from xclip.c doOut() v0.11
+       unsigned char *sel_buf;
+       unsigned long sel_len= 0;
+       XEvent evt;
+       unsigned int context= XCLIB_XCOUT_NONE;
+
+       vector<GHOST_IWindow *> & win_vec = m_windowManager->getWindows();
+       vector<GHOST_IWindow *>::iterator win_it = win_vec.begin();
+       GHOST_WindowX11 * window = static_cast<GHOST_WindowX11 *>(*win_it);
+       Window win = window->getXWindow();
+
+       /* check if we are the owner. */
+       owner= XGetSelectionOwner(m_display, sseln);
+       if (owner == win) {
+               if (sseln == m_clipboard) {
+                       sel_buf= (unsigned char *)malloc(strlen(txt_cut_buffer)+1);
+                       strcpy((char *)sel_buf, txt_cut_buffer);
+                       return((GHOST_TUns8*)sel_buf);
+               }
+               else {
+                       sel_buf= (unsigned char *)malloc(strlen(txt_select_buffer)+1);
+                       strcpy((char *)sel_buf, txt_select_buffer);
+                       return((GHOST_TUns8*)sel_buf);
+               }
+       }
+       else if (owner == None)
+               return(NULL);
+
+       while (1) {
+               /* only get an event if xcout() is doing something */
+               if (context != XCLIB_XCOUT_NONE)
+                       XNextEvent(m_display, &evt);
+
+               /* fetch the selection, or part of it */
+               getClipboard_xcout(evt, sseln, target, &sel_buf, &sel_len, &context);
+
+               /* fallback is needed. set XA_STRING to target and restart the loop. */
+               if (context == XCLIB_XCOUT_FALLBACK) {
+                       context= XCLIB_XCOUT_NONE;
+                       target= m_string;
+                       continue;
+               }
+               else if (context == XCLIB_XCOUT_FALLBACK_UTF8) {
+                       /* utf8 fail, move to compouned text. */
+                       context= XCLIB_XCOUT_NONE;
+                       target= m_compound_text;
+                       continue;
+               }
+               else if (context == XCLIB_XCOUT_FALLBACK_COMP) {
+                       /* compouned text faile, move to text. */
+                       context= XCLIB_XCOUT_NONE;
+                       target= m_text;
+                       continue;
+               }
+
+               /* only continue if xcout() is doing something */
+               if (context == XCLIB_XCOUT_NONE)
+                       break;
+       }
+
+       if (sel_len) {
+               /* only print the buffer out, and free it, if it's not
+                * empty
+                */
+               unsigned char *tmp_data = (unsigned char*) malloc(sel_len+1);
+               memcpy((char*)tmp_data, (char*)sel_buf, sel_len);
+               tmp_data[sel_len] = '\0';
                
-               txt_cut_buffer = (char*) malloc(strlen(buffer)+1);
-               strcpy(txt_cut_buffer, buffer);
-       } else {
-               Primary_atom = XInternAtom(m_display, "PRIMARY", False);
-               if(txt_select_buffer) { free((void*)txt_select_buffer); }
+               if (sseln == m_string)
+                       XFree(sel_buf);
+               else
+                       free(sel_buf);
                
-               txt_select_buffer = (char*) malloc(strlen(buffer)+1);
-               strcpy(txt_select_buffer, buffer);
+               return (GHOST_TUns8*)tmp_data;
        }
-       
-       vector<GHOST_IWindow *> & win_vec = m_windowManager->getWindows();
+       return(NULL);
+}
+
+void GHOST_SystemX11::putClipboard(GHOST_TInt8 *buffer, int flag) const
+{
+       Window m_window, owner;
+
+       vector<GHOST_IWindow *> & win_vec = m_windowManager->getWindows();      
        vector<GHOST_IWindow *>::iterator win_it = win_vec.begin();
        GHOST_WindowX11 * window = static_cast<GHOST_WindowX11 *>(*win_it);
        m_window = window->getXWindow();
 
-       if(!Primary_atom) {
-               return;
-       }
-       
-       XSetSelectionOwner(m_display, Primary_atom, m_window, CurrentTime);
-       owner = XGetSelectionOwner(m_display, Primary_atom);
-       if (owner != m_window)
-               fprintf(stderr, "failed to own primary\n");
+       if (buffer) {
+               if (flag == 0) {
+                       XSetSelectionOwner(m_display, m_clipboard, m_window, CurrentTime);
+                       owner= XGetSelectionOwner(m_display, m_clipboard);
+                       if (txt_cut_buffer)
+                               free((void*)txt_cut_buffer);
+
+                       txt_cut_buffer = (char*) malloc(strlen(buffer)+1);
+                       strcpy(txt_cut_buffer, buffer);
+               } else {
+                       XSetSelectionOwner(m_display, m_primary, m_window, CurrentTime);
+                       owner= XGetSelectionOwner(m_display, m_primary);
+                       if (txt_select_buffer)
+                               free((void*)txt_select_buffer);
+
+                       txt_select_buffer = (char*) malloc(strlen(buffer)+1);
+                       strcpy(txt_select_buffer, buffer);
+               }
        
-       return;
+               if (owner != m_window)
+                       fprintf(stderr, "failed to own primary\n");
+       }
 }
 
index 576577917ba67c0b2c6e172367733340afc9cf87..6a2c81c09a78dac1ce15d34a13db3ea877f02fcb 100644 (file)
@@ -199,14 +199,18 @@ public:
        prepareNdofInfo(
                volatile GHOST_TEventNDOFData *current_values
        );
-               
+
+       /* Helped function for get data from the clipboard. */
+       void getClipboard_xcout(XEvent evt, Atom sel, Atom target,
+                        unsigned char **txt, unsigned long *len,
+                        unsigned int *context) const;
+
        /**
         * Returns unsinged char from CUT_BUFFER0
         * @param flag          Flag indicates which buffer to return 0 for clipboard 1 for selection
         * @return              Returns the Clipboard indicated by Flag
         */
-               GHOST_TUns8*
-       getClipboard(int flag) const;
+       GHOST_TUns8 *getClipboard(int flag) const;
        
        /**
         * Puts buffer to system clipboard
@@ -220,6 +224,17 @@ public:
        Atom m_wm_protocols;
        Atom m_delete_window_atom;
 
+       /* Atoms for Selection, copy & paste. */
+       Atom m_targets;
+       Atom m_string;
+       Atom m_compound_text;
+       Atom m_text;
+       Atom m_clipboard;
+       Atom m_primary;
+       Atom m_xclip_out;
+       Atom m_incr;
+       Atom m_utf8_string;
+
 private :
 
        Display * m_display;
index 436a007dffb6332e9bf630cabc43291fa3355e16..a8b94c3f4a0276c796ffa95dc07764a0ef81bc1f 100644 (file)
@@ -4,6 +4,7 @@
        Version="9,00"\r
        Name="EXP_expressions"\r
        ProjectGUID="{EADC3C5A-6C51-4F03-8038-1553E7D7F740}"\r
+       RootNamespace="EXP_expressions"\r
        TargetFrameworkVersion="131072"\r
        >\r
        <Platforms>\r
@@ -42,7 +43,7 @@
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\kernel\gen_system;..\..\..\source\blender\makesdna"\r
+                               AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\kernel\gen_system;..\..\..\source\blender\makesdna;..\..\..\source\gameengine\SceneGraph"\r
                                PreprocessorDefinitions="WIN32;_LIB;EXP_PYTHON_EMBEDDING;_DEBUG"\r
                                BasicRuntimeChecks="3"\r
                                RuntimeLibrary="1"\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\kernel\gen_system;..\..\..\source\blender\makesdna"\r
+                               AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\kernel\gen_system;..\..\..\source\blender\makesdna;..\..\..\source\gameengine\SceneGraph"\r
                                PreprocessorDefinitions="WIN32,_LIB,EXP_PYTHON_EMBEDDING,_DEBUG"\r
                                BasicRuntimeChecks="3"\r
                                RuntimeLibrary="3"\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                InlineFunctionExpansion="1"\r
-                               AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\kernel\gen_system;..\..\..\source\blender\makesdna"\r
+                               AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\kernel\gen_system;..\..\..\source\blender\makesdna;..\..\..\source\gameengine\SceneGraph"\r
                                PreprocessorDefinitions="NDEBUG,WIN32,_LIB,EXP_PYTHON_EMBEDDING"\r
                                StringPooling="true"\r
                                RuntimeLibrary="2"\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                InlineFunctionExpansion="1"\r
-                               AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\kernel\gen_system;..\..\..\source\blender\makesdna"\r
+                               AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\kernel\gen_system;..\..\..\source\blender\makesdna;..\..\..\source\gameengine\SceneGraph"\r
                                PreprocessorDefinitions="NDEBUG,WIN32,_LIB,EXP_PYTHON_EMBEDDING"\r
                                StringPooling="true"\r
                                RuntimeLibrary="0"\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\kernel\gen_system;..\..\..\source\blender\makesdna"\r
+                               AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\kernel\gen_system;..\..\..\source\blender\makesdna;..\..\..\source\gameengine\SceneGraph"\r
                                PreprocessorDefinitions="WIN32;_LIB;EXP_PYTHON_EMBEDDING;_DEBUG"\r
                                BasicRuntimeChecks="3"\r
                                RuntimeLibrary="1"\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                InlineFunctionExpansion="1"\r
-                               AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\kernel\gen_system;..\..\..\source\blender\makesdna"\r
+                               AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\kernel\gen_system;..\..\..\source\blender\makesdna;..\..\..\source\gameengine\SceneGraph"\r
                                PreprocessorDefinitions="NDEBUG,WIN32,_LIB,EXP_PYTHON_EMBEDDING"\r
                                StringPooling="true"\r
                                RuntimeLibrary="0"\r
index e350db5dad8ac2ee68c0e0b27d8a3f88824ef485..e4d41824fb14281bf480e394cde69a8907cb1cfd 100644 (file)
@@ -4,6 +4,7 @@
        Version="9,00"\r
        Name="SCA_GameLogic"\r
        ProjectGUID="{32CC75E2-EE85-45E6-8E3D-513F58464F43}"\r
+       RootNamespace="SCA_GameLogic"\r
        TargetFrameworkVersion="131072"\r
        >\r
        <Platforms>\r
@@ -42,7 +43,7 @@
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\Rasterizer;..\..\..\source\blender\makesdna"\r
+                               AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\Rasterizer;..\..\..\source\blender\makesdna;..\..\..\source\gameengine\Scenegraph"\r
                                PreprocessorDefinitions="WIN32;_LIB;EXP_PYTHON_EMBEDDING;_DEBUG"\r
                                BasicRuntimeChecks="3"\r
                                RuntimeLibrary="1"\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                InlineFunctionExpansion="1"\r
-                               AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\Rasterizer;..\..\..\source\blender\makesdna"\r
+                               AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\Rasterizer;..\..\..\source\blender\makesdna;..\..\..\source\gameengine\Scenegraph"\r
                                PreprocessorDefinitions="NDEBUG,WIN32,_LIB,EXP_PYTHON_EMBEDDING"\r
                                StringPooling="true"\r
                                RuntimeLibrary="0"\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                InlineFunctionExpansion="1"\r
-                               AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\Rasterizer;..\..\..\source\blender\makesdna"\r
+                               AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\Rasterizer;..\..\..\source\blender\makesdna;..\..\..\source\gameengine\Scenegraph"\r
                                PreprocessorDefinitions="NDEBUG,WIN32,_LIB,EXP_PYTHON_EMBEDDING"\r
                                StringPooling="true"\r
                                RuntimeLibrary="2"\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\Rasterizer;..\..\..\source\blender\makesdna"\r
+                               AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\Rasterizer;..\..\..\source\blender\makesdna;..\..\..\source\gameengine\Scenegraph"\r
                                PreprocessorDefinitions="WIN32,_LIB,EXP_PYTHON_EMBEDDING,_DEBUG"\r
                                BasicRuntimeChecks="3"\r
                                RuntimeLibrary="3"\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\Rasterizer;..\..\..\source\blender\makesdna"\r
+                               AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\Rasterizer;..\..\..\source\blender\makesdna;..\..\..\source\gameengine\Scenegraph"\r
                                PreprocessorDefinitions="WIN32;_LIB;EXP_PYTHON_EMBEDDING;_DEBUG"\r
                                BasicRuntimeChecks="3"\r
                                RuntimeLibrary="1"\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                InlineFunctionExpansion="1"\r
-                               AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\Rasterizer;..\..\..\source\blender\makesdna"\r
+                               AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\Rasterizer;..\..\..\source\blender\makesdna;..\..\..\source\gameengine\Scenegraph"\r
                                PreprocessorDefinitions="NDEBUG,WIN32,_LIB,EXP_PYTHON_EMBEDDING"\r
                                StringPooling="true"\r
                                RuntimeLibrary="0"\r
index 80c34bef2238cc847cfdc28aa2de7871644ce586..fb812c02f4432bff7b08c63c7d29fadd4bce61d6 100644 (file)
                                RelativePath="..\..\..\source\gameengine\Ketsji\KX_PythonInitTypes.cpp"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\gameengine\Ketsji\KX_PythonSeq.cpp"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\..\source\gameengine\Ketsji\KX_RayCast.cpp"\r
                                >\r
                                RelativePath="..\..\..\source\gameengine\Ketsji\KX_PythonInitTypes.h"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\gameengine\Ketsji\KX_PythonSeq.h"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\..\source\gameengine\Ketsji\KX_RayCast.h"\r
                                >\r
index a3f43b01763a3632cc36eef2e011305f64408c11..fc197d0d1f4c20d1e32f82e9b9e0121c73fd5be5 100644 (file)
@@ -4,6 +4,7 @@
        Version="9,00"\r
        Name="KX_network"\r
        ProjectGUID="{6E24BF09-9653-4166-A871-F65CC9E98A9B}"\r
+       RootNamespace="KX_network"\r
        TargetFrameworkVersion="131072"\r
        >\r
        <Platforms>\r
@@ -42,7 +43,7 @@
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                InlineFunctionExpansion="1"\r
-                               AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\ketsji;..\..\..\..\source\gameengine\Network;..\..\..\..\source\gameengine\expressions;..\..\..\..\source\gameengine\GameLogic"\r
+                               AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\ketsji;..\..\..\..\source\gameengine\Network;..\..\..\..\source\gameengine\expressions;..\..\..\..\source\gameengine\GameLogic;..\..\..\..\source\gameengine\Scenegraph"\r
                                PreprocessorDefinitions="NDEBUG,WIN32,_LIB"\r
                                StringPooling="true"\r
                                RuntimeLibrary="0"\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\ketsji;..\..\..\..\source\gameengine\Network;..\..\..\..\source\gameengine\expressions;..\..\..\..\source\gameengine\GameLogic"\r
+                               AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\ketsji;..\..\..\..\source\gameengine\Network;..\..\..\..\source\gameengine\expressions;..\..\..\..\source\gameengine\GameLogic;..\..\..\..\source\gameengine\Scenegraph"\r
                                PreprocessorDefinitions="WIN32,_LIB,_DEBUG"\r
                                BasicRuntimeChecks="3"\r
                                RuntimeLibrary="1"\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                InlineFunctionExpansion="1"\r
-                               AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\ketsji;..\..\..\..\source\gameengine\Network;..\..\..\..\source\gameengine\expressions;..\..\..\..\source\gameengine\GameLogic"\r
+                               AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\ketsji;..\..\..\..\source\gameengine\Network;..\..\..\..\source\gameengine\expressions;..\..\..\..\source\gameengine\GameLogic;..\..\..\..\source\gameengine\Scenegraph"\r
                                PreprocessorDefinitions="NDEBUG,WIN32,_LIB"\r
                                StringPooling="true"\r
                                RuntimeLibrary="2"\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\ketsji;..\..\..\..\source\gameengine\Network;..\..\..\..\source\gameengine\expressions;..\..\..\..\source\gameengine\GameLogic"\r
+                               AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\ketsji;..\..\..\..\source\gameengine\Network;..\..\..\..\source\gameengine\expressions;..\..\..\..\source\gameengine\GameLogic;..\..\..\..\source\gameengine\Scenegraph"\r
                                PreprocessorDefinitions="WIN32,_LIB,_DEBUG"\r
                                BasicRuntimeChecks="3"\r
                                RuntimeLibrary="3"\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\ketsji;..\..\..\..\source\gameengine\Network;..\..\..\..\source\gameengine\expressions;..\..\..\..\source\gameengine\GameLogic"\r
+                               AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\ketsji;..\..\..\..\source\gameengine\Network;..\..\..\..\source\gameengine\expressions;..\..\..\..\source\gameengine\GameLogic;..\..\..\..\source\gameengine\Scenegraph"\r
                                PreprocessorDefinitions="WIN32,_LIB,_DEBUG"\r
                                BasicRuntimeChecks="3"\r
                                RuntimeLibrary="1"\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                InlineFunctionExpansion="1"\r
-                               AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\ketsji;..\..\..\..\source\gameengine\Network;..\..\..\..\source\gameengine\expressions;..\..\..\..\source\gameengine\GameLogic"\r
+                               AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\ketsji;..\..\..\..\source\gameengine\Network;..\..\..\..\source\gameengine\expressions;..\..\..\..\source\gameengine\GameLogic;..\..\..\..\source\gameengine\Scenegraph"\r
                                PreprocessorDefinitions="NDEBUG,WIN32,_LIB"\r
                                StringPooling="true"\r
                                RuntimeLibrary="0"\r
index e6991592d4028f1500219b694ac8a7d9c26cdaa7..9f16283e1cd9013eb86367f2a2a0b01aca0ed451 100644 (file)
@@ -42,7 +42,7 @@
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               AdditionalIncludeDirectories="..\..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\..\..\build\msvc_9\intern\SoundSystem\include;..\..\..\..\..\source\gameengine\Physics\common;..\..\..\..\..\source\gameengine\Physics\Bullet;..\..\..\..\..\source\gameengine\Rasterizer;..\..\..\..\..\source\gameengine\Ketsji;..\..\..\..\..\source\gameengine\Expressions;..\..\..\..\..\source\gameengine\GameLogic;..\..\..\..\..\source\gameengine\SceneGraph;..\..\..\..\..\source\kernel\gen_system;..\..\..\..\..\source\blender\makesdna"\r
+                               AdditionalIncludeDirectories="..\..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\..\..\build\msvc_9\intern\SoundSystem\include;..\..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\source\gameengine\Physics\common;..\..\..\..\..\source\gameengine\Physics\Bullet;..\..\..\..\..\source\gameengine\Rasterizer;..\..\..\..\..\source\gameengine\Ketsji;..\..\..\..\..\source\gameengine\Expressions;..\..\..\..\..\source\gameengine\GameLogic;..\..\..\..\..\source\gameengine\SceneGraph;..\..\..\..\..\source\kernel\gen_system;..\..\..\..\..\source\blender\makesdna;..\..\..\..\..\source\blender\blenkernel;..\..\..\..\..\source\blender\blenlib"\r
                                PreprocessorDefinitions="WIN32;_DEBUG;_LIB"\r
                                MinimalRebuild="false"\r
                                BasicRuntimeChecks="3"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="..\..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\..\..\build\msvc_9\intern\SoundSystem\include;..\..\..\..\..\source\gameengine\Physics\common;..\..\..\..\..\source\gameengine\Physics\Bullet;..\..\..\..\..\source\gameengine\Rasterizer;..\..\..\..\..\source\gameengine\Ketsji;..\..\..\..\..\source\gameengine\Expressions;..\..\..\..\..\source\gameengine\GameLogic;..\..\..\..\..\source\gameengine\SceneGraph;..\..\..\..\..\source\kernel\gen_system;..\..\..\..\..\source\blender\makesdna"\r
+                               AdditionalIncludeDirectories="..\..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\..\..\build\msvc_9\intern\SoundSystem\include;..\..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\source\gameengine\Physics\common;..\..\..\..\..\source\gameengine\Physics\Bullet;..\..\..\..\..\source\gameengine\Rasterizer;..\..\..\..\..\source\gameengine\Ketsji;..\..\..\..\..\source\gameengine\Expressions;..\..\..\..\..\source\gameengine\GameLogic;..\..\..\..\..\source\gameengine\SceneGraph;..\..\..\..\..\source\kernel\gen_system;..\..\..\..\..\source\blender\makesdna;..\..\..\..\..\source\blender\blenkernel;..\..\..\..\..\source\blender\blenlib"\r
                                PreprocessorDefinitions="WIN32;NDEBUG;_LIB"\r
                                RuntimeLibrary="0"\r
                                UsePrecompiledHeader="0"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="..\..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\..\..\build\msvc_9\intern\SoundSystem\include;..\..\..\..\..\source\gameengine\Physics\common;..\..\..\..\..\source\gameengine\Physics\Bullet;..\..\..\..\..\source\gameengine\Rasterizer;..\..\..\..\..\source\gameengine\Ketsji;..\..\..\..\..\source\gameengine\Expressions;..\..\..\..\..\source\gameengine\GameLogic;..\..\..\..\..\source\gameengine\SceneGraph;..\..\..\..\..\source\kernel\gen_system;..\..\..\..\..\source\blender\makesdna"\r
+                               AdditionalIncludeDirectories="..\..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\..\..\build\msvc_9\intern\SoundSystem\include;..\..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\source\gameengine\Physics\common;..\..\..\..\..\source\gameengine\Physics\Bullet;..\..\..\..\..\source\gameengine\Rasterizer;..\..\..\..\..\source\gameengine\Ketsji;..\..\..\..\..\source\gameengine\Expressions;..\..\..\..\..\source\gameengine\GameLogic;..\..\..\..\..\source\gameengine\SceneGraph;..\..\..\..\..\source\kernel\gen_system;..\..\..\..\..\source\blender\makesdna;..\..\..\..\..\source\blender\blenkernel;..\..\..\..\..\source\blender\blenlib"\r
                                PreprocessorDefinitions="WIN32;NDEBUG;_LIB"\r
                                RuntimeLibrary="0"\r
                                UsePrecompiledHeader="0"\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               AdditionalIncludeDirectories="..\..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\..\..\build\msvc_9\intern\SoundSystem\include;..\..\..\..\..\source\gameengine\Physics\common;..\..\..\..\..\source\gameengine\Physics\Bullet;..\..\..\..\..\source\gameengine\Rasterizer;..\..\..\..\..\source\gameengine\Ketsji;..\..\..\..\..\source\gameengine\Expressions;..\..\..\..\..\source\gameengine\GameLogic;..\..\..\..\..\source\gameengine\SceneGraph;..\..\..\..\..\source\kernel\gen_system;..\..\..\..\..\source\blender\makesdna"\r
+                               AdditionalIncludeDirectories="..\..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\..\..\build\msvc_9\intern\SoundSystem\include;..\..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\source\gameengine\Physics\common;..\..\..\..\..\source\gameengine\Physics\Bullet;..\..\..\..\..\source\gameengine\Rasterizer;..\..\..\..\..\source\gameengine\Ketsji;..\..\..\..\..\source\gameengine\Expressions;..\..\..\..\..\source\gameengine\GameLogic;..\..\..\..\..\source\gameengine\SceneGraph;..\..\..\..\..\source\kernel\gen_system;..\..\..\..\..\source\blender\makesdna;..\..\..\..\..\source\blender\blenkernel;..\..\..\..\..\source\blender\blenlib"\r
                                PreprocessorDefinitions="WIN32;_DEBUG;_LIB"\r
                                MinimalRebuild="false"\r
                                BasicRuntimeChecks="3"\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               AdditionalIncludeDirectories="..\..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\..\..\build\msvc_9\intern\SoundSystem\include;..\..\..\..\..\source\gameengine\Physics\common;..\..\..\..\..\source\gameengine\Physics\Bullet;..\..\..\..\..\source\gameengine\Rasterizer;..\..\..\..\..\source\gameengine\Ketsji;..\..\..\..\..\source\gameengine\Expressions;..\..\..\..\..\source\gameengine\GameLogic;..\..\..\..\..\source\gameengine\SceneGraph;..\..\..\..\..\source\kernel\gen_system;..\..\..\..\..\source\blender\makesdna"\r
+                               AdditionalIncludeDirectories="..\..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\..\..\build\msvc_9\intern\SoundSystem\include;..\..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\source\gameengine\Physics\common;..\..\..\..\..\source\gameengine\Physics\Bullet;..\..\..\..\..\source\gameengine\Rasterizer;..\..\..\..\..\source\gameengine\Ketsji;..\..\..\..\..\source\gameengine\Expressions;..\..\..\..\..\source\gameengine\GameLogic;..\..\..\..\..\source\gameengine\SceneGraph;..\..\..\..\..\source\kernel\gen_system;..\..\..\..\..\source\blender\makesdna;..\..\..\..\..\source\blender\blenkernel;..\..\..\..\..\source\blender\blenlib"\r
                                PreprocessorDefinitions="WIN32;_DEBUG;_LIB"\r
                                MinimalRebuild="false"\r
                                BasicRuntimeChecks="3"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="..\..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\..\..\build\msvc_9\intern\SoundSystem\include;..\..\..\..\..\source\gameengine\Physics\common;..\..\..\..\..\source\gameengine\Physics\Bullet;..\..\..\..\..\source\gameengine\Rasterizer;..\..\..\..\..\source\gameengine\Ketsji;..\..\..\..\..\source\gameengine\Expressions;..\..\..\..\..\source\gameengine\GameLogic;..\..\..\..\..\source\gameengine\SceneGraph;..\..\..\..\..\source\kernel\gen_system;..\..\..\..\..\source\blender\makesdna"\r
+                               AdditionalIncludeDirectories="..\..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\..\..\build\msvc_9\intern\SoundSystem\include;..\..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\source\gameengine\Physics\common;..\..\..\..\..\source\gameengine\Physics\Bullet;..\..\..\..\..\source\gameengine\Rasterizer;..\..\..\..\..\source\gameengine\Ketsji;..\..\..\..\..\source\gameengine\Expressions;..\..\..\..\..\source\gameengine\GameLogic;..\..\..\..\..\source\gameengine\SceneGraph;..\..\..\..\..\source\kernel\gen_system;..\..\..\..\..\source\blender\makesdna;..\..\..\..\..\source\blender\blenkernel;..\..\..\..\..\source\blender\blenlib"\r
                                PreprocessorDefinitions="WIN32;NDEBUG;_LIB"\r
                                RuntimeLibrary="2"\r
                                UsePrecompiledHeader="0"\r
index d3d35ff4826cb11d67a56c3c5de7adab8f405b45..dde8714507a63cf25e0a483ae17933994a1d4aad 100644 (file)
@@ -43,7 +43,7 @@
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Expressions;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\blender\makesdna"\r
+                               AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Expressions;..\..\..\source\gameengine\SceneGraph;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\blender\makesdna"\r
                                PreprocessorDefinitions="_DEBUG;WIN32;_LIB;WITH_GLEXT"\r
                                BasicRuntimeChecks="3"\r
                                RuntimeLibrary="1"\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                InlineFunctionExpansion="1"\r
-                               AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Expressions;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\blender\makesdna"\r
+                               AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Expressions;..\..\..\source\gameengine\SceneGraph;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\blender\makesdna"\r
                                PreprocessorDefinitions="NDEBUG,WIN32,_LIB"\r
                                StringPooling="true"\r
                                RuntimeLibrary="2"\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                InlineFunctionExpansion="1"\r
-                               AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Expressions;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\blender\makesdna"\r
+                               AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Expressions;..\..\..\source\gameengine\SceneGraph;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\blender\makesdna"\r
                                PreprocessorDefinitions="NDEBUG;WIN32;_LIB;WITH_GLEXT"\r
                                StringPooling="true"\r
                                RuntimeLibrary="0"\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Expressions;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\blender\makesdna"\r
+                               AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Expressions;..\..\..\source\gameengine\SceneGraph;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\blender\makesdna"\r
                                PreprocessorDefinitions="_DEBUG,WIN32,_LIB"\r
                                BasicRuntimeChecks="3"\r
                                RuntimeLibrary="3"\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Expressions;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\blender\makesdna"\r
+                               AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Expressions;..\..\..\source\gameengine\SceneGraph;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\blender\makesdna"\r
                                PreprocessorDefinitions="_DEBUG;WIN32;_LIB;WITH_GLEXT"\r
                                BasicRuntimeChecks="3"\r
                                RuntimeLibrary="1"\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                InlineFunctionExpansion="1"\r
-                               AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Expressions;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\blender\makesdna"\r
+                               AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Expressions;..\..\..\source\gameengine\SceneGraph;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\blender\makesdna"\r
                                PreprocessorDefinitions="NDEBUG;WIN32;_LIB;WITH_GLEXT"\r
                                StringPooling="true"\r
                                RuntimeLibrary="0"\r
index 77142079b802916647e045d7e0b5209e94ba21cb..09b87f41ddf7c4c3d189a86c110deabe3ba68672 100644 (file)
@@ -43,7 +43,7 @@
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\Rasterizer;..\..\..\..\source\blender\gpu;..\..\..\..\source\gameengine\Ketsji;..\..\..\..\source\blender\makesdna;..\..\..\..\source\blender\blenkernel;..\..\..\..\source\blender\blenlib"\r
+                               AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\Rasterizer;..\..\..\..\source\gameengine\SceneGraph;..\..\..\..\source\blender\gpu;..\..\..\..\source\gameengine\Ketsji;..\..\..\..\source\blender\makesdna;..\..\..\..\source\blender\blenkernel;..\..\..\..\source\blender\blenlib"\r
                                PreprocessorDefinitions="_DEBUG,WIN32,_LIB"\r
                                BasicRuntimeChecks="3"\r
                                RuntimeLibrary="3"\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\Rasterizer;..\..\..\..\source\blender\gpu;..\..\..\..\source\gameengine\Ketsji;..\..\..\..\source\blender\makesdna;..\..\..\..\source\blender\blenkernel;..\..\..\..\source\blender\blenlib"\r
+                               AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\Rasterizer;..\..\..\..\source\gameengine\SceneGraph;..\..\..\..\source\blender\gpu;..\..\..\..\source\gameengine\Ketsji;..\..\..\..\source\blender\makesdna;..\..\..\..\source\blender\blenkernel;..\..\..\..\source\blender\blenlib"\r
                                PreprocessorDefinitions="_DEBUG;WIN32;_LIB;WITH_GLEXT"\r
                                BasicRuntimeChecks="3"\r
                                RuntimeLibrary="1"\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                InlineFunctionExpansion="1"\r
-                               AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\Rasterizer;..\..\..\..\source\blender\gpu;..\..\..\..\source\gameengine\Ketsji;..\..\..\..\source\blender\makesdna;..\..\..\..\source\blender\blenkernel;..\..\..\..\source\blender\blenlib"\r
+                               AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\Rasterizer;..\..\..\..\source\gameengine\SceneGraph;..\..\..\..\source\blender\gpu;..\..\..\..\source\gameengine\Ketsji;..\..\..\..\source\blender\makesdna;..\..\..\..\source\blender\blenkernel;..\..\..\..\source\blender\blenlib"\r
                                PreprocessorDefinitions="NDEBUG,WIN32,_LIB"\r
                                StringPooling="true"\r
                                RuntimeLibrary="2"\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                InlineFunctionExpansion="1"\r
-                               AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\Rasterizer;..\..\..\..\source\blender\gpu;..\..\..\..\source\gameengine\Ketsji;..\..\..\..\source\blender\makesdna;..\..\..\..\source\blender\blenkernel;..\..\..\..\source\blender\blenlib"\r
+                               AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\Rasterizer;..\..\..\..\source\gameengine\SceneGraph;..\..\..\..\source\blender\gpu;..\..\..\..\source\gameengine\Ketsji;..\..\..\..\source\blender\makesdna;..\..\..\..\source\blender\blenkernel;..\..\..\..\source\blender\blenlib"\r
                                PreprocessorDefinitions="NDEBUG;WIN32;_LIB;WITH_GLEXT"\r
                                StringPooling="true"\r
                                RuntimeLibrary="0"\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\Rasterizer;..\..\..\..\source\blender\gpu;..\..\..\..\source\gameengine\Ketsji;..\..\..\..\source\blender\makesdna;..\..\..\..\source\blender\blenkernel;..\..\..\..\source\blender\blenlib"\r
+                               AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\Rasterizer;..\..\..\..\source\gameengine\SceneGraph;..\..\..\..\source\blender\gpu;..\..\..\..\source\gameengine\Ketsji;..\..\..\..\source\blender\makesdna;..\..\..\..\source\blender\blenkernel;..\..\..\..\source\blender\blenlib"\r
                                PreprocessorDefinitions="_DEBUG;WIN32;_LIB;WITH_GLEXT"\r
                                BasicRuntimeChecks="3"\r
                                RuntimeLibrary="1"\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                InlineFunctionExpansion="1"\r
-                               AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\Rasterizer;..\..\..\..\source\blender\gpu;..\..\..\..\source\gameengine\Ketsji;..\..\..\..\source\blender\makesdna;..\..\..\..\source\blender\blenkernel;..\..\..\..\source\blender\blenlib"\r
+                               AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\Rasterizer;..\..\..\..\source\gameengine\SceneGraph;..\..\..\..\source\blender\gpu;..\..\..\..\source\gameengine\Ketsji;..\..\..\..\source\blender\makesdna;..\..\..\..\source\blender\blenkernel;..\..\..\..\source\blender\blenlib"\r
                                PreprocessorDefinitions="NDEBUG;WIN32;_LIB;WITH_GLEXT"\r
                                StringPooling="true"\r
                                RuntimeLibrary="0"\r
index 9c63f6258202e0afcef354abdbfaa45f83e36e8f..95e61cc4af894513a256b11c940979c48e7b49ea 100644 (file)
@@ -4,6 +4,7 @@
        Version="9,00"\r
        Name="SG_SceneGraph"\r
        ProjectGUID="{09222F5E-1625-4FF3-A89A-384D16875EE5}"\r
+       RootNamespace="SG_SceneGraph"\r
        TargetFrameworkVersion="131072"\r
        >\r
        <Platforms>\r
                                RelativePath="..\..\..\source\gameengine\SceneGraph\SG_Controller.h"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\gameengine\SceneGraph\SG_DList.h"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\..\source\gameengine\SceneGraph\SG_IObject.h"\r
                                >\r
                                RelativePath="..\..\..\source\gameengine\SceneGraph\SG_ParentRelation.h"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\gameengine\SceneGraph\SG_QList.h"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\..\source\gameengine\SceneGraph\SG_Spatial.h"\r
                                >\r
index 54e1ea3db331c39853c5f35c5c96d3da3cf70802..87680bce1b0cb0b236c1180b54ddb2b53c7a2326 100644 (file)
@@ -7,7 +7,7 @@ Group: 'Export'
 Tooltip: 'Export to 3DS file format (.3ds).'
 """
 
-__author__ = ["Campbell Barton", "Bob Holcomb", "Richard Lärkäng", "Damien McGinnes", "Mark Stijnman"]
+__author__ = ["Campbell Barton", "Bob Holcomb", "Richard Lärkäng", "Damien McGinnes", "Mark Stijnman"]
 __url__ = ("blenderartists.org", "www.blender.org", "www.gametutorials.com", "lib3ds.sourceforge.net/")
 __version__ = "0.90a"
 __bpydoc__ = """\
@@ -50,7 +50,10 @@ import Blender
 import bpy
 from BPyMesh import getMeshFromObject
 from BPyObject import getDerivedObjects
-import struct
+try: 
+    import struct
+except: 
+    struct = None
 
 # So 3ds max can open files, limit names to 12 in length
 # this is verry annoying for filenames!
@@ -1009,5 +1012,8 @@ def save_3ds(filename):
 
 
 if __name__=='__main__':
-       Blender.Window.FileSelector(save_3ds, "Export 3DS", Blender.sys.makename(ext='.3ds'))
+    if struct:
+        Blender.Window.FileSelector(save_3ds, "Export 3DS", Blender.sys.makename(ext='.3ds'))
+    else:
+        Blender.Draw.PupMenu("Error%t|This script requires a full python installation")
 # save_3ds('/test_b.3ds')
index 1963d2e74337448b8257ad35a6159b4fecd07e5a..bcde82c486958250a82f24231adcf26fa9925ae3 100644 (file)
@@ -133,10 +133,12 @@ import BPyImage
 
 import BPyMessages
 
-import struct
-from struct import calcsize, unpack
+try:
+       from struct import calcsize, unpack
+except:
+       calcsize= unpack= None
+
 
-import os
 
 # If python version is less than 2.4, try to get set stuff from module
 try:
@@ -958,7 +960,10 @@ def load_3ds(filename, PREF_UI= True):
 
 DEBUG= False
 if __name__=='__main__' and not DEBUG:
-       Blender.Window.FileSelector(load_3ds, 'Import 3DS', '*.3ds')
+       if calcsize==None:
+               Blender.Draw.PupMenu('Error%t|a full python installation not found') 
+       else:
+               Blender.Window.FileSelector(load_3ds, 'Import 3DS', '*.3ds')
 
 # For testing compatibility
 #load_3ds('/metavr/convert/vehicle/truck_002/TruckTanker1.3DS', False)
@@ -966,6 +971,7 @@ if __name__=='__main__' and not DEBUG:
 '''
 
 else:
+       import os
        # DEBUG ONLY
        TIME= Blender.sys.time()
        import os
index b8bdae4de2b5e66f2156e60cb35dbae6de7ebc95..8a0ecaf0eb7641da7d3cf1144a66b9639b5c4c03 100644 (file)
@@ -45,7 +45,8 @@ from Blender import Types, Object, NMesh, Material,Armature,Mesh
 from Blender.Mathutils import *
 from Blender import Draw, BGL
 from Blender.BGL import *
-import math
+try: import math
+except: math = None
 
 global mat_flip,index_list,space,bone_list,mat_dict
 global anim,flip_norm,swap_zy,flip_z,speed,ticks,no_light,recalc_norm,Bl_norm
index 4f759256497b66dfe9f26c5a545667f9df9bf75f..2941c56420e43555e97e3e822d38a11fa1ad4b68 100644 (file)
@@ -6,7 +6,8 @@ Group: 'AddMesh'
 """
 import BPyAddMesh
 import Blender
-from math import cos, sin, pi
+try: from math import cos, sin, pi
+except: math = None
 
 def add_torus(PREF_MAJOR_RAD, PREF_MINOR_RAD, PREF_MAJOR_SEG, PREF_MINOR_SEG):
        Vector = Blender.Mathutils.Vector
@@ -61,5 +62,8 @@ def main():
        
        BPyAddMesh.add_mesh_simple('Torus', verts, [], faces)
 
-main()
+if cos and sin and pi:
+    main()
+else:
+    Blender.Draw.PupMenu("Error%t|This script requires a full python installation")
 
diff --git a/release/scripts/bpymodules/BPyMesh_octree.py b/release/scripts/bpymodules/BPyMesh_octree.py
deleted file mode 100644 (file)
index 368a334..0000000
+++ /dev/null
@@ -1,332 +0,0 @@
-from Blender import *
-
-try:
-       import psyco
-       psyco.full()
-except:
-       print 'no psyco for you!'
-
-DotVecs= Mathutils.DotVecs
-#======================================================== 
-# SPACIAL TREE - Seperate Class - use if you want to
-# USed for getting vert is a proximity
-LEAF_SIZE = 128
-class octreeNode:
-       def __init__(self, verts, parent):
-               
-               # Assunme we are a leaf node, until split is run.
-               self.verts = verts 
-               self.children = []
-               
-               if parent == None: # ROOT NODE, else set bounds when making children,
-                       # BOUNDS
-                       v= verts[0]
-                       maxx,maxy,maxz= v.co
-                       minx,miny,minz= maxx,maxy,maxz
-                       
-                       for v in verts:
-                               x,y,z= v.co
-                               if x>maxx: maxx= x
-                               if y>maxy: maxy= y
-                               if z>maxz: maxz= z
-                               
-                               if x<minx: minx= x
-                               if y<miny: miny= y
-                               if z<minz: minz= z
-                       
-                       self.minx= minx
-                       self.miny= miny
-                       self.minz= minz
-                       
-                       self.maxx= maxx
-                       self.maxy= maxy
-                       self.maxz= maxz
-                       
-                       # We have no parent to split us so split ourselves.
-                       #self.setCornerPoints()
-                       self.splitNode()
-                       
-       def splitNode(self):
-               if len(self.verts) > LEAF_SIZE:
-                       self.makeChildren() # 8 new children,
-                       self.verts = None
-               # Alredy assumed a leaf not so dont do anything here.
-               
-       def makeChildren(self):
-               verts= self.verts
-               # Devide into 8 children.
-               axisDividedVerts = [[],[],[],[],[],[],[],[]] # Verts Only
-               
-               
-               divx = (self.maxx + self.minx) / 2
-               divy = (self.maxy + self.miny) / 2
-               divz = (self.maxz + self.minz) / 2
-               
-               # Sort into 8
-               for v in verts:
-                       x,y,z = v.co
-                       
-                       if x > divx:
-                               if y > divy:
-                                       if z > divz:
-                                               axisDividedVerts[0].append(v)
-                                       else:
-                                               axisDividedVerts[1].append(v)
-                               else:
-                                       if z > divz:
-                                               axisDividedVerts[2].append(v)
-                                       else:
-                                               axisDividedVerts[3].append(v)
-                       else:
-                               if y > divy:
-                                       if z > divz:
-                                               axisDividedVerts[4].append(v)
-                                       else:
-                                               axisDividedVerts[5].append(v)
-                               else:
-                                       if z > divz:
-                                               axisDividedVerts[6].append(v)
-                                       else:
-                                               axisDividedVerts[7].append(v)
-                                       
-               # populate self.children
-               for i in xrange(8):
-                       octNode = octreeNode(axisDividedVerts[i], self)
-                       # Set bounds manually
-                       if i == 0:
-                               octNode.minx = divx
-                               octNode.maxx = self.maxx
-                               octNode.miny = divy
-                               octNode.maxy = self.maxy
-                               octNode.minz = divz
-                               octNode.maxz = self.maxz
-                       elif i == 1:
-                               octNode.minx = divx
-                               octNode.maxx = self.maxx
-                               octNode.miny = divy
-                               octNode.maxy = self.maxy
-                               octNode.minz = self.minz #
-                               octNode.maxz = divz #
-                       elif i == 2:
-                               octNode.minx = divx
-                               octNode.maxx = self.maxx
-                               octNode.miny = self.miny  # 
-                               octNode.maxy = divy #
-                               octNode.minz = divz
-                               octNode.maxz = self.maxz
-                       elif i == 3:
-                               octNode.minx = divx
-                               octNode.maxx = self.maxx
-                               octNode.miny = self.miny #
-                               octNode.maxy = divy #
-                               octNode.minz = self.minz #
-                               octNode.maxz = divz #
-                       elif i == 4:
-                               octNode.minx = self.minx #
-                               octNode.maxx = divx #
-                               octNode.miny = divy
-                               octNode.maxy = self.maxy
-                               octNode.minz = divz
-                               octNode.maxz = self.maxz
-                       elif i == 5:
-                               octNode.minx = self.minx #
-                               octNode.maxx = divx #
-                               octNode.miny = divy
-                               octNode.maxy = self.maxy
-                               octNode.minz = self.minz #
-                               octNode.maxz = divz #
-                       elif i == 6:
-                               octNode.minx = self.minx #
-                               octNode.maxx = divx #
-                               octNode.miny = self.miny  # 
-                               octNode.maxy = divy #
-                               octNode.minz = divz
-                               octNode.maxz = self.maxz
-                       elif i == 7:
-                               octNode.minx = self.minx #
-                               octNode.maxx = divx #
-                               octNode.miny = self.miny  # 
-                               octNode.maxy = divy #
-                               octNode.minz = self.minz #
-                               octNode.maxz = divz #
-                       #octNode.setCornerPoints()
-                       octNode.splitNode() # Splits the node if it can.
-                       self.children.append(octNode)
-       
-       # GETS VERTS IN A Distance RANGE-
-       def getVertsInRange(self, loc, normal, range_val, vertList):
-               #loc= Mathutils.Vector(loc)                     # MUST BE VECTORS
-               #normal= Mathutils.Vector(normal)       
-
-               '''
-               loc: Vector of the location to search from
-               normal: None or Vector - if a vector- will only get verts on this side of the vector
-               range_val: maximum distance. A negative value will fill the list with teh closest vert only.
-               vertList: starts as an empty list
-               list that this function fills with verts that match
-               '''
-               xloc,yloc,zloc= loc
-               
-               if range_val<0:
-                       range_val= -range_val
-                       FIND_CLOSEST= True
-                       vertList.append(None) # just update the 1 vertex
-               else:
-                       FIND_CLOSEST= False
-               
-               if self.children:
-                       # Check if the bounds are in range_val,
-                       for childNode in self.children:
-                               # First test if we are surrounding the point.
-                               if\
-                               childNode.minx - range_val < xloc and\
-                               childNode.maxx + range_val > xloc and\
-                               childNode.miny - range_val < yloc and\
-                               childNode.maxy + range_val > yloc and\
-                               childNode.minz - range_val < zloc and\
-                               childNode.maxz + range_val > zloc:
-                                       # Recurse down or get virts.
-                                       childNode.getVertsInRange(loc, normal, range_val, vertList)
-                                       #continue # Next please
-               
-               else: # we are a leaf node. Test vert locations.
-                       if not normal:
-                               # Length only check
-                               for v in self.verts:
-                                       length = (loc - v.co).length
-                                       if length < range_val:
-                                               if FIND_CLOSEST:
-                                                       # Just update the 1 vert
-                                                       vertList[0]= (v, length)
-                                                       range_val= length # Shink the length so we only get verts from their.
-                                               else:
-                                                       vertList.append((v, length))
-                       else:
-                               # Lengh and am I infront of the vert.
-                               for v in self.verts:
-                                       length = (loc - v.co).length
-                                       if length < range_val:
-                                               # Check if the points in front
-                                               dot= DotVecs(normal, loc) - DotVecs(normal, v.co)
-                                               if dot<0:
-                                                       vertList.append((v, length))
-                               
-# END TREE
-
-
-
-
-# EXAMPLE RADIO IN PYTHON USING THE ABOVE FUNCTION
-"""
-import BPyMesh
-# Radio bake
-def bake():
-       
-       _AngleBetweenVecs_= Mathutils.AngleBetweenVecs
-       def AngleBetweenVecs(a1,a2):
-               try:
-                       return _AngleBetweenVecs_(a1,a2)
-               except:
-                       return 180
-       
-       
-       
-       scn = Scene.GetCurrent()
-       ob = scn.getActiveObject()
-       me = ob.getData(mesh=1)
-       
-       dist= Draw.PupFloatInput('MaxDist:', 2.0, 0.1, 20.0, 0.1, 3)
-       if dist==None:
-               return
-       
-       # Make nice normals
-       BPyMesh.meshCalcNormals(me)
-       
-       
-       len_verts= len(me.verts)
-       #me.sel= False
-       meshOctTree = octreeNode(me.verts, None)
-
-       
-       
-       # Store face areas
-       vertex_areas= [0.0] * len_verts
-       
-       # Get vertex areas - all areas of face users
-       for f in me.faces:
-               a= f.area
-               for v in f.v:
-                       vertex_areas[v.index] += a
-                       
-       
-       
-       bias= 0.001
-       
-       t= sys.time()
-       
-       # Tone for the verts
-       vert_tones= [0.0] * len_verts
-       maxtone= 0.0
-       mintone= 100000000
-       for i, v in enumerate(me.verts):
-               if not i%10:
-                       print 'verts to go', len_verts-i
-               v_co= v.co
-               v_no= v.no
-               verts_in_range= []
-               meshOctTree.getVertsInRange(v_co, v_no, dist, verts_in_range)
-               
-               tone= 0.0
-               # These are verts in our range
-               for test_v, length in verts_in_range:
-                       if bias<length:
-                               try:
-                                       # Make sure this isnt a back facing vert
-                                       normal_diff= AngleBetweenVecs(test_v.no, v_no)
-                               except:
-                                       continue
-                               
-                               if normal_diff > 90: # were facing this vert
-                                       #if 1:  
-                                       # Current value us between zz90 and 180
-                                       # make between 0 and 90
-                                       # so 0 is right angles and 90 is direct opposite vertex normal
-                                       normal_diff= (normal_diff-90)
-                                       
-                                       # Vertex area needs to be taken into account so we dont have small faces over influencing.
-                                       vertex_area= vertex_areas[test_v.index]
-                                       
-                                       # Get the angle the vertex is in location from the location and normal of the vert.
-                                       above_diff= AngleBetweenVecs(test_v.co-v.co, v_no)
-                                       ## Result will be between 0 :above and 90: horizon.. invert this so horizon has littel effect
-                                       above_diff= 90-above_diff
-                                       # dist-length or 1.0/length both work well
-                                       tone= (dist-length) * vertex_area * above_diff * normal_diff
-                                       vert_tones[i] += tone
-               
-               if maxtone<vert_tones[i]:
-                       maxtone= vert_tones[i]
-               if mintone>vert_tones[i]:
-                       mintone= vert_tones[i]
-       
-       
-       if not maxtone:
-               Draw.PupMenu('No verts in range, use a larger range')
-               return
-       
-       # Apply tones
-       for f in me.faces:
-               f_col= f.col
-               for i, v in enumerate(f.v):
-                       c= f_col[i]
-                       v_index= v.index
-                       tone= int(((maxtone - vert_tones[v.index]) / maxtone) * 255 )
-                       #print tone
-                       c.r= c.g= c.b= tone
-       
-       print 'time', sys.time()-t
-       
-       
-if __name__=="__main__":
-       bake()
-"""
\ No newline at end of file
index 5390be084eef00eb68b83001c3f777e81b107e9c..55907e03bc13c63d76061bc95eb1b9aef260ee37 100644 (file)
@@ -307,6 +307,10 @@ class PolyLine(_Entity):
                self.points=points
                self.org_point=org_point
                self.flag=flag
+               self.polyface = False
+               self.polyline2d = False
+               self.faces = [] # dummy value
+               self.width= None # dummy value
                if self.flag & POLYFACE_MESH:
                        self.polyface=True
                        self.points=points[0]
@@ -329,7 +333,7 @@ class PolyLine(_Entity):
                        result+=' 71\n%s\n' %self.p_count
                        result+=' 72\n%s\n' %self.f_count
                elif self.polyline2d:
-                       if self.width: result+=' 40\n%s\n 41\n%s\n' %(self.width[0],self.width[1])
+                       if self.width!=None: result+=' 40\n%s\n 41\n%s\n' %(self.width[0],self.width[1])
                for point in self.points:
                        result+='  0\nVERTEX\n'
                        result+='  8\n%s\n' %self.layer
index a52e622a65bc66f9ac92d14d5cdeac1dc9e3cd98..a72e8c060b4779d40b93ca2dea6e778c9c402027 100644 (file)
@@ -4,7 +4,7 @@
 Name: 'Envelope Symmetry'
 Blender: 234
 Group: 'Animation'
-Tooltip: 'Make envelope symetrical'
+Tooltip: 'Make envelope symmetrical'
 """
 
 __author__ = "Jonas Petersen"
index 99c6acaceabbffef6961c3e8aec4f88a23a803e3..84a173c1e7de8b950d60da328cf8acdc055a934b 100644 (file)
@@ -94,37 +94,40 @@ ______________________________________________________________
 import Blender
 from Blender import Mathutils, Window, Scene, sys, Draw, Mesh
 import BPyMessages
-import os
-import subprocess
+try: import os
+except: os = None
+try: import subprocess
+except: subprocess = None
+try: import copy
+except: copy = None
 
 #print os.sys.platform
 #print dir(os.sys.version)
 
 #import dxfLibrary
 #reload(dxfLibrary)
-from  dxfLibrary import *
-
-
-#-------- DWG support ------------------------------------------
-extCONV_OK = True
-extCONV = 'DConvertCon.exe'
-extCONV_PATH = os.path.join(Blender.Get('scriptsdir'),extCONV)
-if not os.path.isfile(extCONV_PATH):
-       extCONV_OK = False
-       extCONV_TEXT = 'DWG-Exporter: Abort, nothing done!|\
-Copy first %s into Blender script directory.|\
-More details in online Help.' %extCONV
-else:
-       if not os.sys.platform.startswith('win'):
-               # check if Wine installed:   
-               if subprocess.Popen(('which', 'winepath'), stdout=subprocess.PIPE).stdout.read().strip():
-                       extCONV_PATH    = 'wine %s'%extCONV_PATH
-               else: 
-                       extCONV_OK = False
-                       extCONV_TEXT = 'DWG-Exporter: Abort, nothing done!|\
-The external DWG-converter (%s) needs Wine installed on your system.|\
-More details in online Help.' %extCONV
-#print 'extCONV_PATH = ', extCONV_PATH
+if copy and os:
+    from  dxfLibrary import *
+    #-------- DWG support ------------------------------------------
+    extCONV_OK = True
+    extCONV = 'DConvertCon.exe'
+    extCONV_PATH = os.path.join(Blender.Get('scriptsdir'),extCONV)
+    if not os.path.isfile(extCONV_PATH):
+        extCONV_OK = False
+        extCONV_TEXT = 'DWG-Exporter: Abort, nothing done!|\
+    Copy first %s into Blender script directory.|\
+    More details in online Help.' %extCONV
+    else:
+        if not os.sys.platform.startswith('win'):
+            # check if Wine installed:   
+            if subprocess.Popen(('which', 'winepath'), stdout=subprocess.PIPE).stdout.read().strip():
+                extCONV_PATH    = 'wine %s'%extCONV_PATH
+            else: 
+                extCONV_OK = False
+                extCONV_TEXT = 'DWG-Exporter: Abort, nothing done!|\
+    The external DWG-converter (%s) needs Wine installed on your system.|\
+    More details in online Help.' %extCONV
+    #print 'extCONV_PATH = ', extCONV_PATH
 
 
 
@@ -526,7 +529,8 @@ http://wiki.blender.org/index.php?title=Scripts/Manual/Export/autodesk_dxf')
 
 #-----------------------------------------------------
 if __name__=='__main__':
-       #main()
-       if not copy:
-               Draw.PupMenu('Error%t|This script requires a full python install')
-       else: Window.FileSelector(dxf_export_ui, 'EXPORT DXF', sys.makename(ext='.dxf'))
\ No newline at end of file
+    #main()
+    if copy and os and subprocess:
+        Window.FileSelector(dxf_export_ui, 'EXPORT DXF', sys.makename(ext='.dxf'))
+    else:
+        Draw.PupMenu('Error%t|This script requires a full python install')
index 730776bf1b8ff9a2c0a6fd02f069456e2045bc1b..4115140a852cb8d51072e325603efd94e8b67ced 100644 (file)
@@ -1,13 +1,13 @@
 #!BPY
 """
 Name: 'Autodesk FBX (.fbx)...'
-Blender: 244
+Blender: 249
 Group: 'Export'
 Tooltip: 'Selection to an ASCII Autodesk FBX '
 """
 __author__ = "Campbell Barton"
 __url__ = ['www.blender.org', 'blenderartists.org']
-__version__ = "1.1"
+__version__ = "1.2"
 
 __bpydoc__ = """\
 This script is an exporter to the FBX file format.
@@ -93,8 +93,8 @@ def copy_images(dest_dir, textures):
                dest_dir += Blender.sys.sep
        
        image_paths = set()
-       for img in textures:
-               image_paths.add(Blender.sys.expandpath(img.filename))
+       for tex in textures:
+               image_paths.add(Blender.sys.expandpath(tex.filename))
        
        # Now copy images
        copyCount = 0
@@ -157,14 +157,29 @@ def increment_string(t):
 # todo - Disallow the name 'Scene' and 'blend_root' - it will bugger things up.
 def sane_name(data, dct):
        #if not data: return None
-       name = data.name
+       
+       if type(data)==tuple: # materials are paired up with images
+               data, other = data
+               use_other = True
+       else:
+               other = None
+               use_other = False
+       
+       if data:        name = data.name
+       else:           name = None
+       orig_name = name
+       
+       if other:
+               orig_name_other = other.name
+               name = '%s #%s' % (name, orig_name_other)
+       else:
+               orig_name_other = None
        
        # dont cache, only ever call once for each data type now,
        # so as to avoid namespace collision between types - like with objects <-> bones
        #try:           return dct[name]
        #except:                pass
        
-       orig_name = name
        if not name:
                name = 'unnamed' # blank string, ASKING FOR TROUBLE!
        else:
@@ -173,7 +188,11 @@ def sane_name(data, dct):
        
        while name in dct.itervalues(): name = increment_string(name)
        
-       dct[orig_name] = name
+       if use_other: # even if other is None - orig_name_other will be a string or None
+               dct[orig_name, orig_name_other] = name
+       else:
+               dct[orig_name] = name
+               
        return name
 
 def sane_obname(data):         return sane_name(data, sane_name_mapping_ob)
@@ -511,7 +530,7 @@ def write(filename, batch_objects = None, \
        if time:
                curtime = time.localtime()[0:6]
        else:
-               curtime = [0,0,0,0,0,0]
+               curtime = (0,0,0,0,0,0)
        # 
        file.write(\
 '''FBXHeaderExtension:  {
@@ -983,7 +1002,7 @@ def write(filename, batch_objects = None, \
                #eDIRECTIONAL
                #eSPOT
                light_type = light.type
-               if light_type > 3: light_type = 0
+               if light_type > 2: light_type = 1 # hemi and area lights become directional
                
                mode = light.mode
                if mode & Blender.Lamp.Modes.RayShadow or mode & Blender.Lamp.Modes.Shadows:
@@ -1333,17 +1352,20 @@ def write(filename, batch_objects = None, \
                me = my_mesh.blenData
                
                # if there are non NULL materials on this mesh
-               if [mat for mat in my_mesh.blenMaterials if mat]:       do_materials = True
-               else:                                                                                           do_materials = False
+               if my_mesh.blenMaterials:       do_materials = True
+               else:                                           do_materials = False
                
                if my_mesh.blenTextures:        do_textures = True
-               else:                                           do_textures = False                     
+               else:                                           do_textures = False     
+               
+               do_uvs = me.faceUV
                
                
                file.write('\n\tModel: "Model::%s", "Mesh" {' % my_mesh.fbxName)
                file.write('\n\t\tVersion: 232') # newline is added in write_object_props
                
-               write_object_props(my_mesh.blenObject, None, my_mesh.parRelMatrix())
+               poseMatrix = write_object_props(my_mesh.blenObject, None, my_mesh.parRelMatrix())[3]
+               pose_items.append((my_mesh.fbxName, poseMatrix))
                
                file.write('\n\t\t}')
                file.write('\n\t\tMultiLayer: 0')
@@ -1385,22 +1407,18 @@ def write(filename, batch_objects = None, \
                                else:                           file.write(',%i,%i,%i,%i' % fi )
                        i+=1
                
-               ed_val = [None, None]
-               LOOSE = Blender.Mesh.EdgeFlags.LOOSE
+               file.write('\n\t\tEdges: ')
+               i=-1
                for ed in me.edges:
-                       if ed.flag & LOOSE:
-                               ed_val[0] = ed.v1.index
-                               ed_val[1] = -(ed.v2.index+1)
                                if i==-1:
-                                       file.write('%i,%i' % tuple(ed_val) )
+                                       file.write('%i,%i' % (ed.v1.index, ed.v2.index))
                                        i=0
                                else:
                                        if i==13:
                                                file.write('\n\t\t')
                                                i=0
-                                       file.write(',%i,%i' % tuple(ed_val) )
+                                       file.write(',%i,%i' % (ed.v1.index, ed.v2.index))
                                i+=1
-               del LOOSE
                
                file.write('\n\t\tGeometryVersion: 124')
                
@@ -1423,6 +1441,51 @@ def write(filename, batch_objects = None, \
                        i+=1
                file.write('\n\t\t}')
                
+               # Write Face Smoothing
+               file.write('''
+               LayerElementSmoothing: 0 {
+                       Version: 102
+                       Name: ""
+                       MappingInformationType: "ByPolygon"
+                       ReferenceInformationType: "Direct"
+                       Smoothing: ''')
+               
+               i=-1
+               for f in me.faces:
+                       if i==-1:
+                               file.write('%i' % f.smooth);    i=0
+                       else:
+                               if i==54:
+                                       file.write('\n                   ');    i=0
+                               file.write(',%i' % f.smooth)
+                       i+=1
+               
+               file.write('\n\t\t}')
+               
+               # Write Edge Smoothing
+               file.write('''
+               LayerElementSmoothing: 0 {
+                       Version: 101
+                       Name: ""
+                       MappingInformationType: "ByEdge"
+                       ReferenceInformationType: "Direct"
+                       Smoothing: ''')
+               
+               SHARP = Blender.Mesh.EdgeFlags.SHARP
+               i=-1
+               for ed in me.edges:
+                       if i==-1:
+                               file.write('%i' % ((ed.flag&SHARP)!=0));        i=0
+                       else:
+                               if i==54:
+                                       file.write('\n                   ');    i=0
+                               file.write(',%i' % ((ed.flag&SHARP)!=0))
+                       i+=1
+               
+               file.write('\n\t\t}')
+               del SHARP
+               
+               
                # Write VertexColor Layers
                # note, no programs seem to use this info :/
                collayers = []
@@ -1475,7 +1538,7 @@ def write(filename, batch_objects = None, \
                
                # Write UV and texture layers.
                uvlayers = []
-               if me.faceUV:
+               if do_uvs:
                        uvlayers = me.getUVLayerNames()
                        uvlayer_orig = me.activeUVLayer
                        for uvindex, uvlayer in enumerate(uvlayers):
@@ -1538,13 +1601,13 @@ def write(filename, batch_objects = None, \
                                        if len(my_mesh.blenTextures) == 1:
                                                file.write('0')
                                        else:
-                                               #texture_mapping_local = {None:0}
                                                texture_mapping_local = {None:-1}
                                                
                                                i = 0 # 1 for dummy
                                                for tex in my_mesh.blenTextures:
-                                                       texture_mapping_local[tex] = i
-                                                       i+=1
+                                                       if tex: # None is set above
+                                                               texture_mapping_local[tex] = i
+                                                               i+=1
                                                
                                                i=-1
                                                for f in me.faces:
@@ -1594,32 +1657,32 @@ def write(filename, batch_objects = None, \
                                file.write('0')
                        else:
                                # Build a material mapping for this 
-                               #material_mapping_local = [0] * 16 # local-index : global index.
-                               material_mapping_local = [-1] * 16 # local-index : global index.
-                               i= 0 # 1
-                               for j, mat in enumerate(my_mesh.blenMaterials):
-                                       if mat:
-                                               material_mapping_local[j] = i
-                                               i+=1
-                                       # else leave as -1
+                               material_mapping_local = {} # local-mat & tex : global index.
+                               
+                               for j, mat_tex_pair in enumerate(my_mesh.blenMaterials):
+                                       material_mapping_local[mat_tex_pair] = j
                                
                                len_material_mapping_local = len(material_mapping_local)
                                
+                               mats = my_mesh.blenMaterialList
+                               
                                i=-1
                                for f in me.faces:
-                                       f_mat = f.mat
-                                       if f_mat >= len_material_mapping_local:
-                                               f_mat = 0
+                                       try:    mat = mats[f.mat]
+                                       except:mat = None
+                                       
+                                       if do_uvs: tex = f.image # WARNING - MULTI UV LAYER IMAGES NOT SUPPORTED :/
+                                       else: tex = None
                                        
                                        if i==-1:
                                                i=0
-                                               file.write( '%s' % (material_mapping_local[f_mat]))
+                                               file.write( '%s' % (material_mapping_local[mat, tex])) # None for mat or tex is ok
                                        else:
                                                if i==55:
                                                        file.write('\n\t\t\t\t')
                                                        i=0
                                                
-                                               file.write(',%s' % (material_mapping_local[f_mat]))
+                                               file.write(',%s' % (material_mapping_local[mat, tex]))
                                        i+=1
                        
                        file.write('\n\t\t}')
@@ -1654,7 +1717,7 @@ def write(filename, batch_objects = None, \
                                TypedIndex: 0
                        }''')
                
-               if me.faceUV:
+               if do_uvs: # same as me.faceUV
                        file.write('''
                        LayerElement:  {
                                Type: "LayerElementUV"
@@ -1736,8 +1799,8 @@ def write(filename, batch_objects = None, \
        ob_all_typegroups = [ob_meshes, ob_lights, ob_cameras, ob_arms, ob_null]
        
        groups = [] # blender groups, only add ones that have objects in the selections
-       materials = {}
-       textures = {}
+       materials = {} # (mat, image) keys, should be a set()
+       textures = {} # should be a set()
        
        tmp_ob_type = ob_type = None # incase no objects are exported, so as not to raise an error
        
@@ -1837,30 +1900,34 @@ def write(filename, batch_objects = None, \
                                        if EXP_MESH_HQ_NORMALS:
                                                BPyMesh.meshCalcNormals(me) # high quality normals nice for realtime engines.
                                        
-                                       for mat in mats:
-                                               # 2.44 use mat.lib too for uniqueness
-                                               if mat: materials[mat] = mat
-                                       
                                        texture_mapping_local = {}
+                                       material_mapping_local = {}
                                        if me.faceUV:
                                                uvlayer_orig = me.activeUVLayer
                                                for uvlayer in me.getUVLayerNames():
                                                        me.activeUVLayer = uvlayer
                                                        for f in me.faces:
-                                                               img = f.image
-                                                               textures[img] = texture_mapping_local[img] = img
+                                                               tex = f.image
+                                                               textures[tex] = texture_mapping_local[tex] = None
+                                                               
+                                                               try: mat = mats[f.mat]
+                                                               except: mat = None
+                                                               
+                                                               materials[mat, tex] = material_mapping_local[mat, tex] = None # should use sets, wait for blender 2.5
+                                                                       
                                                        
                                                        me.activeUVLayer = uvlayer_orig
+                                       else:
+                                               for mat in mats:
+                                                       # 2.44 use mat.lib too for uniqueness
+                                                       materials[mat, None] = material_mapping_local[mat, None] = None
+                                               else:
+                                                       materials[None, None] = None
                                        
                                        if EXP_ARMATURE:
                                                armob = BPyObject.getObjectArmature(ob)
                                                blenParentBoneName = None
                                                
-                                               # Note - Fixed in BPyObject but for now just copy the function because testers wont have up to date modukes,
-                                               # TODO - remove this for 2.45 release since getObjectArmature has been fixed
-                                               if (not armob) and ob.parent and ob.parent.type == 'Armature' and ob.parentType == Blender.Object.ParentTypes.ARMATURE:
-                                                       armob = ob.parent
-                                               
                                                # parent bone - special case
                                                if (not armob) and ob.parent and ob.parent.type == 'Armature' and ob.parentType == Blender.Object.ParentTypes.BONE:
                                                        armob = ob.parent
@@ -1876,8 +1943,9 @@ def write(filename, batch_objects = None, \
                                        my_mesh = my_object_generic(ob, mtx)
                                        my_mesh.blenData =              me
                                        my_mesh.origData =              origData
-                                       my_mesh.blenMaterials = mats
-                                       my_mesh.blenTextures =  texture_mapping_local.values()
+                                       my_mesh.blenMaterials = material_mapping_local.keys()
+                                       my_mesh.blenMaterialList = mats
+                                       my_mesh.blenTextures =  texture_mapping_local.keys()
                                        
                                        # if only 1 null texture then empty the list
                                        if len(my_mesh.blenTextures) == 1 and my_mesh.blenTextures[0] == None:
@@ -1996,8 +2064,8 @@ def write(filename, batch_objects = None, \
        # Finished finding groups we use
        
        
-       materials =     [(sane_matname(mat), mat) for mat in materials.itervalues() if mat]
-       textures =      [(sane_texname(img), img) for img in textures.itervalues()  if img]
+       materials =     [(sane_matname(mat_tex_pair), mat_tex_pair) for mat_tex_pair in materials.iterkeys()]
+       textures =      [(sane_texname(tex), tex) for tex in textures.iterkeys()  if tex]
        materials.sort() # sort by name
        textures.sort()
        
@@ -2126,8 +2194,8 @@ Objects:  {''')
        
        write_camera_default()
        
-       for matname, mat in materials:
-               write_material(matname, mat)
+       for matname, (mat, tex) in materials:
+               write_material(matname, mat) # We only need to have a material per image pair, but no need to write any image info into the material (dumb fbx standard)
        
        # each texture uses a video, odd
        for texname, tex in textures:
@@ -2247,7 +2315,7 @@ Relations:  {''')
        Model: "Model::Camera Switcher", "CameraSwitcher" {
        }''')
        
-       for matname, mat in materials:
+       for matname, (mat, tex) in materials:
                file.write('\n\tMaterial: "Material::%s", "" {\n\t}' % matname)
 
        if textures:
@@ -2299,9 +2367,14 @@ Connections:  {''')
        if materials:
                for my_mesh in ob_meshes:
                        # Connect all materials to all objects, not good form but ok for now.
-                       for mat in my_mesh.blenMaterials:
-                               if mat:
-                                       file.write('\n\tConnect: "OO", "Material::%s", "Model::%s"' % (sane_name_mapping_mat[mat.name], my_mesh.fbxName))
+                       for mat, tex in my_mesh.blenMaterials:
+                               if mat: mat_name = mat.name
+                               else:   mat_name = None
+                               
+                               if tex: tex_name = tex.name
+                               else:   tex_name = None
+                               
+                               file.write('\n\tConnect: "OO", "Material::%s", "Model::%s"' % (sane_name_mapping_mat[mat_name, tex_name], my_mesh.fbxName))
        
        if textures:
                for my_mesh in ob_meshes:
@@ -2519,8 +2592,18 @@ Takes:  {''')
                                                for TX_LAYER, TX_CHAN in enumerate('TRS'): # transform, rotate, scale
                                                        
                                                        if              TX_CHAN=='T':   context_bone_anim_vecs = [mtx[0].translationPart()      for mtx in context_bone_anim_mats]
-                                                       elif    TX_CHAN=='R':   context_bone_anim_vecs = [mtx[1].toEuler()                      for mtx in context_bone_anim_mats]
-                                                       else:                                   context_bone_anim_vecs = [mtx[0].scalePart()            for mtx in context_bone_anim_mats]
+                                                       elif    TX_CHAN=='S':   context_bone_anim_vecs = [mtx[0].scalePart()            for mtx in context_bone_anim_mats]
+                                                       elif    TX_CHAN=='R':
+                                                               # Was....
+                                                               # elif  TX_CHAN=='R':   context_bone_anim_vecs = [mtx[1].toEuler()                      for mtx in context_bone_anim_mats]
+                                                               # 
+                                                               # ...but we need to use the previous euler for compatible conversion.
+                                                               context_bone_anim_vecs = []
+                                                               prev_eul = None
+                                                               for mtx in context_bone_anim_mats:
+                                                                       if prev_eul:    prev_eul = mtx[1].toEuler(prev_eul)
+                                                                       else:                   prev_eul = mtx[1].toEuler()
+                                                                       context_bone_anim_vecs.append(prev_eul)
                                                        
                                                        file.write('\n\t\t\t\tChannel: "%s" {' % TX_CHAN) # translation
                                                        
@@ -2539,10 +2622,9 @@ Takes:  {''')
                                                                                if frame!=act_start:
                                                                                        file.write(',')
                                                                                
-                                                                               # Curve types are 
+                                                                               # Curve types are 'C,n' for constant, 'L' for linear
                                                                                # C,n is for bezier? - linear is best for now so we can do simple keyframe removal
-                                                                               file.write('\n\t\t\t\t\t\t\t%i,%.15f,C,n'  % (fbx_time(frame-1), context_bone_anim_vecs[frame-act_start][i] ))
-                                                                               #file.write('\n\t\t\t\t\t\t\t%i,%.15f,L'  % (fbx_time(frame-1), context_bone_anim_vecs[frame-act_start][i] ))
+                                                                               file.write('\n\t\t\t\t\t\t\t%i,%.15f,L'  % (fbx_time(frame-1), context_bone_anim_vecs[frame-act_start][i] ))
                                                                                frame+=1
                                                                else:
                                                                        # remove unneeded keys, j is the frame, needed when some frames are removed.
@@ -2550,11 +2632,32 @@ Takes:  {''')
                                                                        
                                                                        # last frame to fisrt frame, missing 1 frame on either side.
                                                                        # removeing in a backwards loop is faster
-                                                                       for j in xrange( (act_end-act_start)-1, 0, -1 ):
-                                                                               # Is this key reduenant?
-                                                                               if      abs(context_bone_anim_keys[j][0] - context_bone_anim_keys[j-1][0]) < ANIM_OPTIMIZE_PRECISSION_FLOAT and\
-                                                                                       abs(context_bone_anim_keys[j][0] - context_bone_anim_keys[j+1][0]) < ANIM_OPTIMIZE_PRECISSION_FLOAT:
+                                                                       #for j in xrange( (act_end-act_start)-1, 0, -1 ):
+                                                                       # j = (act_end-act_start)-1
+                                                                       j = len(context_bone_anim_keys)-2
+                                                                       while j > 0 and len(context_bone_anim_keys) > 2:
+                                                                               # print j, len(context_bone_anim_keys)
+                                                                               # Is this key the same as the ones next to it?
+                                                                               
+                                                                               # co-linear horizontal...
+                                                                               if              abs(context_bone_anim_keys[j][0] - context_bone_anim_keys[j-1][0]) < ANIM_OPTIMIZE_PRECISSION_FLOAT and\
+                                                                                               abs(context_bone_anim_keys[j][0] - context_bone_anim_keys[j+1][0]) < ANIM_OPTIMIZE_PRECISSION_FLOAT:
+                                                                                               
                                                                                        del context_bone_anim_keys[j]
+                                                                                       
+                                                                               else:
+                                                                                       frame_range = float(context_bone_anim_keys[j+1][1] - context_bone_anim_keys[j-1][1])
+                                                                                       frame_range_fac1 = (context_bone_anim_keys[j+1][1] - context_bone_anim_keys[j][1]) / frame_range
+                                                                                       frame_range_fac2 = 1.0 - frame_range_fac1
+                                                                                       
+                                                                                       if abs(((context_bone_anim_keys[j-1][0]*frame_range_fac1 + context_bone_anim_keys[j+1][0]*frame_range_fac2)) - context_bone_anim_keys[j][0]) < ANIM_OPTIMIZE_PRECISSION_FLOAT:
+                                                                                               del context_bone_anim_keys[j]
+                                                                                       else:
+                                                                                               j-=1
+                                                                                       
+                                                                               # keep the index below the list length
+                                                                               if j > len(context_bone_anim_keys)-2:
+                                                                                       j = len(context_bone_anim_keys)-2
                                                                        
                                                                        if len(context_bone_anim_keys) == 2 and context_bone_anim_keys[0][0] == context_bone_anim_keys[1][0]:
                                                                                # This axis has no moton, its okay to skip KeyCount and Keys in this case
@@ -2567,8 +2670,7 @@ Takes:  {''')
                                                                                        if frame != context_bone_anim_keys[0][1]: # not the first
                                                                                                file.write(',')
                                                                                        # frame is alredy one less then blenders frame
-                                                                                       file.write('\n\t\t\t\t\t\t\t%i,%.15f,C,n'  % (fbx_time(frame), val ))
-                                                                                       #file.write('\n\t\t\t\t\t\t\t%i,%.15f,L'  % (fbx_time(frame), val ))
+                                                                                       file.write('\n\t\t\t\t\t\t\t%i,%.15f,L'  % (fbx_time(frame), val ))
                                                                
                                                                if              i==0:   file.write('\n\t\t\t\t\t\tColor: 1,0,0')
                                                                elif    i==1:   file.write('\n\t\t\t\t\t\tColor: 0,1,0')
@@ -2734,15 +2836,16 @@ def fbx_ui_exit(e,v):
        GLOBALS['EVENT'] = e
 
 def do_help(e,v):
-       url = 'http://wiki.blender.org/index.php/Scripts/Manual/Export/autodesk_fbx'
-       print 'Trying to open web browser with documentation at this address...'
-       print '\t' + url
-       
-       try:
-               import webbrowser
-               webbrowser.open(url)
-       except:
-               print '...could not open a browser window.'
+    url = 'http://wiki.blender.org/index.php/Scripts/Manual/Export/autodesk_fbx'
+    print 'Trying to open web browser with documentation at this address...'
+    print '\t' + url
+    
+    try:
+        import webbrowser
+        webbrowser.open(url)
+    except:
+        Blender.Draw.PupMenu("Error%t|Opening a webbrowser requires a full python installation")
+        print '...could not open a browser window.'
 
        
 
@@ -2846,7 +2949,7 @@ def fbx_ui():
                Draw.BeginAlign()
                GLOBALS['ANIM_OPTIMIZE'] =                              Draw.Toggle('Optimize Keyframes',       EVENT_REDRAW, x+20,  y+0, 160, 20, GLOBALS['ANIM_OPTIMIZE'].val,        'Remove double keyframes', do_redraw)
                if GLOBALS['ANIM_OPTIMIZE'].val:
-                       GLOBALS['ANIM_OPTIMIZE_PRECISSION'] =   Draw.Number('Precission: ',                     EVENT_NONE, x+180,  y+0, 160, 20, GLOBALS['ANIM_OPTIMIZE_PRECISSION'].val,      3, 16, 'Tolerence for comparing double keyframes (higher for greater accuracy)')
+                       GLOBALS['ANIM_OPTIMIZE_PRECISSION'] =   Draw.Number('Precission: ',                     EVENT_NONE, x+180,  y+0, 160, 20, GLOBALS['ANIM_OPTIMIZE_PRECISSION'].val,      1, 16, 'Tolerence for comparing double keyframes (higher for greater accuracy)')
                Draw.EndAlign()
                
                Draw.BeginAlign()
@@ -2924,7 +3027,7 @@ def write_ui():
        # animation opts
        GLOBALS['ANIM_ENABLE'] =                                Draw.Create(1)
        GLOBALS['ANIM_OPTIMIZE'] =                              Draw.Create(1)
-       GLOBALS['ANIM_OPTIMIZE_PRECISSION'] =   Draw.Create(6) # decimal places
+       GLOBALS['ANIM_OPTIMIZE_PRECISSION'] =   Draw.Create(4) # decimal places
        GLOBALS['ANIM_ACTION_ALL'] =                    [Draw.Create(0), Draw.Create(1)] # not just the current action
        
        # batch export options
index 28e1443e953af062d49ee229c5011ab93095afa3..0edc70a874b8b66269e39da23d5497c8bf6bc819 100644 (file)
@@ -7,9 +7,9 @@ Group: 'Export'
 Tooltip: 'Save a Wavefront OBJ File'
 """
 
-__author__ = "Campbell Barton, Jiri Hnidek"
+__author__ = "Campbell Barton, Jiri Hnidek, Paolo Ciccone"
 __url__ = ['http://wiki.blender.org/index.php/Scripts/Manual/Export/wavefront_obj', 'www.blender.org', 'blenderartists.org']
-__version__ = "1.2"
+__version__ = "1.21"
 
 __bpydoc__ = """\
 This script is an exporter to OBJ file format.
@@ -185,7 +185,8 @@ def write(filename, objects,\
 EXPORT_TRI=False,  EXPORT_EDGES=False,  EXPORT_NORMALS=False,  EXPORT_NORMALS_HQ=False,\
 EXPORT_UV=True,  EXPORT_MTL=True,  EXPORT_COPY_IMAGES=False,\
 EXPORT_APPLY_MODIFIERS=True, EXPORT_ROTX90=True, EXPORT_BLEN_OBS=True,\
-EXPORT_GROUP_BY_OB=False,  EXPORT_GROUP_BY_MAT=False, EXPORT_KEEP_VERT_ORDER=False):
+EXPORT_GROUP_BY_OB=False,  EXPORT_GROUP_BY_MAT=False, EXPORT_KEEP_VERT_ORDER=False,\
+EXPORT_POLYGROUPS=False):
        '''
        Basic write function. The context and options must be alredy set
        This can be accessed externaly
@@ -199,6 +200,29 @@ EXPORT_GROUP_BY_OB=False,  EXPORT_GROUP_BY_MAT=False, EXPORT_KEEP_VERT_ORDER=Fal
        def veckey2d(v):
                return round(v.x, 6), round(v.y, 6)
        
+       def findVertexGroupName(face, vWeightMap):
+               """
+               Searches the vertexDict to see what groups is assigned to a given face.
+               We use a frequency system in order to sort out the name because a given vetex can
+               belong to two or more groups at the same time. To find the right name for the face
+               we list all the possible vertex group names with their frequency and then sort by
+               frequency in descend order. The top element is the one shared by the highest number
+               of vertices is the face's group 
+               """
+               weightDict = {}
+               for vert in face:
+                       vWeights = vWeightMap[vert.index]
+                       for vGroupName, weight in vWeights:
+                               weightDict[vGroupName] = weightDict.get(vGroupName, 0) + weight
+               
+               if weightDict:
+                       alist = [(weight,vGroupName) for vGroupName, weight in weightDict.iteritems()] # sort least to greatest amount of weight
+                       alist.sort()
+                       return(alist[-1][1]) # highest value last
+               else:
+                       return '(null)'
+
+
        print 'OBJ Export path: "%s"' % filename
        temp_mesh_name = '~tmp-mesh'
 
@@ -239,12 +263,12 @@ EXPORT_GROUP_BY_OB=False,  EXPORT_GROUP_BY_MAT=False, EXPORT_KEEP_VERT_ORDER=Fal
        
        globalNormals = {}
        
-       # Get all meshs
+       # Get all meshes
        for ob_main in objects:
                for ob, ob_mat in BPyObject.getDerivedObjects(ob_main):
                        # Will work for non meshes now! :)
                        # getMeshFromObject(ob, container_mesh=None, apply_modifiers=True, vgroups=True, scn=None)
-                       me= BPyMesh.getMeshFromObject(ob, containerMesh, EXPORT_APPLY_MODIFIERS, False, scn)
+                       me= BPyMesh.getMeshFromObject(ob, containerMesh, EXPORT_APPLY_MODIFIERS, EXPORT_POLYGROUPS, scn)
                        if not me:
                                continue
                        
@@ -397,6 +421,17 @@ EXPORT_GROUP_BY_OB=False,  EXPORT_GROUP_BY_MAT=False, EXPORT_KEEP_VERT_ORDER=Fal
                        if not faceuv:
                                f_image = None
                        
+                       if EXPORT_POLYGROUPS:
+                               # Retrieve the list of vertex groups
+                               vertGroupNames = me.getVertGroupNames()
+
+                               currentVGroup = ''
+                               # Create a dictionary keyed by face id and listing, for each vertex, the vertex groups it belongs to
+                               vgroupsMap = [[] for _i in xrange(len(me.verts))]
+                               for vertexGroupName in vertGroupNames:
+                                       for vIdx, vWeight in me.getVertsFromGroup(vertexGroupName, 1):
+                                               vgroupsMap[vIdx].append((vertexGroupName, vWeight))
+
                        for f_index, f in enumerate(faces):
                                f_v= f.v
                                f_smooth= f.smooth
@@ -411,9 +446,18 @@ EXPORT_GROUP_BY_OB=False,  EXPORT_GROUP_BY_MAT=False, EXPORT_KEEP_VERT_ORDER=Fal
                                else:
                                        key = materialNames[f_mat],  None # No image, use None instead.
                                
+                               # Write the vertex group
+                               if EXPORT_POLYGROUPS:
+                                       if vertGroupNames:
+                                               # find what vertext group the face belongs to
+                                               theVGroup = findVertexGroupName(f,vgroupsMap)
+                                               if      theVGroup != currentVGroup:
+                                                       currentVGroup = theVGroup
+                                                       file.write('g %s\n' % theVGroup)
+
                                # CHECK FOR CONTEXT SWITCH
                                if key == contextMat:
-                                       pass # Context alredy switched, dont do anythoing
+                                       pass # Context alredy switched, dont do anything
                                else:
                                        if key[0] == None and key[1] == None:
                                                # Write a null material, since we know the context has changed.
@@ -438,6 +482,7 @@ EXPORT_GROUP_BY_OB=False,  EXPORT_GROUP_BY_MAT=False, EXPORT_KEEP_VERT_ORDER=Fal
                                                
                                                if EXPORT_GROUP_BY_MAT:
                                                        file.write('g %s_%s_%s\n' % (fixName(ob.name), fixName(ob.getData(1)), mat_data[0]) ) # can be mat_image or (null)
+
                                                file.write('usemtl %s\n' % mat_data[0]) # can be mat_image or (null)
                                        
                                contextMat = key
@@ -539,7 +584,8 @@ def write_ui(filename):
                EXPORT_NORMALS, EXPORT_NORMALS_HQ, EXPORT_UV,\
                EXPORT_MTL, EXPORT_SEL_ONLY, EXPORT_ALL_SCENES,\
                EXPORT_ANIMATION, EXPORT_COPY_IMAGES, EXPORT_BLEN_OBS,\
-               EXPORT_GROUP_BY_OB, EXPORT_GROUP_BY_MAT, EXPORT_KEEP_VERT_ORDER
+               EXPORT_GROUP_BY_OB, EXPORT_GROUP_BY_MAT, EXPORT_KEEP_VERT_ORDER,\
+               EXPORT_POLYGROUPS
        
        EXPORT_APPLY_MODIFIERS = Draw.Creat