Cleanup: trailing space in source/gameengine/
authorCampbell Barton <ideasman42@gmail.com>
Sun, 17 Jun 2018 15:01:43 +0000 (17:01 +0200)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 17 Jun 2018 15:03:10 +0000 (17:03 +0200)
353 files changed:
source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
source/gameengine/BlenderRoutines/KX_BlenderCanvas.cpp
source/gameengine/BlenderRoutines/KX_BlenderCanvas.h
source/gameengine/BlenderRoutines/KX_BlenderKeyboardDevice.cpp
source/gameengine/BlenderRoutines/KX_BlenderMouseDevice.cpp
source/gameengine/Converter/BL_ActionActuator.cpp
source/gameengine/Converter/BL_ActionActuator.h
source/gameengine/Converter/BL_ArmatureActuator.cpp
source/gameengine/Converter/BL_ArmatureActuator.h
source/gameengine/Converter/BL_ArmatureChannel.cpp
source/gameengine/Converter/BL_ArmatureChannel.h
source/gameengine/Converter/BL_ArmatureConstraint.cpp
source/gameengine/Converter/BL_ArmatureConstraint.h
source/gameengine/Converter/BL_ArmatureObject.cpp
source/gameengine/Converter/BL_ArmatureObject.h
source/gameengine/Converter/BL_BlenderDataConversion.cpp
source/gameengine/Converter/BL_BlenderDataConversion.h
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_ShapeActionActuator.h
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_BlenderScalarInterpolator.cpp
source/gameengine/Converter/KX_BlenderScalarInterpolator.h
source/gameengine/Converter/KX_BlenderSceneConverter.cpp
source/gameengine/Converter/KX_BlenderSceneConverter.h
source/gameengine/Converter/KX_ConvertActuators.cpp
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/Converter/KX_LibLoadStatus.cpp
source/gameengine/Converter/KX_SoftBodyDeformer.cpp
source/gameengine/Converter/KX_SoftBodyDeformer.h
source/gameengine/Expressions/EXP_BoolValue.h
source/gameengine/Expressions/EXP_ConstExpr.h
source/gameengine/Expressions/EXP_EmptyValue.h
source/gameengine/Expressions/EXP_ErrorValue.h
source/gameengine/Expressions/EXP_Expression.h
source/gameengine/Expressions/EXP_FloatValue.h
source/gameengine/Expressions/EXP_HashedPtr.h
source/gameengine/Expressions/EXP_IfExpr.h
source/gameengine/Expressions/EXP_InputParser.h
source/gameengine/Expressions/EXP_IntValue.h
source/gameengine/Expressions/EXP_ListValue.h
source/gameengine/Expressions/EXP_ListWrapper.h
source/gameengine/Expressions/EXP_Operator1Expr.h
source/gameengine/Expressions/EXP_Operator2Expr.h
source/gameengine/Expressions/EXP_PyObjectPlus.h
source/gameengine/Expressions/EXP_StringValue.h
source/gameengine/Expressions/EXP_Value.h
source/gameengine/Expressions/EXP_VectorValue.h
source/gameengine/Expressions/EXP_VoidValue.h
source/gameengine/Expressions/intern/BoolValue.cpp
source/gameengine/Expressions/intern/ConstExpr.cpp
source/gameengine/Expressions/intern/EmptyValue.cpp
source/gameengine/Expressions/intern/ErrorValue.cpp
source/gameengine/Expressions/intern/Expression.cpp
source/gameengine/Expressions/intern/FloatValue.cpp
source/gameengine/Expressions/intern/IdentifierExpr.cpp
source/gameengine/Expressions/intern/IfExpr.cpp
source/gameengine/Expressions/intern/InputParser.cpp
source/gameengine/Expressions/intern/IntValue.cpp
source/gameengine/Expressions/intern/ListValue.cpp
source/gameengine/Expressions/intern/Operator1Expr.cpp
source/gameengine/Expressions/intern/Operator2Expr.cpp
source/gameengine/Expressions/intern/PyObjectPlus.cpp
source/gameengine/Expressions/intern/StringValue.cpp
source/gameengine/Expressions/intern/Value.cpp
source/gameengine/Expressions/intern/VectorValue.cpp
source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
source/gameengine/GameLogic/Joystick/SCA_Joystick.h
source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp
source/gameengine/GameLogic/Joystick/SCA_JoystickPrivate.h
source/gameengine/GameLogic/SCA_ANDController.cpp
source/gameengine/GameLogic/SCA_ActuatorSensor.cpp
source/gameengine/GameLogic/SCA_ActuatorSensor.h
source/gameengine/GameLogic/SCA_AlwaysSensor.cpp
source/gameengine/GameLogic/SCA_DelaySensor.cpp
source/gameengine/GameLogic/SCA_DelaySensor.h
source/gameengine/GameLogic/SCA_EventManager.h
source/gameengine/GameLogic/SCA_ExpressionController.h
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_IInputDevice.cpp
source/gameengine/GameLogic/SCA_IInputDevice.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_JoystickSensor.cpp
source/gameengine/GameLogic/SCA_JoystickSensor.h
source/gameengine/GameLogic/SCA_KeyboardManager.h
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_MouseManager.h
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_PropertyActuator.h
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_PythonJoystick.cpp
source/gameengine/GameLogic/SCA_PythonKeyboard.cpp
source/gameengine/GameLogic/SCA_PythonMouse.cpp
source/gameengine/GameLogic/SCA_RandomActuator.cpp
source/gameengine/GameLogic/SCA_RandomActuator.h
source/gameengine/GameLogic/SCA_RandomNumberGenerator.cpp
source/gameengine/GameLogic/SCA_RandomNumberGenerator.h
source/gameengine/GameLogic/SCA_RandomSensor.cpp
source/gameengine/GameLogic/SCA_RandomSensor.h
source/gameengine/GameLogic/SCA_TimeEventManager.cpp
source/gameengine/GameLogic/SCA_TimeEventManager.h
source/gameengine/GameLogic/SCA_XORController.cpp
source/gameengine/GamePlayer/common/GPC_Canvas.cpp
source/gameengine/GamePlayer/common/GPC_Canvas.h
source/gameengine/GamePlayer/common/GPC_KeyboardDevice.cpp
source/gameengine/GamePlayer/common/GPC_KeyboardDevice.h
source/gameengine/GamePlayer/common/GPC_MouseDevice.cpp
source/gameengine/GamePlayer/ghost/GPG_Application.cpp
source/gameengine/GamePlayer/ghost/GPG_Application.h
source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
source/gameengine/Ketsji/BL_Action.cpp
source/gameengine/Ketsji/BL_ActionManager.h
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/BL_Texture.cpp
source/gameengine/Ketsji/BL_Texture.h
source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.h
source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h
source/gameengine/Ketsji/KX_ArmatureSensor.h
source/gameengine/Ketsji/KX_BlenderMaterial.cpp
source/gameengine/Ketsji/KX_BlenderMaterial.h
source/gameengine/Ketsji/KX_Camera.cpp
source/gameengine/Ketsji/KX_Camera.h
source/gameengine/Ketsji/KX_CameraActuator.cpp
source/gameengine/Ketsji/KX_CameraActuator.h
source/gameengine/Ketsji/KX_CameraIpoSGController.cpp
source/gameengine/Ketsji/KX_CameraIpoSGController.h
source/gameengine/Ketsji/KX_CharacterWrapper.h
source/gameengine/Ketsji/KX_ClientObjectInfo.h
source/gameengine/Ketsji/KX_ConstraintActuator.cpp
source/gameengine/Ketsji/KX_ConstraintActuator.h
source/gameengine/Ketsji/KX_ConstraintWrapper.cpp
source/gameengine/Ketsji/KX_ConstraintWrapper.h
source/gameengine/Ketsji/KX_Dome.cpp
source/gameengine/Ketsji/KX_Dome.h
source/gameengine/Ketsji/KX_EmptyObject.h
source/gameengine/Ketsji/KX_FontObject.cpp
source/gameengine/Ketsji/KX_FontObject.h
source/gameengine/Ketsji/KX_GameActuator.cpp
source/gameengine/Ketsji/KX_GameActuator.h
source/gameengine/Ketsji/KX_GameObject.cpp
source/gameengine/Ketsji/KX_GameObject.h
source/gameengine/Ketsji/KX_IInterpolator.h
source/gameengine/Ketsji/KX_IPOTransform.h
source/gameengine/Ketsji/KX_IPO_SGController.cpp
source/gameengine/Ketsji/KX_IPO_SGController.h
source/gameengine/Ketsji/KX_IScalarInterpolator.h
source/gameengine/Ketsji/KX_ISceneConverter.h
source/gameengine/Ketsji/KX_ISystem.h
source/gameengine/Ketsji/KX_IpoConvert.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_LightIpoSGController.cpp
source/gameengine/Ketsji/KX_LightIpoSGController.h
source/gameengine/Ketsji/KX_MaterialIpoController.cpp
source/gameengine/Ketsji/KX_MaterialIpoController.h
source/gameengine/Ketsji/KX_MeshProxy.cpp
source/gameengine/Ketsji/KX_MeshProxy.h
source/gameengine/Ketsji/KX_MotionState.cpp
source/gameengine/Ketsji/KX_MouseFocusSensor.cpp
source/gameengine/Ketsji/KX_MouseFocusSensor.h
source/gameengine/Ketsji/KX_NavMeshObject.cpp
source/gameengine/Ketsji/KX_NavMeshObject.h
source/gameengine/Ketsji/KX_NearSensor.cpp
source/gameengine/Ketsji/KX_NearSensor.h
source/gameengine/Ketsji/KX_ObColorIpoSGController.cpp
source/gameengine/Ketsji/KX_ObColorIpoSGController.h
source/gameengine/Ketsji/KX_ObjectActuator.cpp
source/gameengine/Ketsji/KX_ObjectActuator.h
source/gameengine/Ketsji/KX_ObstacleSimulation.cpp
source/gameengine/Ketsji/KX_ObstacleSimulation.h
source/gameengine/Ketsji/KX_OrientationInterpolator.cpp
source/gameengine/Ketsji/KX_OrientationInterpolator.h
source/gameengine/Ketsji/KX_ParentActuator.cpp
source/gameengine/Ketsji/KX_ParentActuator.h
source/gameengine/Ketsji/KX_PositionInterpolator.h
source/gameengine/Ketsji/KX_PyConstraintBinding.cpp
source/gameengine/Ketsji/KX_PyMath.cpp
source/gameengine/Ketsji/KX_PyMath.h
source/gameengine/Ketsji/KX_PythonInit.cpp
source/gameengine/Ketsji/KX_PythonInitTypes.cpp
source/gameengine/Ketsji/KX_RadarSensor.cpp
source/gameengine/Ketsji/KX_RadarSensor.h
source/gameengine/Ketsji/KX_RayCast.cpp
source/gameengine/Ketsji/KX_RayCast.h
source/gameengine/Ketsji/KX_RaySensor.cpp
source/gameengine/Ketsji/KX_RaySensor.h
source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp
source/gameengine/Ketsji/KX_SCA_AddObjectActuator.h
source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp
source/gameengine/Ketsji/KX_SCA_DynamicActuator.h
source/gameengine/Ketsji/KX_SCA_EndObjectActuator.cpp
source/gameengine/Ketsji/KX_SCA_EndObjectActuator.h
source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.cpp
source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.h
source/gameengine/Ketsji/KX_SG_BoneParentNodeRelationship.cpp
source/gameengine/Ketsji/KX_SG_BoneParentNodeRelationship.h
source/gameengine/Ketsji/KX_SG_NodeRelationships.cpp
source/gameengine/Ketsji/KX_SG_NodeRelationships.h
source/gameengine/Ketsji/KX_ScalarInterpolator.h
source/gameengine/Ketsji/KX_ScalingInterpolator.h
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_StateActuator.cpp
source/gameengine/Ketsji/KX_StateActuator.h
source/gameengine/Ketsji/KX_SteeringActuator.cpp
source/gameengine/Ketsji/KX_SteeringActuator.h
source/gameengine/Ketsji/KX_TimeCategoryLogger.h
source/gameengine/Ketsji/KX_TimeLogger.cpp
source/gameengine/Ketsji/KX_TouchEventManager.cpp
source/gameengine/Ketsji/KX_TouchEventManager.h
source/gameengine/Ketsji/KX_TouchSensor.cpp
source/gameengine/Ketsji/KX_TouchSensor.h
source/gameengine/Ketsji/KX_TrackToActuator.cpp
source/gameengine/Ketsji/KX_TrackToActuator.h
source/gameengine/Ketsji/KX_VehicleWrapper.cpp
source/gameengine/Ketsji/KX_VehicleWrapper.h
source/gameengine/Ketsji/KX_VertexProxy.cpp
source/gameengine/Ketsji/KX_VertexProxy.h
source/gameengine/Ketsji/KX_VisibilityActuator.cpp
source/gameengine/Ketsji/KX_VisibilityActuator.h
source/gameengine/Ketsji/KX_WorldInfo.cpp
source/gameengine/Ketsji/KX_WorldIpoController.cpp
source/gameengine/Ketsji/KX_WorldIpoController.h
source/gameengine/Network/LoopBackNetwork/NG_LoopBackNetworkDeviceInterface.cpp
source/gameengine/Network/NG_NetworkDeviceInterface.h
source/gameengine/Network/NG_NetworkMessage.h
source/gameengine/Network/NG_NetworkScene.cpp
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/Dummy/DummyPhysicsEnvironment.cpp
source/gameengine/Physics/Dummy/DummyPhysicsEnvironment.h
source/gameengine/Physics/common/PHY_DynamicTypes.h
source/gameengine/Physics/common/PHY_ICharacter.h
source/gameengine/Physics/common/PHY_IController.h
source/gameengine/Physics/common/PHY_IMotionState.h
source/gameengine/Physics/common/PHY_IPhysicsController.h
source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h
source/gameengine/Physics/common/PHY_IVehicle.h
source/gameengine/Physics/common/PHY_Pro.h
source/gameengine/Rasterizer/RAS_2DFilterManager.cpp
source/gameengine/Rasterizer/RAS_2DFilterManager.h
source/gameengine/Rasterizer/RAS_BucketManager.cpp
source/gameengine/Rasterizer/RAS_BucketManager.h
source/gameengine/Rasterizer/RAS_FramingManager.cpp
source/gameengine/Rasterizer/RAS_FramingManager.h
source/gameengine/Rasterizer/RAS_ICanvas.h
source/gameengine/Rasterizer/RAS_ILightObject.h
source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp
source/gameengine/Rasterizer/RAS_IPolygonMaterial.h
source/gameengine/Rasterizer/RAS_IRasterizer.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_OpenGLFilters/RAS_GrayScale2DFilter.h
source/gameengine/Rasterizer/RAS_OpenGLFilters/RAS_Sepia2DFilter.h
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLLight.cpp
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_StorageVA.cpp
source/gameengine/Rasterizer/RAS_Polygon.cpp
source/gameengine/Rasterizer/RAS_Polygon.h
source/gameengine/Rasterizer/RAS_Rect.h
source/gameengine/Rasterizer/RAS_TexVert.cpp
source/gameengine/Rasterizer/RAS_TexVert.h
source/gameengine/Rasterizer/RAS_texmatrix.cpp
source/gameengine/SceneGraph/SG_BBox.cpp
source/gameengine/SceneGraph/SG_BBox.h
source/gameengine/SceneGraph/SG_Controller.cpp
source/gameengine/SceneGraph/SG_Controller.h
source/gameengine/SceneGraph/SG_DList.h
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_ParentRelation.h
source/gameengine/SceneGraph/SG_QList.h
source/gameengine/SceneGraph/SG_Spatial.cpp
source/gameengine/SceneGraph/SG_Spatial.h
source/gameengine/SceneGraph/SG_Tree.cpp
source/gameengine/SceneGraph/SG_Tree.h
source/gameengine/VideoTexture/BlendType.h
source/gameengine/VideoTexture/DeckLink.cpp
source/gameengine/VideoTexture/Exception.h
source/gameengine/VideoTexture/FilterBlueScreen.cpp
source/gameengine/VideoTexture/FilterBlueScreen.h
source/gameengine/VideoTexture/FilterColor.cpp
source/gameengine/VideoTexture/FilterColor.h
source/gameengine/VideoTexture/FilterNormal.cpp
source/gameengine/VideoTexture/FilterSource.cpp
source/gameengine/VideoTexture/FilterSource.h
source/gameengine/VideoTexture/ImageBase.cpp
source/gameengine/VideoTexture/ImageBase.h
source/gameengine/VideoTexture/ImageBuff.cpp
source/gameengine/VideoTexture/ImageMix.cpp
source/gameengine/VideoTexture/ImageRender.cpp
source/gameengine/VideoTexture/ImageViewport.cpp
source/gameengine/VideoTexture/PyTypeList.cpp
source/gameengine/VideoTexture/Texture.cpp
source/gameengine/VideoTexture/VideoBase.cpp
source/gameengine/VideoTexture/VideoDeckLink.cpp
source/gameengine/VideoTexture/VideoDeckLink.h
source/gameengine/VideoTexture/VideoFFmpeg.cpp
source/gameengine/VideoTexture/VideoFFmpeg.h
source/gameengine/VideoTexture/blendVideoTex.cpp

index 6e698166fd9bb208a1cd2796d1f5f1c5e7bfb8db..22616458b54fe40dfc0c167b41944d9974753808 100644 (file)
@@ -108,7 +108,7 @@ static BlendFileData *load_game_data(const char *filename)
 {
        ReportList reports;
        BlendFileData *bfd;
-       
+
        BKE_reports_init(&reports, RPT_STORE);
        bfd= BLO_read_from_file(filename, &reports, BLO_READ_SKIP_USERDEF);
 
@@ -202,13 +202,13 @@ static int BL_KetsjiPyNextFrame(void *state0)
 {
        BL_KetsjiNextFrameState *state = (BL_KetsjiNextFrameState *) state0;
        return BL_KetsjiNextFrame(
-               state->ketsjiengine, 
-               state->C, 
-               state->win, 
-               state->scene, 
+               state->ketsjiengine,
+               state->C,
+               state->win,
+               state->scene,
                state->ar,
-               state->keyboarddevice, 
-               state->mousedevice, 
+               state->keyboarddevice,
+               state->mousedevice,
                state->draw_letterbox);
 }
 #endif
@@ -246,7 +246,7 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c
        // Acquire Python's GIL (global interpreter lock)
        // so we can safely run Python code and API calls
        PyGILState_STATE gilstate = PyGILState_Ensure();
-       
+
        PyObject *pyGlobalDict = PyDict_New(); /* python utility storage, spans blend file loading */
 #endif
 
@@ -276,14 +276,14 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c
                bool restrictAnimFPS = (startscene->gm.flag & GAME_RESTRICT_ANIM_UPDATES) != 0;
 
                short drawtype = v3d->drawtype;
-               
+
                /* we do not support material mode in game engine, force change to texture mode */
                if (drawtype == OB_MATERIAL) drawtype = OB_TEXTURE;
                if (animation_record) usefixed= false; /* override since you don't want to run full-speed for sim recording */
 
                // create the canvas and rasterizer
                RAS_ICanvas* canvas = new KX_BlenderCanvas(wm, win, area_rect, ar);
-               
+
                // default mouse state set on render panel
                if (mouse_state)
                        canvas->SetMouseState(RAS_ICanvas::MOUSE_NORMAL);
@@ -316,11 +316,11 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c
 
                RAS_IRasterizer::MipmapOption mipmapval = rasterizer->GetMipmapping();
 
-               
+
                // create the inputdevices
                KX_BlenderKeyboardDevice* keyboarddevice = new KX_BlenderKeyboardDevice();
                KX_BlenderMouseDevice* mousedevice = new KX_BlenderMouseDevice();
-               
+
                // create a networkdevice
                NG_NetworkDeviceInterface* networkdevice = new
                        NG_LoopBackNetworkDeviceInterface();
@@ -328,10 +328,10 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c
                //
                // create a ketsji/blendersystem (only needed for timing and stuff)
                KX_BlenderSystem* kxsystem = new KX_BlenderSystem();
-               
+
                // create the ketsjiengine
                KX_KetsjiEngine* ketsjiengine = new KX_KetsjiEngine(kxsystem);
-               
+
                // set the devices
                ketsjiengine->SetKeyboardDevice(keyboarddevice);
                ketsjiengine->SetMouseDevice(mousedevice);
@@ -382,7 +382,7 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c
                {
                        exitrequested = KX_EXIT_REQUEST_NO_REQUEST;
                        if (bfd) BLO_blendfiledata_free(bfd);
-                       
+
                        char basedpath[FILE_MAX];
                        // base the actuator filename with respect
                        // to the original file working directory
@@ -396,18 +396,18 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c
                        // that happened to be loaded first
                        BLI_path_abs(basedpath, pathname);
                        bfd = load_game_data(basedpath);
-                       
+
                        // if it wasn't loaded, try it forced relative
                        if (!bfd)
                        {
                                // just add "//" in front of it
                                char temppath[FILE_MAX] = "//";
                                BLI_strncpy(temppath + 2, basedpath, FILE_MAX - 2);
-                               
+
                                BLI_path_abs(temppath, pathname);
                                bfd = load_game_data(temppath);
                        }
-                       
+
                        // if we got a loaded blendfile, proceed
                        if (bfd)
                        {
@@ -435,7 +435,7 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c
                {
                        int startFrame = scene->r.cfra;
                        ketsjiengine->SetAnimRecordMode(animation_record, startFrame);
-                       
+
                        // Quad buffered needs a special window.
                        if (scene->gm.stereoflag == STEREO_ENABLED) {
                                if (scene->gm.stereomode != RAS_IRasterizer::RAS_STEREO_QUADBUFFERED)
@@ -446,7 +446,7 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c
 
                        rasterizer->SetBackColor(scene->gm.framing.col);
                }
-               
+
                if (exitrequested != KX_EXIT_REQUEST_QUIT_GAME)
                {
                        if (rv3d->persp != RV3D_CAMOB)
@@ -458,7 +458,7 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c
                                ketsjiengine->SetCameraOverrideClipping(v3d->near, v3d->far);
                                ketsjiengine->SetCameraOverrideLens(v3d->lens);
                        }
-                       
+
                        // create a scene converter, create and convert the startingscene
                        KX_ISceneConverter* sceneconverter = new KX_BlenderSceneConverter(blenderdata, ketsjiengine);
                        ketsjiengine->SetSceneConverter(sceneconverter);
@@ -471,7 +471,7 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c
                                sceneconverter->SetGLSLMaterials(true);
                        if (scene->gm.flag & GAME_NO_MATERIAL_CACHING)
                                sceneconverter->SetCacheMaterials(false);
-                                       
+
                        KX_Scene* startscene = new KX_Scene(keyboarddevice,
                                mousedevice,
                                networkdevice,
@@ -509,19 +509,19 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c
                                    rasterizer,
                                        canvas);
                                ketsjiengine->AddScene(startscene);
-                               
+
                                // init the rasterizer
                                rasterizer->Init();
-                               
+
                                // start the engine
                                ketsjiengine->StartEngine(true);
-                               
+
 
                                // Set the animation playback rate for ipo's and actions
                                // the framerate below should patch with FPS macro defined in blendef.h
                                // Could be in StartEngine set the framerate, we need the scene to do this
                                ketsjiengine->SetAnimFrameRate(FPS);
-                               
+
 #ifdef WITH_PYTHON
                                char *python_main = NULL;
                                pynextframestate.state = NULL;
@@ -545,7 +545,7 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c
                                                ketsjinextframestate.keyboarddevice = keyboarddevice;
                                                ketsjinextframestate.mousedevice = mousedevice;
                                                ketsjinextframestate.draw_letterbox = draw_letterbox;
-                       
+
                                                pynextframestate.state = &ketsjinextframestate;
                                                pynextframestate.func = &BL_KetsjiPyNextFrame;
                                                printf("Yielding control to Python script '%s'...\n", python_main);
@@ -577,9 +577,9 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c
                                // inside the GameLogic dictionary when the python interpreter is finalized.
                                // which allows the scene to safely delete them :)
                                // see: (space.c)->start_game
-                               
+
                                //PyDict_Clear(PyModule_GetDict(gameLogic));
-                               
+
                                // Keep original items, means python plugins will autocomplete members
                                PyObject *gameLogic_keys_new = PyDict_Keys(PyModule_GetDict(gameLogic));
                                const Py_ssize_t numitems= PyList_GET_SIZE(gameLogic_keys_new);
@@ -624,7 +624,7 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c
                        // set mipmap setting back to its original value
                        rasterizer->SetMipmapping(mipmapval);
                }
-               
+
                // clean up some stuff
                if (ketsjiengine)
                {
@@ -665,9 +665,9 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c
 
                // stop all remaining playing sounds
                AUD_Device_stopAll(BKE_sound_get_device());
-       
+
        } while (exitrequested == KX_EXIT_REQUEST_RESTART_GAME || exitrequested == KX_EXIT_REQUEST_START_OTHER_GAME);
-       
+
        if (bfd) BLO_blendfiledata_free(bfd);
 
        BLI_strncpy(G.main->name, oldsce, sizeof(G.main->name));
index a6b2340d7b4dc9781b58a99ea94f83996acb1a29..fdfa64cbd91bc32694e0d49ca01f872c490f7510 100644 (file)
@@ -293,7 +293,7 @@ void KX_BlenderCanvas::SetMousePosition(int x,int y)
        int winX = m_frame_rect.GetLeft();
        int winY = m_frame_rect.GetBottom();
        int winH = m_frame_rect.GetHeight();
-       
+
        WM_cursor_warp(m_win, winX + x, winY + (winH-y));
 }
 
index 6f408f86551fd1f23923a948489ae56010360363..8029360273b1af05a1e7246ceb467dcd659ac65a 100644 (file)
@@ -48,7 +48,7 @@ struct wmWindow;
 struct wmWindowManager;
 
 /**
- * 2D Blender device context abstraction. 
+ * 2D Blender device context abstraction.
  * The connection from 3d rendercontext to 2d Blender surface embedding.
  */
 
@@ -63,17 +63,17 @@ private:
 
 public:
        /* Construct a new canvas.
-        * 
+        *
         * \param area The Blender ARegion to run the game within.
         */
        KX_BlenderCanvas(struct wmWindowManager *wm, struct wmWindow* win, RAS_Rect &rect, struct ARegion* ar);
        ~KX_BlenderCanvas();
 
-               void 
+               void
        Init(
        );
-       
-               void 
+
+               void
        SwapBuffers(
        );
 
@@ -89,7 +89,7 @@ public:
 
        void GetDisplayDimensions(int &width, int &height);
 
-               void 
+               void
        ResizeWindow(
                int width,
                int height
@@ -107,11 +107,11 @@ public:
        BeginFrame(
        );
 
-               void 
+               void
        EndFrame(
        );
 
-               void 
+               void
        ClearColor(
                float r,
                float g,
@@ -119,16 +119,16 @@ public:
                float a
        );
 
-               void 
+               void
        ClearBuffer(
                int type
        );
 
-               int 
+               int
        GetWidth(
        ) const;
 
-               int 
+               int
        GetHeight(
        ) const;
 
@@ -180,27 +180,27 @@ public:
                const int*
        GetViewPort();
 
-               void 
+               void
        SetMouseState(
                RAS_MouseState mousestate
        );
 
-               void 
+               void
        SetMousePosition(
                int x,
                int y
        );
 
-               void 
+               void
        MakeScreenShot(
                const char* filename
        );
-       
-               bool 
+
+               bool
        BeginDraw(
        );
 
-               void 
+               void
        EndDraw(
        );
 
index ea78d2d389e467b942eb91e77b3af50d260fde35..073f91bf8c4700f6c99ea53016a4463318f77abf 100644 (file)
@@ -33,7 +33,7 @@
 #ifdef _MSC_VER
    /* annoying warnings about truncated STL debug info */
 #  pragma warning (disable:4786)
-#endif 
+#endif
 
 #include "KX_BlenderKeyboardDevice.h"
 #include "KX_KetsjiEngine.h"
@@ -55,7 +55,7 @@ KX_BlenderKeyboardDevice::~KX_BlenderKeyboardDevice()
 bool KX_BlenderKeyboardDevice::IsPressed(SCA_IInputDevice::KX_EnumInputs inputcode)
 {
        const SCA_InputEvent & inevent =  m_eventStatusTables[m_currentTable][inputcode];
-       bool pressed = (inevent.m_status == SCA_InputEvent::KX_JUSTACTIVATED || 
+       bool pressed = (inevent.m_status == SCA_InputEvent::KX_JUSTACTIVATED ||
                inevent.m_status == SCA_InputEvent::KX_ACTIVE);
        return pressed;
 }
@@ -72,7 +72,7 @@ bool KX_BlenderKeyboardDevice::IsPressed(SCA_IInputDevice::KX_EnumInputs inputco
 void   KX_BlenderKeyboardDevice::NextFrame()
 {
        SCA_IInputDevice::NextFrame();
-       
+
        // now convert justpressed keyevents into regular (active) keyevents
        int previousTable = 1-m_currentTable;
        for (int keyevent= KX_BEGINKEY; keyevent<= KX_ENDKEY;keyevent++)
@@ -94,7 +94,7 @@ void  KX_BlenderKeyboardDevice::NextFrame()
 bool KX_BlenderKeyboardDevice::ConvertBlenderEvent(unsigned short incode, short val, unsigned int unicode)
 {
        bool result = false;
-       
+
        // convert event
        KX_EnumInputs kxevent = this->ToNative(incode);
 
@@ -122,7 +122,7 @@ bool KX_BlenderKeyboardDevice::ConvertBlenderEvent(unsigned short incode, short
                                        break;
                                }
                        case SCA_InputEvent::KX_ACTIVE:
-                       
+
                                {
                                        m_eventStatusTables[m_currentTable][kxevent].m_status = SCA_InputEvent::KX_ACTIVE;
                                        break;
@@ -137,7 +137,7 @@ bool KX_BlenderKeyboardDevice::ConvertBlenderEvent(unsigned short incode, short
                                        m_eventStatusTables[m_currentTable][kxevent].m_status = SCA_InputEvent::KX_JUSTACTIVATED;
                                }
                        }
-                       
+
                } else if (val == KM_RELEASE)
                {
                        // blender eventval == 0
index 9df06e83b92cfe506d7ab5ddc7823b4b75b04e66..fee184e19028bdf5575417ad126a262a99dfa8c1 100644 (file)
@@ -32,7 +32,7 @@
 #ifdef _MSC_VER
    /* annoying warnings about truncated STL debug info */
 #  pragma warning (disable:4786)
-#endif 
+#endif
 
 #include "KX_BlenderMouseDevice.h"
 
@@ -52,7 +52,7 @@ KX_BlenderMouseDevice::~KX_BlenderMouseDevice()
 bool KX_BlenderMouseDevice::IsPressed(SCA_IInputDevice::KX_EnumInputs inputcode)
 {
        const SCA_InputEvent & inevent =  m_eventStatusTables[m_currentTable][inputcode];
-       bool pressed = (inevent.m_status == SCA_InputEvent::KX_JUSTACTIVATED || 
+       bool pressed = (inevent.m_status == SCA_InputEvent::KX_JUSTACTIVATED ||
                inevent.m_status == SCA_InputEvent::KX_ACTIVE);
        return pressed;
 }
@@ -70,7 +70,7 @@ bool KX_BlenderMouseDevice::IsPressed(SCA_IInputDevice::KX_EnumInputs inputcode)
 void   KX_BlenderMouseDevice::NextFrame()
 {
        SCA_IInputDevice::NextFrame();
-       
+
        // now convert justpressed keyevents into regular (active) keyevents
        int previousTable = 1-m_currentTable;
        for (int mouseevent= KX_BEGINMOUSE; mouseevent< KX_ENDMOUSEBUTTONS;mouseevent++)
@@ -90,13 +90,13 @@ void        KX_BlenderMouseDevice::NextFrame()
                if (oldevent.m_status == SCA_InputEvent::KX_JUSTACTIVATED ||
                        oldevent.m_status == SCA_InputEvent::KX_ACTIVE  )
                {
-                       
+
                        m_eventStatusTables[m_currentTable][mousemove].m_status = SCA_InputEvent::KX_JUSTRELEASED;
                } else
                {
                        if (oldevent.m_status == SCA_InputEvent::KX_JUSTRELEASED)
                        {
-                               
+
                                m_eventStatusTables[m_currentTable][mousemove].m_status = SCA_InputEvent::KX_NO_INPUTSTATUS;
                        }
                }
@@ -111,7 +111,7 @@ void        KX_BlenderMouseDevice::NextFrame()
 bool KX_BlenderMouseDevice::ConvertBlenderEvent(unsigned short incode, short val, unsigned int unicode)
 {
        bool result = false;
-       
+
        // convert event
        KX_EnumInputs kxevent = this->ToNative(incode);
        int previousTable = 1-m_currentTable;
@@ -125,7 +125,7 @@ bool KX_BlenderMouseDevice::ConvertBlenderEvent(unsigned short incode, short val
 
                        switch (m_eventStatusTables[previousTable][kxevent].m_status)
                        {
-                       
+
                        case SCA_InputEvent::KX_ACTIVE:
                        case SCA_InputEvent::KX_JUSTACTIVATED:
                                {
@@ -142,7 +142,7 @@ bool KX_BlenderMouseDevice::ConvertBlenderEvent(unsigned short incode, short val
                                        m_eventStatusTables[m_currentTable][kxevent].m_status = SCA_InputEvent::KX_JUSTACTIVATED;
                                }
                        }
-                       
+
                } else if (val == KM_RELEASE)
                {
                        // blender eventval == 0
@@ -168,7 +168,7 @@ bool KX_BlenderMouseDevice::ConvertBlenderEvent(unsigned short incode, short val
 
                switch (m_eventStatusTables[previousTable][kxevent].m_status)
                {
-                       
+
                case SCA_InputEvent::KX_ACTIVE:
                case SCA_InputEvent::KX_JUSTACTIVATED:
                        {
index d28cdb84275a94b1736254ce7e9a032c05f4c2a6..558fd6cd2b5547c8e508761e9ab7f2fafb6ca9d2 100644 (file)
@@ -74,9 +74,9 @@ BL_ActionActuator::BL_ActionActuator(SCA_IObject *gameobj,
                                        float   layer_weight,
                                        short   ipo_flags,
                                        short   end_reset,
-                                       float   stride) 
+                                       float   stride)
        : SCA_IActuator(gameobj, KX_ACT_ACTION),
-               
+
        m_lastpos(0, 0, 0),
        m_blendframe(0),
        m_flag(0),
@@ -112,7 +112,7 @@ void BL_ActionActuator::ProcessReplica()
 
        m_localtime=m_startframe;
        m_lastUpdate=-1;
-       
+
 }
 
 void BL_ActionActuator::SetBlendTime(float newtime)
@@ -128,7 +128,7 @@ void BL_ActionActuator::SetLocalTime(float curtime)
                dt = -dt;
 
        m_localtime = m_startframe + dt;
-       
+
        // Handle wrap around
        if (m_localtime < min(m_startframe, m_endframe) || m_localtime > max(m_startframe, m_endframe))
        {
@@ -198,7 +198,7 @@ bool BL_ActionActuator::Update(double curtime, bool frame)
                        // We handle ping pong ourselves to increase compabitility
                        // with files made prior to animation changes from GSoC 2011.
                        playtype = BL_Action::ACT_MODE_PLAY;
-               
+
                        if (m_flag & ACT_FLAG_REVERSE)
                        {
                                start = m_endframe;
@@ -220,8 +220,8 @@ bool BL_ActionActuator::Update(double curtime, bool frame)
 
        if (m_flag & ACT_FLAG_CONTINUE)
                bUseContinue = true;
-       
-       
+
+
        // Handle events
        if (frame)
        {
@@ -265,7 +265,7 @@ bool BL_ActionActuator::Update(double curtime, bool frame)
                        return false;
                }
        }
-       
+
        // If a different action is playing, we've been overruled and are no longer active
        if (obj->GetCurrentAction(m_layer) != m_action && !obj->IsActionDone(m_layer))
                m_flag &= ~ACT_FLAG_ACTIVE;
@@ -320,7 +320,7 @@ bool BL_ActionActuator::Update(double curtime, bool frame)
 
                                m_flag |= ACT_FLAG_PLAY_END;
                                break;
-       
+
                        case ACT_ACTION_FLIPPER:
                                // Convert into a play action and play back to the beginning
                                float temp = end;
@@ -365,19 +365,19 @@ PyObject *BL_ActionActuator::PyGetChannel(PyObject *value)
                PyErr_SetString(PyExc_NotImplementedError, "actuator.getChannel(): Only armatures support channels");
                return NULL;
        }
-       
+
        if (!string) {
                PyErr_SetString(PyExc_TypeError, "expected a single string");
                return NULL;
        }
-       
+
        bPoseChannel *pchan;
-       
+
        if (m_userpose==NULL && m_pose==NULL) {
                BL_ArmatureObject *obj = (BL_ArmatureObject*)GetParent();
                obj->GetPose(&m_pose); /* Get the underlying pose from the armature */
        }
-       
+
        // BKE_pose_channel_find_name accounts for NULL pose, run on both in case one exists but
        // the channel doesnt
        if (            !(pchan=BKE_pose_channel_find_name(m_userpose, string)) &&
@@ -388,19 +388,19 @@ PyObject *BL_ActionActuator::PyGetChannel(PyObject *value)
        }
 
        PyObject *ret = PyTuple_New(3);
-       
-       PyObject *list = PyList_New(3); 
+
+       PyObject *list = PyList_New(3);
        PyList_SET_ITEM(list, 0, PyFloat_FromDouble(pchan->loc[0]));
        PyList_SET_ITEM(list, 1, PyFloat_FromDouble(pchan->loc[1]));
        PyList_SET_ITEM(list, 2, PyFloat_FromDouble(pchan->loc[2]));
        PyTuple_SET_ITEM(ret, 0, list);
-       
+
        list = PyList_New(3);
        PyList_SET_ITEM(list, 0, PyFloat_FromDouble(pchan->size[0]));
        PyList_SET_ITEM(list, 1, PyFloat_FromDouble(pchan->size[1]));
        PyList_SET_ITEM(list, 2, PyFloat_FromDouble(pchan->size[2]));
        PyTuple_SET_ITEM(ret, 1, list);
-       
+
        list = PyList_New(4);
        PyList_SET_ITEM(list, 0, PyFloat_FromDouble(pchan->quat[0]));
        PyList_SET_ITEM(list, 1, PyFloat_FromDouble(pchan->quat[1]));
@@ -440,7 +440,7 @@ KX_PYMETHODDEF_DOC(BL_ActionActuator, setChannel,
                PyErr_SetString(PyExc_NotImplementedError, "actuator.setChannel(): Only armatures support channels");
                return NULL;
        }
-       
+
        if (PyTuple_Size(args)==2) {
                if (!PyArg_ParseTuple(args,"sO:setChannel", &string, &pymat)) // matrix
                        return NULL;
@@ -453,18 +453,18 @@ KX_PYMETHODDEF_DOC(BL_ActionActuator, setChannel,
                PyErr_SetString(PyExc_ValueError, "Expected a string and a 4x4 matrix (2 args) or a string and loc/size/quat sequences (4 args)");
                return NULL;
        }
-       
+
        if (pymat) {
                float matrix[4][4];
                MT_Matrix4x4 mat;
-               
+
                if (!PyMatTo(pymat, mat))
                        return NULL;
-               
+
                mat.getValue((float*)matrix);
-               
+
                BL_ArmatureObject *obj = (BL_ArmatureObject*)GetParent();
-               
+
                if (!m_userpose) {
                        if (!m_pose)
                                obj->GetPose(&m_pose); /* Get the underlying pose from the armature */
@@ -472,7 +472,7 @@ KX_PYMETHODDEF_DOC(BL_ActionActuator, setChannel,
                }
                // pchan= BKE_pose_channel_verify(m_userpose, string); // adds the channel if its not there.
                pchan= BKE_pose_channel_find_name(m_userpose, string); // adds the channel if its not there.
-               
+
                if (pchan) {
                        copy_v3_v3(pchan->loc, matrix[3]);
                        mat4_to_size(pchan->size, matrix);
@@ -483,10 +483,10 @@ KX_PYMETHODDEF_DOC(BL_ActionActuator, setChannel,
                MT_Vector3 loc;
                MT_Vector3 size;
                MT_Quaternion quat;
-               
+
                if (!PyVecTo(pyloc, loc) || !PyVecTo(pysize, size) || !PyQuatTo(pyquat, quat))
                        return NULL;
-               
+
                // same as above
                if (!m_userpose) {
                        if (!m_pose)
@@ -495,7 +495,7 @@ KX_PYMETHODDEF_DOC(BL_ActionActuator, setChannel,
                }
                // pchan= BKE_pose_channel_verify(m_userpose, string);
                pchan= BKE_pose_channel_find_name(m_userpose, string); // adds the channel if its not there.
-               
+
                // for some reason loc.setValue(pchan->loc) fails
                if (pchan) {
                        pchan->loc[0] = loc[0]; pchan->loc[1] = loc[1]; pchan->loc[2] = loc[2];
@@ -503,12 +503,12 @@ KX_PYMETHODDEF_DOC(BL_ActionActuator, setChannel,
                        pchan->quat[0] = quat[3]; pchan->quat[1] = quat[0]; pchan->quat[2] = quat[1]; pchan->quat[3] = quat[2]; /* notice xyzw -> wxyz is intentional */
                }
        }
-       
+
        if (pchan==NULL) {
                PyErr_SetString(PyExc_ValueError, "Channel could not be found, use the 'channelNames' attribute to get a list of valid channels");
                return NULL;
        }
-       
+
        Py_RETURN_NONE;
 #endif
 }
@@ -572,7 +572,7 @@ PyObject *BL_ActionActuator::pyattr_get_action(void *self_v, const KX_PYATTRIBUT
 int BL_ActionActuator::pyattr_set_action(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value)
 {
        BL_ActionActuator* self = static_cast<BL_ActionActuator*>(self_v);
-       
+
        if (!PyUnicode_Check(value))
        {
                PyErr_SetString(PyExc_ValueError, "actuator.action = val: Action Actuator, expected the string name of the action");
@@ -581,7 +581,7 @@ int BL_ActionActuator::pyattr_set_action(void *self_v, const KX_PYATTRIBUTE_DEF
 
        bAction *action= NULL;
        STR_String val = _PyUnicode_AsString(value);
-       
+
        if (val != "")
        {
                action= (bAction*)self->GetLogicManager()->GetActionByName(val);
@@ -591,7 +591,7 @@ int BL_ActionActuator::pyattr_set_action(void *self_v, const KX_PYATTRIBUTE_DEF
                        return PY_SET_ATTR_FAIL;
                }
        }
-       
+
        self->SetAction(action);
        return PY_SET_ATTR_SUCCESS;
 
@@ -606,7 +606,7 @@ PyObject *BL_ActionActuator::pyattr_get_channel_names(void *self_v, const KX_PYA
        BL_ActionActuator* self = static_cast<BL_ActionActuator*>(self_v);
        PyObject *ret= PyList_New(0);
        PyObject *item;
-       
+
        if (self->GetParent()->GetGameObjectType() != SCA_IObject::OBJ_ARMATURE)
        {
                PyErr_SetString(PyExc_NotImplementedError, "actuator.channelNames: Only armatures support channels");
@@ -614,7 +614,7 @@ PyObject *BL_ActionActuator::pyattr_get_channel_names(void *self_v, const KX_PYA
        }
 
        bPose *pose= ((BL_ArmatureObject*)self->GetParent())->GetOrigPose();
-       
+
        if (pose) {
                bPoseChannel *pchan;
                for (pchan= (bPoseChannel *)pose->chanbase.first; pchan; pchan= (bPoseChannel *)pchan->next) {
@@ -623,7 +623,7 @@ PyObject *BL_ActionActuator::pyattr_get_channel_names(void *self_v, const KX_PYA
                        Py_DECREF(item);
                }
        }
-       
+
        return ret;
 #endif
 }
@@ -637,12 +637,12 @@ PyObject *BL_ActionActuator::pyattr_get_use_continue(void *self_v, const KX_PYAT
 int BL_ActionActuator::pyattr_set_use_continue(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value)
 {
        BL_ActionActuator* self = static_cast<BL_ActionActuator*>(self_v);
-       
+
        if (PyObject_IsTrue(value))
                self->m_flag |= ACT_FLAG_CONTINUE;
        else
                self->m_flag &= ~ACT_FLAG_CONTINUE;
-       
+
        return PY_SET_ATTR_SUCCESS;
 }
 
@@ -655,9 +655,9 @@ PyObject *BL_ActionActuator::pyattr_get_frame(void *self_v, const KX_PYATTRIBUTE
 int BL_ActionActuator::pyattr_set_frame(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value)
 {
        BL_ActionActuator* self = static_cast<BL_ActionActuator*>(self_v);
-       
+
        ((KX_GameObject*)self->m_gameobj)->SetActionFrame(self->m_layer, PyFloat_AsDouble(value));
-       
+
        return PY_SET_ATTR_SUCCESS;
 }
 
index a43cf0f0a7bfbf45c653d3733d90130c6941cece..a1ba2e4a98f477683810dc6af4173685e824f873 100644 (file)
@@ -37,7 +37,7 @@
 #include "DNA_actuator_types.h"
 #include "MT_Point3.h"
 
-class BL_ActionActuator : public SCA_IActuator  
+class BL_ActionActuator : public SCA_IActuator
 {
 public:
        Py_Header
@@ -61,11 +61,11 @@ public:
        virtual bool Update(double curtime, bool frame);
        virtual CValue* GetReplica();
        virtual void ProcessReplica();
-       
+
        void SetBlendTime(float newtime);
        void SetLocalTime(float curtime);
        void ResetStartTime(float curtime);
-       
+
        bAction*        GetAction() { return m_action; }
        void            SetAction(bAction* act) { m_action= act; }
 
@@ -112,7 +112,7 @@ public:
                }
        }
 #endif  /* WITH_PYTHON */
-       
+
 protected:
        MT_Point3       m_lastpos;
        float   m_blendframe;
@@ -125,7 +125,7 @@ protected:
        float   m_starttime;
        /** The current time of the action */
        float   m_localtime;
-       
+
        float   m_lastUpdate;
        float   m_blendin;
        float   m_blendstart;
index 67cc7d2c291414b9de0a2151d2c8d269e03122e5..21364075429c24472271bf1e427c19c24c053a18 100644 (file)
@@ -41,8 +41,8 @@
 /**
  * This class is the conversion of the Pose channel constraint.
  * It makes a link between the pose constraint and the KX scene.
- * The main purpose is to give access to the constraint target 
- * to link it to a game object. 
+ * The main purpose is to give access to the constraint target
+ * to link it to a game object.
  * It also allows to activate/deactivate constraints during the game.
  * Later it will also be possible to create constraint on the fly
  */
@@ -242,18 +242,18 @@ int BL_ArmatureActuator::pyattr_set_object(void *self, const struct KX_PYATTRIBU
        BL_ArmatureActuator* actuator = static_cast<BL_ArmatureActuator*>(self);
        KX_GameObject* &target = (!strcmp(attrdef->m_name, "target")) ? actuator->m_gametarget : actuator->m_gamesubtarget;
        KX_GameObject *gameobj;
-               
+
        if (!ConvertPythonToGameObject(actuator->GetLogicManager(), value, &gameobj, true, "actuator.object = value: BL_ArmatureActuator"))
                return PY_SET_ATTR_FAIL; // ConvertPythonToGameObject sets the error
-               
+
        if (target != NULL)
                target->UnregisterActuator(actuator);
 
        target = gameobj;
-               
+
        if (target)
                target->RegisterActuator(actuator);
-               
+
        return PY_SET_ATTR_SUCCESS;
 }
 
index ba02c5aa362d4ee4481c7125c2120a9524f2db62..3c455498508be52086a78b4cea3a856b1f181b49 100644 (file)
@@ -38,8 +38,8 @@
 /**
  * This class is the conversion of the Pose channel constraint.
  * It makes a link between the pose constraint and the KX scene.
- * The main purpose is to give access to the constraint target 
- * to link it to a game object. 
+ * The main purpose is to give access to the constraint target
+ * to link it to a game object.
  * It also allows to activate/deactivate constraints during the game.
  * Later it will also be possible to create constraint on the fly
  */
@@ -69,7 +69,7 @@ public:
        virtual void Relink(CTR_Map<CTR_HashedPtr, void*> *obj_map);
        virtual bool Update(double curtime, bool frame);
        virtual void ReParent(SCA_IObject* parent);
-       
+
 #ifdef WITH_PYTHON
 
        /* These are used to get and set m_target */
index 2b8dfd8f8d1efd7bf35d6332f7d13b724f677158..711c96e32c1e9b2916c6786f2a5829f40da06613 100644 (file)
@@ -80,7 +80,7 @@ PyObject *BL_ArmatureChannel::NewProxy(bool py_owns)
 #endif // WITH_PYTHON
 
 BL_ArmatureChannel::BL_ArmatureChannel(
-       BL_ArmatureObject *armature, 
+       BL_ArmatureObject *armature,
        bPoseChannel *posechannel)
        : PyObjectPlus(), m_posechannel(posechannel), m_armature(armature)
 {
@@ -106,7 +106,7 @@ PyAttributeDef BL_ArmatureChannel::Attributes[] = {
        // Keep these attributes in order of BCA_ defines!!! used by py_attr_getattr and py_attr_setattr
        KX_PYATTRIBUTE_RO_FUNCTION("bone",BL_ArmatureChannel,py_attr_getattr),
        KX_PYATTRIBUTE_RO_FUNCTION("parent",BL_ArmatureChannel,py_attr_getattr),
-       
+
        { NULL }        //Sentinel
 };
 
@@ -190,7 +190,7 @@ int BL_ArmatureChannel::py_attr_setattr(void *self_v, const struct KX_PYATTRIBUT
                PyErr_SetString(PyExc_AttributeError, "channel is NULL");
                return PY_SET_ATTR_FAIL;
        }
-       
+
        switch (attr_order) {
        default:
                break;
@@ -396,13 +396,13 @@ PyTypeObject BL_ArmatureBone::Type = {
 };
 
 // not used since this class is never instantiated
-PyObject *BL_ArmatureBone::GetProxy() 
-{ 
-       return NULL; 
+PyObject *BL_ArmatureBone::GetProxy()
+{
+       return NULL;
 }
-PyObject *BL_ArmatureBone::NewProxy(bool py_owns) 
-{ 
-       return NULL; 
+PyObject *BL_ArmatureBone::NewProxy(bool py_owns)
+{
+       return NULL;
 }
 
 PyObject *BL_ArmatureBone::py_bone_repr(PyObject *self)
index a07097f8178e8799c1dbccc746eb55124ab10822..8e6bc94c488e9b3c668a5330cb64444af269b011 100644 (file)
@@ -56,7 +56,7 @@ private:
        BL_ArmatureObject* m_armature;
 
 public:
-       BL_ArmatureChannel(class BL_ArmatureObject *armature, 
+       BL_ArmatureChannel(class BL_ArmatureObject *armature,
                                                struct bPoseChannel *posechannel);
        virtual ~BL_ArmatureChannel();
 
index d0c7e061fb781d2afbff34ba48388b870aaf5ec1..224ae259fa24d72dc7500efa5f176bf71d1eddd8 100644 (file)
@@ -70,9 +70,9 @@ PyObject *BL_ArmatureConstraint::py_repr(void)
 #endif // WITH_PYTHON
 
 BL_ArmatureConstraint::BL_ArmatureConstraint(
-       BL_ArmatureObject *armature, 
+       BL_ArmatureObject *armature,
        bPoseChannel *posechannel,
-       bConstraint *constraint, 
+       bConstraint *constraint,
        KX_GameObject* target,
        KX_GameObject* subtarget)
        : PyObjectPlus(), m_constraint(constraint), m_posechannel(posechannel), m_armature(armature)
@@ -282,7 +282,7 @@ PyAttributeDef BL_ArmatureConstraint::Attributes[] = {
        KX_PYATTRIBUTE_RO_FUNCTION("ik_flag",BL_ArmatureConstraint,py_attr_getattr),
        KX_PYATTRIBUTE_RW_FUNCTION("ik_dist",BL_ArmatureConstraint,py_attr_getattr,py_attr_setattr),
        KX_PYATTRIBUTE_RW_FUNCTION("ik_mode",BL_ArmatureConstraint,py_attr_getattr,py_attr_setattr),
-       
+
        { NULL }        //Sentinel
 };
 
@@ -368,7 +368,7 @@ int BL_ArmatureConstraint::py_attr_setattr(void *self_v, const struct KX_PYATTRI
                PyErr_SetString(PyExc_AttributeError, "constraint is NULL");
                return PY_SET_ATTR_FAIL;
        }
-       
+
        switch (attr_order) {
        case BCA_ENFORCE:
                dval = PyFloat_AsDouble(value);
index 1d9f7f0d5481a937386554c1e8c6b9c3c2bdb2bb..a2c70f37902ad52636f16fb9de48515757e4371b 100644 (file)
@@ -46,7 +46,7 @@ struct Object;
 struct bPose;
 
 /**
- * SG_DList : element of controlled constraint list 
+ * SG_DList : element of controlled constraint list
  *            head = BL_ArmatureObject::m_controlledConstraints
  * SG_QList : not used
  */
@@ -69,9 +69,9 @@ private:
        struct bPose*   m_subpose;
 
 public:
-       BL_ArmatureConstraint(class BL_ArmatureObject *armature, 
-                                               struct bPoseChannel *posechannel, 
-                                               struct bConstraint *constraint, 
+       BL_ArmatureConstraint(class BL_ArmatureObject *armature,
+                                               struct bPoseChannel *posechannel,
+                                               struct bConstraint *constraint,
                                                KX_GameObject* target,
                                                KX_GameObject* subtarget);
        virtual ~BL_ArmatureConstraint();
index a5af525e13ac92006d40eb980f91a68e25715f4b..d9ecfd1cbee953bb119b341c1defed67ba4bcd9e 100644 (file)
@@ -67,13 +67,13 @@ extern "C" {
 
 #include "MT_Matrix4x4.h"
 
-/** 
+/**
  * Move here pose function for game engine so that we can mix with GE objects
  * Principle is as follow:
  * Use Blender structures so that BKE_pose_where_is can be used unchanged
  * Copy the constraint so that they can be enabled/disabled/added/removed at runtime
  * Don't copy the constraints for the pose used by the Action actuator, it does not need them.
- * Scan the constraint structures so that the KX equivalent of target objects are identified and 
+ * Scan the constraint structures so that the KX equivalent of target objects are identified and
  * stored in separate list.
  * When it is about to evaluate the pose, set the KX object position in the obmat of the corresponding
  * Blender objects and restore after the evaluation.
@@ -83,7 +83,7 @@ static void game_copy_pose(bPose **dst, bPose *src, int copy_constraint)
        bPose *out;
        bPoseChannel *pchan, *outpchan;
        GHash *ghash;
-       
+
        /* the game engine copies the current armature pose and then swaps
         * the object pose pointer. this makes it possible to change poses
         * without affecting the original blender data. */
@@ -97,7 +97,7 @@ static void game_copy_pose(bPose **dst, bPose *src, int copy_constraint)
                *dst=NULL;
                return;
        }
-       
+
        out= (bPose*)MEM_dupallocN(src);
        out->chanhash = NULL;
        out->agroups.first= out->agroups.last= NULL;
@@ -167,14 +167,14 @@ static void game_blend_poses(bPose *dst, bPose *src, float srcweight, short mode
        } else {
                dstweight = 1.0f;
        }
-       
+
        schan= (bPoseChannel *)src->chanbase.first;
        for (dchan = (bPoseChannel *)dst->chanbase.first; dchan; dchan=(bPoseChannel *)dchan->next, schan= (bPoseChannel *)schan->next) {
                // always blend on all channels since we don't know which one has been set
                /* quat interpolation done separate */
                if (schan->rotmode == ROT_MODE_QUAT) {
                        float dquat[4], squat[4];
-                       
+
                        copy_qt_qt(dquat, dchan->quat);
                        copy_qt_qt(squat, schan->quat);
                        // Normalize quaternions so that interpolation/multiplication result is correct.
@@ -187,7 +187,7 @@ static void game_blend_poses(bPose *dst, bPose *src, float srcweight, short mode
                                mul_fac_qt_fl(squat, srcweight);
                                mul_qt_qtqt(dchan->quat, dquat, squat);
                        }
-                       
+
                        normalize_qt(dchan->quat);
                }
 
@@ -195,7 +195,7 @@ static void game_blend_poses(bPose *dst, bPose *src, float srcweight, short mode
                        /* blending for loc and scale are pretty self-explanatory... */
                        dchan->loc[i] = (dchan->loc[i]*dstweight) + (schan->loc[i]*srcweight);
                        dchan->size[i] = 1.0f + ((dchan->size[i]-1.0f)*dstweight) + ((schan->size[i]-1.0f)*srcweight);
-                       
+
                        /* euler-rotation interpolation done here instead... */
                        // FIXME: are these results decent?
                        if (schan->rotmode)
@@ -209,14 +209,14 @@ static void game_blend_poses(bPose *dst, bPose *src, float srcweight, short mode
                        dcon->enforce= dcon->enforce*(1.0f-srcweight) + scon->enforce*srcweight;
                }
        }
-       
+
        /* this pose is now in src time */
        dst->ctime= src->ctime;
 }
 
 BL_ArmatureObject::BL_ArmatureObject(
-                               void* sgReplicationInfo, 
-                               SG_Callbacks callbacks, 
+                               void* sgReplicationInfo,
+                               SG_Callbacks callbacks,
                                Object *armature,
                                Scene *scene,
                                int vert_deform_type)
@@ -375,7 +375,7 @@ void BL_ArmatureObject::LoadChannels()
        if (m_poseChannels.Empty()) {
                bPoseChannel* pchan;
                BL_ArmatureChannel* proxy;
-       
+
                m_channelNumber = 0;
                for (pchan = (bPoseChannel *)m_pose->chanbase.first; pchan; pchan=(bPoseChannel *)pchan->next) {
                        proxy = new BL_ArmatureChannel(this, pchan);
@@ -389,7 +389,7 @@ BL_ArmatureChannel* BL_ArmatureObject::GetChannel(bPoseChannel* pchan)
 {
        LoadChannels();
        SG_DList::iterator<BL_ArmatureChannel> cit(m_poseChannels);
-       for (cit.begin(); !cit.end(); ++cit) 
+       for (cit.begin(); !cit.end(); ++cit)
        {
                BL_ArmatureChannel* channel = *cit;
                if (channel->m_posechannel == pchan)
@@ -402,7 +402,7 @@ BL_ArmatureChannel* BL_ArmatureObject::GetChannel(const char* str)
 {
        LoadChannels();
        SG_DList::iterator<BL_ArmatureChannel> cit(m_poseChannels);
-       for (cit.begin(); !cit.end(); ++cit) 
+       for (cit.begin(); !cit.end(); ++cit)
        {
                BL_ArmatureChannel* channel = *cit;
                if (!strcmp(channel->m_posechannel->name, str))
@@ -535,11 +535,11 @@ void BL_ArmatureObject::GetPose(bPose **pose)
 {
        /* If the caller supplies a null pose, create a new one. */
        /* Otherwise, copy the armature's pose channels into the caller-supplied pose */
-               
+
        if (!*pose) {
                /* probably not to good of an idea to
-                * duplicate everything, but it clears up 
-                * a crash and memory leakage when 
+                * duplicate everything, but it clears up
+                * a crash and memory leakage when
                 * &BL_ActionActuator::m_pose is freed
                 */
                game_copy_pose(pose, m_pose, 0);
@@ -674,7 +674,7 @@ PyObject *BL_ArmatureObject::pyattr_get_channels(void *self_v, const KX_PYATTRIB
                                                         NULL))->NewProxy(true);
 }
 
-KX_PYMETHODDEF_DOC_NOARGS(BL_ArmatureObject, update, 
+KX_PYMETHODDEF_DOC_NOARGS(BL_ArmatureObject, update,
                                                  "update()\n"
                                                  "Make sure that the armature will be updated on next graphic frame.\n"
                                                  "This is automatically done if a KX_ArmatureActuator with mode run is active\n"
index 691e73d6bde8900eb5cc6f589c8e8be1373f0752..65513aa579c4d9c8f4256c30e7554922bf8068d6 100644 (file)
@@ -49,7 +49,7 @@ class MT_Matrix4x4;
 struct Object;
 class KX_BlenderSceneConverter;
 
-class BL_ArmatureObject : public KX_GameObject  
+class BL_ArmatureObject : public KX_GameObject
 {
        Py_Header
 public:
@@ -80,11 +80,11 @@ public:
        void RestorePose();
 
        bool UpdateTimestep(double curtime);
-       
+
        struct bArmature *GetArmature() { return (bArmature*)m_objArma->data; }
        const struct bArmature * GetArmature() const { return (bArmature*)m_objArma->data; }
        const struct Scene * GetScene() const { return m_scene; }
-       
+
        Object* GetArmatureObject() {return m_objArma;}
        Object* GetOrigArmatureObject() {return m_origObjArma;}
 
@@ -106,7 +106,7 @@ public:
        /// Retrieve the pose matrix for the specified bone.
        /// Returns true on success.
        bool GetBoneMatrix(Bone* bone, MT_Matrix4x4& matrix);
-       
+
        /// Returns the bone length.  The end of the bone is in the local y direction.
        float GetBoneLength(Bone* bone) const;
 
@@ -130,7 +130,7 @@ protected:
        Object                          *m_origObjArma;
        struct bPose            *m_pose;
        struct bPose            *m_armpose;
-       struct Scene            *m_scene; // need for BKE_pose_where_is 
+       struct Scene            *m_scene; // need for BKE_pose_where_is
        double  m_lastframe;
        double  m_timestep;             // delta since last pose evaluation.
        int             m_vert_deform_type;
index a12437befaa49dd69d67e859cc23a4db69d26f30..e31ad6b5cc4d1c80e941e39e6decd9bd10288873 100644 (file)
@@ -185,7 +185,7 @@ static bool default_light_mode = 0;
 static std::map<int, SCA_IInputDevice::KX_EnumInputs> create_translate_table()
 {
        std::map<int, SCA_IInputDevice::KX_EnumInputs> m;
-               
+
        /* The reverse table. In order to not confuse ourselves, we      */
        /* immediately convert all events that come in to KX codes.      */
        m[LEFTMOUSE                     ] =     SCA_IInputDevice::KX_LEFTMOUSE;
@@ -195,136 +195,136 @@ static std::map<int, SCA_IInputDevice::KX_EnumInputs> create_translate_table()
        m[WHEELDOWNMOUSE        ] =     SCA_IInputDevice::KX_WHEELDOWNMOUSE;
        m[MOUSEX                        ] = SCA_IInputDevice::KX_MOUSEX;
        m[MOUSEY                        ] =     SCA_IInputDevice::KX_MOUSEY;
-               
-       // TIMERS                                                                                                  
-               
-       m[TIMER0                        ] = SCA_IInputDevice::KX_TIMER0;                  
-       m[TIMER1                        ] = SCA_IInputDevice::KX_TIMER1;                  
-       m[TIMER2                        ] = SCA_IInputDevice::KX_TIMER2;                  
-               
-       // SYSTEM                                                                                                  
-               
+
+       // TIMERS
+
+       m[TIMER0                        ] = SCA_IInputDevice::KX_TIMER0;
+       m[TIMER1                        ] = SCA_IInputDevice::KX_TIMER1;
+       m[TIMER2                        ] = SCA_IInputDevice::KX_TIMER2;
+
+       // SYSTEM
+
 #if 0
        /* **** XXX **** */
-       m[KEYBD                         ] = SCA_IInputDevice::KX_KEYBD;                  
-       m[RAWKEYBD                      ] = SCA_IInputDevice::KX_RAWKEYBD;                  
-       m[REDRAW                        ] = SCA_IInputDevice::KX_REDRAW;                  
-       m[INPUTCHANGE           ] = SCA_IInputDevice::KX_INPUTCHANGE;                  
-       m[QFULL                         ] = SCA_IInputDevice::KX_QFULL;                  
-       m[WINFREEZE                     ] = SCA_IInputDevice::KX_WINFREEZE;                  
-       m[WINTHAW                       ] = SCA_IInputDevice::KX_WINTHAW;                  
-       m[WINCLOSE                      ] = SCA_IInputDevice::KX_WINCLOSE;                  
-       m[WINQUIT                       ] = SCA_IInputDevice::KX_WINQUIT;                  
-       m[Q_FIRSTTIME           ] = SCA_IInputDevice::KX_Q_FIRSTTIME;                  
+       m[KEYBD                         ] = SCA_IInputDevice::KX_KEYBD;
+       m[RAWKEYBD                      ] = SCA_IInputDevice::KX_RAWKEYBD;
+       m[REDRAW                        ] = SCA_IInputDevice::KX_REDRAW;
+       m[INPUTCHANGE           ] = SCA_IInputDevice::KX_INPUTCHANGE;
+       m[QFULL                         ] = SCA_IInputDevice::KX_QFULL;
+       m[WINFREEZE                     ] = SCA_IInputDevice::KX_WINFREEZE;
+       m[WINTHAW                       ] = SCA_IInputDevice::KX_WINTHAW;
+       m[WINCLOSE                      ] = SCA_IInputDevice::KX_WINCLOSE;
+       m[WINQUIT                       ] = SCA_IInputDevice::KX_WINQUIT;
+       m[Q_FIRSTTIME           ] = SCA_IInputDevice::KX_Q_FIRSTTIME;
        /* **** XXX **** */
 #endif
-               
-       // standard keyboard                                                                                       
-               
-       m[AKEY                          ] = SCA_IInputDevice::KX_AKEY;                  
-       m[BKEY                          ] = SCA_IInputDevice::KX_BKEY;                  
-       m[CKEY                          ] = SCA_IInputDevice::KX_CKEY;                  
-       m[DKEY                          ] = SCA_IInputDevice::KX_DKEY;                  
-       m[EKEY                          ] = SCA_IInputDevice::KX_EKEY;                  
-       m[FKEY                          ] = SCA_IInputDevice::KX_FKEY;                  
-       m[GKEY                          ] = SCA_IInputDevice::KX_GKEY;                  
-       m[HKEY                          ] = SCA_IInputDevice::KX_HKEY;                  
-       m[IKEY                          ] = SCA_IInputDevice::KX_IKEY;                  
-       m[JKEY                          ] = SCA_IInputDevice::KX_JKEY;                  
-       m[KKEY                          ] = SCA_IInputDevice::KX_KKEY;                  
-       m[LKEY                          ] = SCA_IInputDevice::KX_LKEY;                  
-       m[MKEY                          ] = SCA_IInputDevice::KX_MKEY;                  
-       m[NKEY                          ] = SCA_IInputDevice::KX_NKEY;                  
-       m[OKEY                          ] = SCA_IInputDevice::KX_OKEY;                  
-       m[PKEY                          ] = SCA_IInputDevice::KX_PKEY;                  
-       m[QKEY                          ] = SCA_IInputDevice::KX_QKEY;                  
-       m[RKEY                          ] = SCA_IInputDevice::KX_RKEY;                  
-       m[SKEY                          ] = SCA_IInputDevice::KX_SKEY;                  
-       m[TKEY                          ] = SCA_IInputDevice::KX_TKEY;                  
-       m[UKEY                          ] = SCA_IInputDevice::KX_UKEY;                  
-       m[VKEY                          ] = SCA_IInputDevice::KX_VKEY;                  
-       m[WKEY                          ] = SCA_IInputDevice::KX_WKEY;                  
-       m[XKEY                          ] = SCA_IInputDevice::KX_XKEY;                  
-       m[YKEY                          ] = SCA_IInputDevice::KX_YKEY;                  
-       m[ZKEY                          ] = SCA_IInputDevice::KX_ZKEY;                  
-               
-       m[ZEROKEY                       ] = SCA_IInputDevice::KX_ZEROKEY;                  
-       m[ONEKEY                        ] = SCA_IInputDevice::KX_ONEKEY;                  
-       m[TWOKEY                        ] = SCA_IInputDevice::KX_TWOKEY;                  
-       m[THREEKEY                      ] = SCA_IInputDevice::KX_THREEKEY;                  
-       m[FOURKEY                       ] = SCA_IInputDevice::KX_FOURKEY;                  
-       m[FIVEKEY                       ] = SCA_IInputDevice::KX_FIVEKEY;                  
-       m[SIXKEY                        ] = SCA_IInputDevice::KX_SIXKEY;                  
-       m[SEVENKEY                      ] = SCA_IInputDevice::KX_SEVENKEY;                  
-       m[EIGHTKEY                      ] = SCA_IInputDevice::KX_EIGHTKEY;                  
-       m[NINEKEY                       ] = SCA_IInputDevice::KX_NINEKEY;                  
-               
-       m[CAPSLOCKKEY           ] = SCA_IInputDevice::KX_CAPSLOCKKEY;                  
-               
-       m[LEFTCTRLKEY           ] = SCA_IInputDevice::KX_LEFTCTRLKEY;                  
-       m[LEFTALTKEY            ] = SCA_IInputDevice::KX_LEFTALTKEY;                  
-       m[RIGHTALTKEY           ] = SCA_IInputDevice::KX_RIGHTALTKEY;                  
-       m[RIGHTCTRLKEY          ] = SCA_IInputDevice::KX_RIGHTCTRLKEY;                  
-       m[RIGHTSHIFTKEY         ] = SCA_IInputDevice::KX_RIGHTSHIFTKEY;                  
-       m[LEFTSHIFTKEY          ] = SCA_IInputDevice::KX_LEFTSHIFTKEY;                  
-               
-       m[ESCKEY                        ] = SCA_IInputDevice::KX_ESCKEY;                  
-       m[TABKEY                        ] = SCA_IInputDevice::KX_TABKEY;                  
-       m[RETKEY                        ] = SCA_IInputDevice::KX_RETKEY;                  
-       m[SPACEKEY                      ] = SCA_IInputDevice::KX_SPACEKEY;                  
-       m[LINEFEEDKEY           ] = SCA_IInputDevice::KX_LINEFEEDKEY;                  
-       m[BACKSPACEKEY          ] = SCA_IInputDevice::KX_BACKSPACEKEY;                  
-       m[DELKEY                        ] = SCA_IInputDevice::KX_DELKEY;                  
-       m[SEMICOLONKEY          ] = SCA_IInputDevice::KX_SEMICOLONKEY;                  
-       m[PERIODKEY                     ] = SCA_IInputDevice::KX_PERIODKEY;                  
-       m[COMMAKEY                      ] = SCA_IInputDevice::KX_COMMAKEY;                  
-       m[QUOTEKEY                      ] = SCA_IInputDevice::KX_QUOTEKEY;                  
-       m[ACCENTGRAVEKEY        ] = SCA_IInputDevice::KX_ACCENTGRAVEKEY;                  
-       m[MINUSKEY                      ] = SCA_IInputDevice::KX_MINUSKEY;                  
+
+       // standard keyboard
+
+       m[AKEY                          ] = SCA_IInputDevice::KX_AKEY;
+       m[BKEY                          ] = SCA_IInputDevice::KX_BKEY;
+       m[CKEY                          ] = SCA_IInputDevice::KX_CKEY;
+       m[DKEY                          ] = SCA_IInputDevice::KX_DKEY;
+       m[EKEY                          ] = SCA_IInputDevice::KX_EKEY;
+       m[FKEY                          ] = SCA_IInputDevice::KX_FKEY;
+       m[GKEY                          ] = SCA_IInputDevice::KX_GKEY;
+       m[HKEY                          ] = SCA_IInputDevice::KX_HKEY;
+       m[IKEY                          ] = SCA_IInputDevice::KX_IKEY;
+       m[JKEY                          ] = SCA_IInputDevice::KX_JKEY;
+       m[KKEY                          ] = SCA_IInputDevice::KX_KKEY;
+       m[LKEY                          ] = SCA_IInputDevice::KX_LKEY;
+       m[MKEY                          ] = SCA_IInputDevice::KX_MKEY;
+       m[NKEY                          ] = SCA_IInputDevice::KX_NKEY;
+       m[OKEY                          ] = SCA_IInputDevice::KX_OKEY;
+       m[PKEY                          ] = SCA_IInputDevice::KX_PKEY;
+       m[QKEY                          ] = SCA_IInputDevice::KX_QKEY;
+       m[RKEY                          ] = SCA_IInputDevice::KX_RKEY;
+       m[SKEY                          ] = SCA_IInputDevice::KX_SKEY;
+       m[TKEY                          ] = SCA_IInputDevice::KX_TKEY;
+       m[UKEY                          ] = SCA_IInputDevice::KX_UKEY;
+       m[VKEY                          ] = SCA_IInputDevice::KX_VKEY;
+       m[WKEY                          ] = SCA_IInputDevice::KX_WKEY;
+       m[XKEY                          ] = SCA_IInputDevice::KX_XKEY;
+       m[YKEY                          ] = SCA_IInputDevice::KX_YKEY;
+       m[ZKEY                          ] = SCA_IInputDevice::KX_ZKEY;
+
+       m[ZEROKEY                       ] = SCA_IInputDevice::KX_ZEROKEY;
+       m[ONEKEY                        ] = SCA_IInputDevice::KX_ONEKEY;
+       m[TWOKEY                        ] = SCA_IInputDevice::KX_TWOKEY;
+       m[THREEKEY                      ] = SCA_IInputDevice::KX_THREEKEY;
+       m[FOURKEY                       ] = SCA_IInputDevice::KX_FOURKEY;
+       m[FIVEKEY                       ] = SCA_IInputDevice::KX_FIVEKEY;
+       m[SIXKEY                        ] = SCA_IInputDevice::KX_SIXKEY;
+       m[SEVENKEY                      ] = SCA_IInputDevice::KX_SEVENKEY;
+       m[EIGHTKEY                      ] = SCA_IInputDevice::KX_EIGHTKEY;
+       m[NINEKEY                       ] = SCA_IInputDevice::KX_NINEKEY;
+
+       m[CAPSLOCKKEY           ] = SCA_IInputDevice::KX_CAPSLOCKKEY;
+
+       m[LEFTCTRLKEY           ] = SCA_IInputDevice::KX_LEFTCTRLKEY;
+       m[LEFTALTKEY            ] = SCA_IInputDevice::KX_LEFTALTKEY;
+       m[RIGHTALTKEY           ] = SCA_IInputDevice::KX_RIGHTALTKEY;
+       m[RIGHTCTRLKEY          ] = SCA_IInputDevice::KX_RIGHTCTRLKEY;
+       m[RIGHTSHIFTKEY         ] = SCA_IInputDevice::KX_RIGHTSHIFTKEY;
+       m[LEFTSHIFTKEY          ] = SCA_IInputDevice::KX_LEFTSHIFTKEY;
+
+       m[ESCKEY                        ] = SCA_IInputDevice::KX_ESCKEY;
+       m[TABKEY                        ] = SCA_IInputDevice::KX_TABKEY;
+       m[RETKEY                        ] = SCA_IInputDevice::KX_RETKEY;
+       m[SPACEKEY                      ] = SCA_IInputDevice::KX_SPACEKEY;
+       m[LINEFEEDKEY           ] = SCA_IInputDevice::KX_LINEFEEDKEY;
+       m[BACKSPACEKEY          ] = SCA_IInputDevice::KX_BACKSPACEKEY;
+       m[DELKEY                        ] = SCA_IInputDevice::KX_DELKEY;
+       m[SEMICOLONKEY          ] = SCA_IInputDevice::KX_SEMICOLONKEY;
+       m[PERIODKEY                     ] = SCA_IInputDevice::KX_PERIODKEY;
+       m[COMMAKEY                      ] = SCA_IInputDevice::KX_COMMAKEY;
+       m[QUOTEKEY                      ] = SCA_IInputDevice::KX_QUOTEKEY;
+       m[ACCENTGRAVEKEY        ] = SCA_IInputDevice::KX_ACCENTGRAVEKEY;
+       m[MINUSKEY                      ] = SCA_IInputDevice::KX_MINUSKEY;
        m[PLUSKEY                       ] = SCA_IInputDevice::KX_PLUSKEY;
        m[SLASHKEY                      ] = SCA_IInputDevice::KX_SLASHKEY;
-       m[BACKSLASHKEY          ] = SCA_IInputDevice::KX_BACKSLASHKEY;                  
-       m[EQUALKEY                      ] = SCA_IInputDevice::KX_EQUALKEY;                  
-       m[LEFTBRACKETKEY        ] = SCA_IInputDevice::KX_LEFTBRACKETKEY;                  
-       m[RIGHTBRACKETKEY       ] = SCA_IInputDevice::KX_RIGHTBRACKETKEY;                  
-               
-       m[LEFTARROWKEY          ] = SCA_IInputDevice::KX_LEFTARROWKEY;                  
-       m[DOWNARROWKEY          ] = SCA_IInputDevice::KX_DOWNARROWKEY;                  
-       m[RIGHTARROWKEY         ] = SCA_IInputDevice::KX_RIGHTARROWKEY;                  
-       m[UPARROWKEY            ] = SCA_IInputDevice::KX_UPARROWKEY;                  
-               
-       m[PAD2                          ] = SCA_IInputDevice::KX_PAD2;                  
-       m[PAD4                          ] = SCA_IInputDevice::KX_PAD4;                  
-       m[PAD6                          ] = SCA_IInputDevice::KX_PAD6;                  
-       m[PAD8                          ] = SCA_IInputDevice::KX_PAD8;                  
-               
-       m[PAD1                          ] = SCA_IInputDevice::KX_PAD1;                  
-       m[PAD3                          ] = SCA_IInputDevice::KX_PAD3;                  
-       m[PAD5                          ] = SCA_IInputDevice::KX_PAD5;                  
-       m[PAD7                          ] = SCA_IInputDevice::KX_PAD7;                  
-       m[PAD9                          ] = SCA_IInputDevice::KX_PAD9;                  
-               
-       m[PADPERIOD                     ] = SCA_IInputDevice::KX_PADPERIOD;                  
-       m[PADSLASHKEY           ] = SCA_IInputDevice::KX_PADSLASHKEY;                  
-       m[PADASTERKEY           ] = SCA_IInputDevice::KX_PADASTERKEY;                  
-               
-       m[PAD0                          ] = SCA_IInputDevice::KX_PAD0;                  
-       m[PADMINUS                      ] = SCA_IInputDevice::KX_PADMINUS;                  
-       m[PADENTER                      ] = SCA_IInputDevice::KX_PADENTER;                  
-       m[PADPLUSKEY            ] = SCA_IInputDevice::KX_PADPLUSKEY;                  
-               
-               
-       m[F1KEY                         ] = SCA_IInputDevice::KX_F1KEY;                  
-       m[F2KEY                         ] = SCA_IInputDevice::KX_F2KEY;                  
-       m[F3KEY                         ] = SCA_IInputDevice::KX_F3KEY;                  
-       m[F4KEY                         ] = SCA_IInputDevice::KX_F4KEY;                  
-       m[F5KEY                         ] = SCA_IInputDevice::KX_F5KEY;                  
-       m[F6KEY                         ] = SCA_IInputDevice::KX_F6KEY;                  
-       m[F7KEY                         ] = SCA_IInputDevice::KX_F7KEY;                  
-       m[F8KEY                         ] = SCA_IInputDevice::KX_F8KEY;                  
-       m[F9KEY                         ] = SCA_IInputDevice::KX_F9KEY;                  
-       m[F10KEY                        ] = SCA_IInputDevice::KX_F10KEY;                  
-       m[F11KEY                        ] = SCA_IInputDevice::KX_F11KEY;                  
+       m[BACKSLASHKEY          ] = SCA_IInputDevice::KX_BACKSLASHKEY;
+       m[EQUALKEY                      ] = SCA_IInputDevice::KX_EQUALKEY;
+       m[LEFTBRACKETKEY        ] = SCA_IInputDevice::KX_LEFTBRACKETKEY;
+       m[RIGHTBRACKETKEY       ] = SCA_IInputDevice::KX_RIGHTBRACKETKEY;
+
+       m[LEFTARROWKEY          ] = SCA_IInputDevice::KX_LEFTARROWKEY;
+       m[DOWNARROWKEY          ] = SCA_IInputDevice::KX_DOWNARROWKEY;
+       m[RIGHTARROWKEY         ] = SCA_IInputDevice::KX_RIGHTARROWKEY;
+       m[UPARROWKEY            ] = SCA_IInputDevice::KX_UPARROWKEY;
+
+       m[PAD2                          ] = SCA_IInputDevice::KX_PAD2;
+       m[PAD4                          ] = SCA_IInputDevice::KX_PAD4;
+       m[PAD6                          ] = SCA_IInputDevice::KX_PAD6;
+       m[PAD8                          ] = SCA_IInputDevice::KX_PAD8;
+
+       m[PAD1                          ] = SCA_IInputDevice::KX_PAD1;
+       m[PAD3                          ] = SCA_IInputDevice::KX_PAD3;
+       m[PAD5                          ] = SCA_IInputDevice::KX_PAD5;
+       m[PAD7                          ] = SCA_IInputDevice::KX_PAD7;
+       m[PAD9                          ] = SCA_IInputDevice::KX_PAD9;
+
+       m[PADPERIOD                     ] = SCA_IInputDevice::KX_PADPERIOD;
+       m[PADSLASHKEY           ] = SCA_IInputDevice::KX_PADSLASHKEY;
+       m[PADASTERKEY           ] = SCA_IInputDevice::KX_PADASTERKEY;
+
+       m[PAD0                          ] = SCA_IInputDevice::KX_PAD0;
+       m[PADMINUS                      ] = SCA_IInputDevice::KX_PADMINUS;
+       m[PADENTER                      ] = SCA_IInputDevice::KX_PADENTER;
+       m[PADPLUSKEY            ] = SCA_IInputDevice::KX_PADPLUSKEY;
+
+
+       m[F1KEY                         ] = SCA_IInputDevice::KX_F1KEY;
+       m[F2KEY                         ] = SCA_IInputDevice::KX_F2KEY;
+       m[F3KEY                         ] = SCA_IInputDevice::KX_F3KEY;
+       m[F4KEY                         ] = SCA_IInputDevice::KX_F4KEY;
+       m[F5KEY                         ] = SCA_IInputDevice::KX_F5KEY;
+       m[F6KEY                         ] = SCA_IInputDevice::KX_F6KEY;
+       m[F7KEY                         ] = SCA_IInputDevice::KX_F7KEY;
+       m[F8KEY                         ] = SCA_IInputDevice::KX_F8KEY;
+       m[F9KEY                         ] = SCA_IInputDevice::KX_F9KEY;
+       m[F10KEY                        ] = SCA_IInputDevice::KX_F10KEY;
+       m[F11KEY                        ] = SCA_IInputDevice::KX_F11KEY;
        m[F12KEY                        ] = SCA_IInputDevice::KX_F12KEY;
        m[F13KEY                        ] = SCA_IInputDevice::KX_F13KEY;
        m[F14KEY                        ] = SCA_IInputDevice::KX_F14KEY;
@@ -336,11 +336,11 @@ static std::map<int, SCA_IInputDevice::KX_EnumInputs> create_translate_table()
 
        m[OSKEY                         ] = SCA_IInputDevice::KX_OSKEY;
 
-       m[PAUSEKEY                      ] = SCA_IInputDevice::KX_PAUSEKEY;                  
-       m[INSERTKEY                     ] = SCA_IInputDevice::KX_INSERTKEY;                  
-       m[HOMEKEY                       ] = SCA_IInputDevice::KX_HOMEKEY;                  
-       m[PAGEUPKEY                     ] = SCA_IInputDevice::KX_PAGEUPKEY;                  
-       m[PAGEDOWNKEY           ] = SCA_IInputDevice::KX_PAGEDOWNKEY;                  
+       m[PAUSEKEY                      ] = SCA_IInputDevice::KX_PAUSEKEY;
+       m[INSERTKEY                     ] = SCA_IInputDevice::KX_INSERTKEY;
+       m[HOMEKEY                       ] = SCA_IInputDevice::KX_HOMEKEY;
+       m[PAGEUPKEY                     ] = SCA_IInputDevice::KX_PAGEUPKEY;
+       m[PAGEDOWNKEY           ] = SCA_IInputDevice::KX_PAGEDOWNKEY;
        m[ENDKEY                        ] = SCA_IInputDevice::KX_ENDKEY;
 
        return m;
@@ -360,13 +360,13 @@ static unsigned int KX_rgbaint2uint_new(unsigned int icol)
                unsigned int integer;
                unsigned char cp[4];
        } out_color, in_color;
-       
+
        in_color.integer = icol;
        out_color.cp[0] = in_color.cp[3]; // red
        out_color.cp[1] = in_color.cp[2]; // green
        out_color.cp[2] = in_color.cp[1]; // blue
        out_color.cp[3] = in_color.cp[0]; // alpha
-       
+
        return out_color.integer;
 }
 
@@ -386,7 +386,7 @@ static unsigned int KX_Mcol2uint_new(MCol col)
        out_color.cp[1] = in_color.cp[2]; // green
        out_color.cp[2] = in_color.cp[1]; // blue
        out_color.cp[3] = in_color.cp[0]; // alpha
-       
+
        return out_color.integer;
 }
 
@@ -487,19 +487,19 @@ static void GetUVs(BL_Material *material, MTF_localLayer *layers, MFace *mface,
        int unit = 0;
        if (tface)
        {
-                       
+
                uvs[0][0].setValue(tface->uv[0]);
                uvs[1][0].setValue(tface->uv[1]);
                uvs[2][0].setValue(tface->uv[2]);
 
-               if (mface->v4) 
+               if (mface->v4)
                        uvs[3][0].setValue(tface->uv[3]);
        }
        else
        {
                uvs[0][0] = uvs[1][0] = uvs[2][0] = uvs[3][0] = MT_Point2(0.f, 0.f);
        }
-       
+
        vector<STR_String> found_layers;
 
        for (int vind = 0; vind<MAXTEX; vind++)
@@ -513,12 +513,12 @@ static void GetUVs(BL_Material *material, MTF_localLayer *layers, MFace *mface,
 
                //If no UVSet is specified, try grabbing one from the UV/Image editor
                if (map.uvCoName.IsEmpty() && tface)
-               {                       
+               {
                        uvs[0][unit].setValue(tface->uv[0]);
                        uvs[1][unit].setValue(tface->uv[1]);
                        uvs[2][unit].setValue(tface->uv[2]);
 
-                       if (mface->v4) 
+                       if (mface->v4)
                                uvs[3][unit].setValue(tface->uv[3]);
 
                        ++unit;
@@ -537,7 +537,7 @@ static void GetUVs(BL_Material *material, MTF_localLayer *layers, MFace *mface,
                                uvs[1][unit].setValue(layer.face->uv[1]);
                                uvs[2][unit].setValue(layer.face->uv[2]);
 
-                               if (mface->v4) 
+                               if (mface->v4)
                                        uvs[3][unit].setValue(layer.face->uv[3]);
                                else
                                        uvs[3][unit].setValue(0.0f, 0.0f);
@@ -565,7 +565,7 @@ static bool ConvertMaterial(
        const bool validmat  = (mat != NULL);
        const bool validface = (tface != NULL);
        const bool use_vcol  = GetMaterialUseVColor(mat, glslmat);
-       
+
        material->IdMode = DEFAULT_BLENDER;
        material->glslmat = (validmat) ? glslmat: false;
        material->materialindex = mface->mat_nr;
@@ -685,7 +685,7 @@ static bool ConvertMaterial(
                                        if (mat->septex & (1 << i)) {
                                                // If this texture slot isn't in use, set it to disabled to prevent multi-uv problems
                                                material->mapping[i].mapping = DISABLE;
-                                       } 
+                                       }
                                        else {
                                                material->mapping[i].mapping |= (mttmp->texco & TEXCO_REFL) ? USEREFL : 0;
 
@@ -728,7 +728,7 @@ static bool ConvertMaterial(
                                                material->mapping[i].projplane[2] = mttmp->projz;
                                        }
                                        /// --------------------------------
-                                       
+
                                        switch (mttmp->blendtype) {
                                        case MTEX_BLEND:
                                                material->blend_mode[i] = BLEND_MIX;
@@ -913,10 +913,10 @@ static RAS_MaterialBucket *material_from_mesh(Material *ma, MFace *mface, MTFace
                if (ma && (ma->mode & MA_FACETEXTURE) == 0)
                        converter->CachePolyMaterial(scene, ma, polymat);
        }
-       
+
        // see if a bucket was reused or a new one was created
        // this way only one KX_BlenderMaterial object has to exist per bucket
-       bool bucketCreated; 
+       bool bucketCreated;
        RAS_MaterialBucket* bucket = scene->FindBucket(polymat, bucketCreated);
 
        // this is needed to free up memory afterwards.
@@ -1087,7 +1087,7 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, KX_Scene* scene,
 
                        /* mark face as flat, so vertices are split */
                        bool flat = (mface->flag & ME_SMOOTH) == 0;
-                               
+
                        int nverts = (mface->v4)? 4: 3;
 
                        RAS_Polygon *poly = meshobj->AddPolygon(bucket, nverts);
@@ -1105,7 +1105,7 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, KX_Scene* scene,
                                meshobj->AddVertex(poly,3,pt[3],uvs[3],tan[3],rgb[3],no[3],flat,mface->v4);
                }
 
-               if (tface) 
+               if (tface)
                        tface++;
                if (mcol)
                        mcol+=4;
@@ -1134,27 +1134,27 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, KX_Scene* scene,
 
        if (layers)
                delete []layers;
-       
+
        dm->release(dm);
 
        converter->RegisterGameMesh(meshobj, mesh);
        return meshobj;
 }
 
-       
-       
+
+
 static PHY_MaterialProps *CreateMaterialFromBlenderObject(struct Object* blenderobject)
 {
        PHY_MaterialProps *materialProps = new PHY_MaterialProps;
-       
+
        MT_assert(materialProps && "Create physics material properties failed");
-               
+
        Material* blendermat = give_current_material(blenderobject, 1);
-               
+
        if (blendermat)
        {
                MT_assert(0.0f <= blendermat->reflect && blendermat->reflect <= 1.0f);
-       
+
                materialProps->m_restitution = blendermat->reflect;
                materialProps->m_friction = blendermat->friction;
                materialProps->m_fh_spring = blendermat->fh;
@@ -1172,38 +1172,38 @@ static PHY_MaterialProps *CreateMaterialFromBlenderObject(struct Object* blender
                materialProps->m_fh_normal = false;
 
        }
-       
+
        return materialProps;
 }
 
 static PHY_ShapeProps *CreateShapePropsFromBlenderObject(struct Object* blenderobject)
 {
        PHY_ShapeProps *shapeProps = new PHY_ShapeProps;
-       
+
        MT_assert(shapeProps);
-               
+
        shapeProps->m_mass = blenderobject->mass;
-       
+
 //  This needs to be fixed in blender. For now, we use:
-       
+
 // in Blender, inertia stands for the size value which is equivalent to
 // the sphere radius
        shapeProps->m_inertia = blenderobject->formfactor;
-       
+
        MT_assert(0.0f <= blenderobject->damping && blenderobject->damping <= 1.0f);
        MT_assert(0.0f <= blenderobject->rdamping && blenderobject->rdamping <= 1.0f);
-       
+
        shapeProps->m_lin_drag = 1.0f - blenderobject->damping;
        shapeProps->m_ang_drag = 1.0f - blenderobject->rdamping;
-       
-       shapeProps->m_friction_scaling[0] = blenderobject->anisotropicFriction[0]; 
+
+       shapeProps->m_friction_scaling[0] = blenderobject->anisotropicFriction[0];
        shapeProps->m_friction_scaling[1] = blenderobject->anisotropicFriction[1];
        shapeProps->m_friction_scaling[2] = blenderobject->anisotropicFriction[2];
        shapeProps->m_do_anisotropic = ((blenderobject->gameflag & OB_ANISOTROPIC_FRICTION) != 0);
-       
-       shapeProps->m_do_fh     = (blenderobject->gameflag & OB_DO_FH) != 0; 
+
+       shapeProps->m_do_fh     = (blenderobject->gameflag & OB_DO_FH) != 0;
        shapeProps->m_do_rot_fh = (blenderobject->gameflag & OB_ROT_FH) != 0;
-       
+
 //     velocity clamping XXX
        shapeProps->m_clamp_vel_min = blenderobject->min_vel;
        shapeProps->m_clamp_vel_max = blenderobject->max_vel;
@@ -1219,12 +1219,12 @@ static PHY_ShapeProps *CreateShapePropsFromBlenderObject(struct Object* blendero
        return shapeProps;
 }
 
-       
-       
-       
-               
+
+
+
+
 //////////////////////////////////////////////////////////
-       
+
 
 
 static float my_boundbox_mesh(Mesh *me, float *loc, float *size)
@@ -1235,36 +1235,36 @@ static float my_boundbox_mesh(Mesh *me, float *loc, float *size)
        float mloc[3], msize[3];
        float radius_sq=0.0f, vert_radius_sq, *co;
        int a;
-       
+
        if (me->bb==0) {
                me->bb = BKE_boundbox_alloc_unit();
        }
        bb= me->bb;
-       
+
        INIT_MINMAX(min, max);
 
        if (!loc) loc= mloc;
        if (!size) size= msize;
-       
+
        mvert= me->mvert;
        for (a = 0; a<me->totvert; a++, mvert++) {
                co = mvert->co;
-               
+
                /* bounds */
                minmax_v3v3_v3(min, max, co);
-               
+
                /* radius */
 
                vert_radius_sq = len_squared_v3(co);
                if (vert_radius_sq > radius_sq)
                        radius_sq = vert_radius_sq;
        }
-               
+
        if (me->totvert) {
                loc[0] = (min[0] + max[0]) / 2.0f;
                loc[1] = (min[1] + max[1]) / 2.0f;
                loc[2] = (min[2] + max[2]) / 2.0f;
-               
+
                size[0] = (max[0] - min[0]) / 2.0f;
                size[1] = (max[1] - min[1]) / 2.0f;
                size[2] = (max[2] - min[2]) / 2.0f;
@@ -1273,10 +1273,10 @@ static float my_boundbox_mesh(Mesh *me, float *loc, float *size)
                loc[0] = loc[1] = loc[2] = 0.0f;
                size[0] = size[1] = size[2] = 0.0f;
        }
-               
+
        bb->vec[0][0] = bb->vec[1][0] = bb->vec[2][0] = bb->vec[3][0] = loc[0]-size[0];
        bb->vec[4][0] = bb->vec[5][0] = bb->vec[6][0] = bb->vec[7][0] = loc[0]+size[0];
-               
+
        bb->vec[0][1] = bb->vec[1][1] = bb->vec[4][1] = bb->vec[5][1] = loc[1]-size[1];
        bb->vec[2][1] = bb->vec[3][1] = bb->vec[6][1] = bb->vec[7][1] = loc[1]+size[1];
 
@@ -1377,8 +1377,8 @@ static void BL_CreatePhysicsObjectNew(KX_GameObject* gameobj,
        PHY_ShapeProps* shapeprops =
                        CreateShapePropsFromBlenderObject(blenderobject);
 
-       
-       PHY_MaterialProps* smmaterial = 
+
+       PHY_MaterialProps* smmaterial =
                CreateMaterialFromBlenderObject(blenderobject);
 
        DerivedMesh* dm = NULL;
@@ -1415,7 +1415,7 @@ static KX_LightObject *gamelight_from_blamp(Object *ob, Lamp *la, unsigned int l
 {
        RAS_ILightObject *lightobj = rasterizer->CreateLight();
        KX_LightObject *gamelight;
-       
+
        lightobj->m_att1 = la->att1;
        lightobj->m_att2 = (la->mode & LA_QUAD) ? la->att2 : 0.0f;
        lightobj->m_coeff_const = la->coeff_const;
@@ -1438,10 +1438,10 @@ static KX_LightObject *gamelight_from_blamp(Object *ob, Lamp *la, unsigned int l
        lightobj->m_layer = layerflag;
        lightobj->m_spotblend = la->spotblend;
        lightobj->m_spotsize = la->spotsize;
-       
+
        lightobj->m_nodiffuse = (la->mode & LA_NO_DIFF) != 0;
        lightobj->m_nospecular = (la->mode & LA_NO_SPEC) != 0;
-       
+
        bool glslmat = converter->GetGLSLMaterials();
 
        // in GLSL NEGATIVE LAMP is handled inside the lamp update function
@@ -1453,7 +1453,7 @@ static KX_LightObject *gamelight_from_blamp(Object *ob, Lamp *la, unsigned int l
                        lightobj->m_color[2] = -lightobj->m_color[2];
                }
        }
-               
+
        if (la->type==LA_SUN) {
                lightobj->m_type = RAS_ILightObject::LIGHT_SUN;
        } else if (la->type==LA_SPOT) {
@@ -1464,7 +1464,7 @@ static KX_LightObject *gamelight_from_blamp(Object *ob, Lamp *la, unsigned int l
 
        gamelight = new KX_LightObject(kxscene, KX_Scene::m_callbacks, rasterizer,
                lightobj, glslmat);
-       
+
        return gamelight;
 }
 
@@ -1473,29 +1473,29 @@ static KX_Camera *gamecamera_from_bcamera(Object *ob, KX_Scene *kxscene, KX_Blen
        Camera* ca = static_cast<Camera*>(ob->data);
        RAS_CameraData camdata(ca->lens, ca->ortho_scale, ca->sensor_x, ca->sensor_y, ca->sensor_fit, ca->shiftx, ca->shifty, ca->clipsta, ca->clipend, ca->type == CAM_PERSP, ca->YF_dofdist);
        KX_Camera *gamecamera;
-       
+
        gamecamera= new KX_Camera(kxscene, KX_Scene::m_callbacks, camdata);
        gamecamera->SetName(ca->id.name + 2);
-       
+
        return gamecamera;
 }
 
 static KX_GameObject *gameobject_from_blenderobject(
-                                                               Object *ob, 
-                                                               KX_Scene *kxscene, 
+                                                               Object *ob,
+                                                               KX_Scene *kxscene,
                                                                RAS_IRasterizer *rendertools,
                                                                KX_BlenderSceneConverter *converter,
-                                                               bool libloading) 
+                                                               bool libloading)
 {
        KX_GameObject *gameobj = NULL;
        Scene *blenderscene = kxscene->GetBlenderScene();
-       
+
        switch (ob->type) {
        case OB_LAMP:
        {
                KX_LightObject* gamelight = gamelight_from_blamp(ob, static_cast<Lamp*>(ob->data), ob->lay, kxscene, rendertools, converter);
                gameobj = gamelight;
-               
+
                if (blenderscene->lay & ob->lay)
                {
                        gamelight->AddRef();
@@ -1504,26 +1504,26 @@ static KX_GameObject *gameobject_from_blenderobject(
 
                break;
        }
-       
+
        case OB_CAMERA:
        {
                KX_Camera* gamecamera = gamecamera_from_bcamera(ob, kxscene, converter);
                gameobj = gamecamera;
-               
+
                //don't add a reference: the camera list in kxscene->m_cameras is not released at the end
                //gamecamera->AddRef();
                kxscene->AddCamera(gamecamera);
-               
+
                break;
        }
-       
+
        case OB_MESH:
        {
                Mesh* mesh = static_cast<Mesh*>(ob->data);
                float center[3], extents[3];
                float radius = my_boundbox_mesh((Mesh*) ob->data, center, extents);
                RAS_MeshObject* meshobj = BL_ConvertMesh(mesh,ob,kxscene,converter, libloading);
-               
+
                // needed for python scripting
                kxscene->GetLogicManager()->RegisterMeshName(meshobj->GetName(),meshobj);
 
@@ -1535,7 +1535,7 @@ static KX_GameObject *gameobject_from_blenderobject(
                }
 
                gameobj = new BL_DeformableGameObject(ob,kxscene,KX_Scene::m_callbacks);
-       
+
                // set transformation
                gameobj->AddMesh(meshobj);
 
@@ -1560,10 +1560,10 @@ static KX_GameObject *gameobject_from_blenderobject(
                                kxscene->SetLodHysteresisValue(blenderscene->gm.scehysteresis);
                        }
                }
-       
+
                // for all objects: check whether they want to
                // respond to updates
-               bool ignoreActivityCulling =  
+               bool ignoreActivityCulling =
                        ((ob->gameflag2 & OB_NEVER_DO_ACTIVITY_CULLING)!=0);
                gameobj->SetIgnoreActivityCulling(ignoreActivityCulling);
                gameobj->SetOccluder((ob->gameflag & OB_OCCLUDER) != 0, false);
@@ -1572,7 +1572,7 @@ static KX_GameObject *gameobject_from_blenderobject(
                // that requires it
                Material *mat= NULL;
                bool bUseObjectColor=false;
-               
+
                for (int i=0;i<mesh->totcol;i++) {
                        mat=mesh->mat[i];
                        if (!mat) break;
@@ -1583,7 +1583,7 @@ static KX_GameObject *gameobject_from_blenderobject(
                }
                if (bUseObjectColor)
                        gameobj->SetObjectColor(ob->col);
-       
+
                // two options exists for deform: shape keys and armature
                // only support relative shape key
                bool bHasShapeKey = mesh->key != NULL && mesh->key->type==KEY_RELATIVE;
@@ -1598,8 +1598,8 @@ static KX_GameObject *gameobject_from_blenderobject(
                                                                                                                                kxscene->GetBlenderScene(), ob, meshobj);
                        ((BL_DeformableGameObject*)gameobj)->SetDeformer(dcont);
                } else if (bHasShapeKey) {
-                       // not that we can have shape keys without dvert! 
-                       BL_ShapeDeformer *dcont = new BL_ShapeDeformer((BL_DeformableGameObject*)gameobj, 
+                       // not that we can have shape keys without dvert!
+                       BL_ShapeDeformer *dcont = new BL_ShapeDeformer((BL_DeformableGameObject*)gameobj,
                                                                                                                        ob, meshobj);
                        ((BL_DeformableGameObject*)gameobj)->SetDeformer(dcont);
                } else if (bHasArmature) {
@@ -1619,16 +1619,16 @@ static KX_GameObject *gameobject_from_blenderobject(
                        ((BL_DeformableGameObject*)gameobj)->SetDeformer(dcont);
 #endif
                }
-               
+
                MT_Point3 min = MT_Point3(center) - MT_Vector3(extents);
                MT_Point3 max = MT_Point3(center) + MT_Vector3(extents);
                SG_BBox bbox = SG_BBox(min, max);
                gameobj->GetSGNode()->SetBBox(bbox);
                gameobj->GetSGNode()->SetRadius(radius);
-       
+
                break;
        }
-       
+
        case OB_ARMATURE:
        {
                bArmature *arm = (bArmature*)ob->data;
@@ -1642,7 +1642,7 @@ static KX_GameObject *gameobject_from_blenderobject(
                /* Get the current pose from the armature object and apply it as the rest pose */
                break;
        }
-       
+
        case OB_EMPTY:
        {
                gameobj = new KX_EmptyObject(kxscene,KX_Scene::m_callbacks);
@@ -1672,7 +1672,7 @@ static KX_GameObject *gameobject_from_blenderobject(
 #endif
 
        }
-       if (gameobj) 
+       if (gameobj)
        {
                gameobj->SetLayer(ob->lay);
                gameobj->SetBlenderObject(ob);
@@ -1691,13 +1691,13 @@ static bPoseChannel *get_active_posechannel2(Object *ob)
 {
        bArmature *arm= (bArmature*)ob->data;
        bPoseChannel *pchan;
-       
+
        /* find active */
        for (pchan= (bPoseChannel *)ob->pose->chanbase.first; pchan; pchan= pchan->next) {
                if (pchan->bone && (pchan->bone == arm->act_bone) && (pchan->bone->layer & arm->layer))
                        return pchan;
        }
-       
+
        return NULL;
 }
 
@@ -1707,14 +1707,14 @@ static ListBase *get_active_constraints2(Object *ob)
                return NULL;
 
   // XXX - shouldnt we care about the pose data and not the mode???
-       if (ob->mode & OB_MODE_POSE) { 
+       if (ob->mode & OB_MODE_POSE) {
                bPoseChannel *pchan;
 
                pchan = get_active_posechannel2(ob);
                if (pchan)
                        return &pchan->constraints;
        }
-       else 
+       else
                return &ob->constraints;
 
        return NULL;
@@ -1753,7 +1753,7 @@ static KX_GameObject* getGameOb(STR_String busc,CListValue* sumolist)
                if (gameobje->GetName()==busc)
                        return gameobje;
        }
-       
+
        return 0;
 
 }
@@ -1945,11 +1945,11 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
                } else {
                        frame_type = RAS_FrameSettings::e_frame_scale;
                }
-               
+
                aspect_width  = (int)(blenderscene->r.xsch * blenderscene->r.xasp);
                aspect_height = (int)(blenderscene->r.ysch * blenderscene->r.yasp);
        }
-       
+
        RAS_FrameSettings frame_settings(
                frame_type,
                blenderscene->gm.framing.col[0],
@@ -1961,33 +1961,33 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
        kxscene->SetFramingType(frame_settings);
 
        kxscene->SetGravity(MT_Vector3(0,0, -blenderscene->gm.gravity));
-       
+
        /* set activity culling parameters */
        kxscene->SetActivityCulling( (blenderscene->gm.mode & WO_ACTIVITY_CULLING) != 0);
        kxscene->SetActivityCullingRadius(blenderscene->gm.activityBoxRadius);
        kxscene->SetDbvtCulling((blenderscene->gm.mode & WO_DBVT_CULLING) != 0);
-       
+
        // no occlusion culling by default
        kxscene->SetDbvtOcclusionRes(0);
 
        int activeLayerBitInfo = blenderscene->lay;
-       
+
        // list of all object converted, active and inactive
        CListValue*     sumolist = new CListValue();
-       
+
        vector<parentChildLink> vec_parent_child;
-       
+
        CListValue* objectlist = kxscene->GetObjectList();
        CListValue* inactivelist = kxscene->GetInactiveList();
        CListValue* parentlist = kxscene->GetRootParentList();
-       
+
        SCA_LogicManager* logicmgr = kxscene->GetLogicManager();
        SCA_TimeEventManager* timemgr = kxscene->GetTimeEventManager();
-       
+
        CListValue* logicbrick_conversionlist = new CListValue();
-       
+
        //SG_TreeFactory tf;
-       
+
        // Convert actions to actionmap
        bAction *curAct;
        for (curAct = (bAction*)maggie->action.first; curAct; curAct=(bAction*)curAct->id.next)
@@ -2009,9 +2009,9 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
                allblobj.insert(blenderobject);
 
                KX_GameObject* gameobj = gameobject_from_blenderobject(
-                                                                               base->object, 
-                                                                               kxscene, 
-                                                                               rendertools, 
+                                                                               base->object,
+                                                                               kxscene,
+                                                                               rendertools,
                                                                                converter,
                                                                                libloading);
 
@@ -2061,9 +2061,9 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
                                                allblobj.insert(blenderobject);
                                                groupobj.insert(blenderobject);
                                                KX_GameObject* gameobj = gameobject_from_blenderobject(
-                                                                                                               blenderobject, 
-                                                                                                               kxscene, 
-                                                                                                               rendertools, 
+                                                                                                               blenderobject,
+                                                                                                               kxscene,
+                                                                                                               rendertools,
                                                                                                                converter,
                                                                                                                libloading);
 
@@ -2097,7 +2097,7 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
        // non-camera objects not supported as camera currently
        if (blenderscene->camera && blenderscene->camera->type == OB_CAMERA) {
                KX_Camera *gamecamera= (KX_Camera*) converter->FindGameObject(blenderscene->camera);
-               
+
                if (gamecamera)
                        kxscene->SetActiveCamera(gamecamera);
        }
@@ -2109,7 +2109,7 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
                Object* blenderobj = *oit;
                if (blenderobj->type==OB_MESH) {
                        Mesh *me = (Mesh*)blenderobj->data;
-       
+
                        if (me->dvert) {
                                BL_DeformableGameObject *obj = (BL_DeformableGameObject*)converter->FindGameObject(blenderobj);
 
@@ -2121,14 +2121,14 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
                        }
                }
        }
-       
+
        // create hierarchy information
        int i;
        vector<parentChildLink>::iterator pcit;
-       
+
        for (pcit = vec_parent_child.begin();!(pcit==vec_parent_child.end());++pcit)
        {
-       
+
                struct Object* blenderchild = pcit->m_blenderchild;
                struct Object* blenderparent = blenderchild->parent;
                KX_GameObject* parentobj = converter->FindGameObject(blenderparent);
@@ -2138,7 +2138,7 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
 
                if (!parentobj || objectlist->SearchValue(childobj) != objectlist->SearchValue(parentobj))
                {
-                       // special case: the parent and child object are not in the same layer. 
+                       // special case: the parent and child object are not in the same layer.
                        // This weird situation is used in Apricot for test purposes.
                        // Resolve it by not converting the child
                        childobj->GetSGNode()->DisconnectFromParent();
@@ -2158,11 +2158,11 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
                                        obj->Release();
                        }
                        childrenlist->Release();
-                       
+
                        // now destroy recursively
                        converter->UnregisterGameObject(childobj); // removing objects during conversion make sure this runs too
                        kxscene->RemoveObject(childobj);
-                       
+
                        continue;
                }
 
@@ -2192,7 +2192,7 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
                                        KX_BoneParentRelation *bone_parent_relation = KX_BoneParentRelation::New(parent_bone);
                                        pcit->m_gamechildnode->SetParentRelation(bone_parent_relation);
                                }
-                       
+
                                break;
                        }
                        case PARSKEL: // skinned - ignore
@@ -2203,11 +2203,11 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
                                // unhandled
                                break;
                }
-       
+
                parentobj->     GetSGNode()->AddChild(pcit->m_gamechildnode);
        }
        vec_parent_child.clear();
-       
+
        // find 'root' parents (object that has not parents in SceneGraph)
        for (i=0;i<sumolist->GetCount();++i)
        {
@@ -2226,7 +2226,7 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
                for (i=0; i<sumolist->GetCount();i++)
                {
                        KX_GameObject* gameobj = (KX_GameObject*) sumolist->GetValue(i);
-                       if (gameobj->GetMeshCount() > 0) 
+                       if (gameobj->GetMeshCount() > 0)
                        {
                                MT_Point3 box[2];
                                gameobj->GetSGNode()->BBox().getmm(box, MT_Transform::Identity());
@@ -2322,7 +2322,7 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
                                continue;
 
                        bRigidBodyJointConstraint *dat = (bRigidBodyJointConstraint *)curcon->data;
-                                       
+
                        /* Skip if no target or a child object is selected or constraints are deactivated */
                        if (!dat->tar || dat->child || (curcon->flag & CONSTRAINT_OFF))
                                continue;
@@ -2336,7 +2336,7 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
                        if (libloading)
                                continue;
 
-                       /* Skipped already converted constraints. 
+                       /* Skipped already converted constraints.
                         * This will happen when a group instance is made from a linked group instance
                         * and both are on the active layer. */
                        if (bl_isConstraintInList(gameobj, convertedlist))
@@ -2356,7 +2356,7 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
        set<KX_GameObject*>::iterator gobit;
        for (gobit = convertedlist.begin(); gobit != convertedlist.end(); gobit++)
                (*gobit)->Release();
-               
+
        convertedlist.clear();
        sumolist->Release();
 
@@ -2440,7 +2440,7 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
        }
 
        logicbrick_conversionlist->Release();
-       
+
        // Calculate the scene btree -
        // too slow - commented out.
        //kxscene->SetNodeTree(tf.MakeTree());
index 22210cc6035c22bcf5ef1770a764a34c4d27f192..c120de85d741dd1d48f5dfec61caa765b604ddce 100644 (file)
@@ -45,8 +45,8 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
                                                          class KX_KetsjiEngine* ketsjiEngine,
                                                          e_PhysicsEngine       physics_engine,
                                                          class RAS_IRasterizer* rendertools,
-                                                         class RAS_ICanvas* canvas, 
-                                                         class KX_BlenderSceneConverter* sceneconverter, 
+                                                         class RAS_ICanvas* canvas,
+                                                         class KX_BlenderSceneConverter* sceneconverter,
                                                          bool alwaysUseExpandFraming,
                                                          bool libloading=false
                                                          );
index 3a4a27a6722c3dc570363ec88fc9abbe28e71305..bd29ac4d72e6e6503e62bff7c449c2fc7ea35e4c 100644 (file)
@@ -73,7 +73,7 @@ bool BL_DeformableGameObject::SetActiveAction(BL_ShapeActionActuator *act, short
                m_activeAct = act;
                m_activePriority = priority;
                m_lastframe = curtime;
-       
+
                return true;
        }
        else {
@@ -91,7 +91,7 @@ bool BL_DeformableGameObject::GetShape(vector<float> &shape)
                // this check is normally superfluous: a shape deformer can only be created if the mesh
                // has relative keys
                Key* key = shape_deformer->GetKey();
-               if (key && key->type==KEY_RELATIVE) 
+               if (key && key->type==KEY_RELATIVE)
                {
                        KeyBlock *kb;
                        for (kb = (KeyBlock *)key->block.first; kb; kb = (KeyBlock *)kb->next)
index 95e3b7c517d919b64615daa82d10c90205c72c2e..6a97e57e47798a74c75b935b0bf9981bb91bed9a 100644 (file)
@@ -45,7 +45,7 @@
 class BL_ShapeActionActuator;
 struct Key;
 
-class BL_DeformableGameObject : public KX_GameObject  
+class BL_DeformableGameObject : public KX_GameObject
 {
 public:
        CValue*         GetReplica();
@@ -80,7 +80,7 @@ public:
        bool SetActiveAction(class BL_ShapeActionActuator *act, short priority, double curtime);
 
        bool GetShape(vector<float> &shape);
-       
+
        virtual void    SetDeformer(class RAS_Deformer* deformer);
        virtual class RAS_Deformer* GetDeformer()
        {
@@ -88,9 +88,9 @@ public:
        }
 
 public:
-       
+
 protected:
-       
+
        RAS_Deformer            *m_pDeformer;
 
        class BL_ShapeActionActuator *m_activeAct;
index 911ff245ab4e329fc0bad00f08051ee4ce456914..3b5f12d7b2980e9feaff73bf0a28a365d52e10a5 100644 (file)
@@ -89,7 +89,7 @@ BL_MeshDeformer::~BL_MeshDeformer()
        if (m_transnors)
                delete [] m_transnors;
 }
+
 void BL_MeshDeformer::ProcessReplica()
 {
        m_transverts = NULL;
@@ -146,7 +146,7 @@ void BL_MeshDeformer::RecalcNormals()
                                const float *co2 = m_transverts[v2.getOrigIndex()];
                                const float *co3 = m_transverts[v3.getOrigIndex()];
                                const float *co4 = NULL;
-                               
+
                                /* compute face normal */
                                float fnor[3], n1[3], n2[3];
 
@@ -230,7 +230,7 @@ void BL_MeshDeformer::VerifyStorage()
                        delete [] m_transverts;
                if (m_transnors)
                        delete [] m_transnors;
-               
+
                m_transverts=new float[m_bmesh->totvert][3];
                m_transnors=new float[m_bmesh->totvert][3];
                m_tvtot = m_bmesh->totvert;
index 6e84cdf03f82b2438a791e97dcf9a00384f28dab..f2073994a4ac7aa116b2776b0d45b098da03db3d 100644 (file)
@@ -77,12 +77,12 @@ public:
 protected:
        class RAS_MeshObject*           m_pMeshObject;
        struct Mesh*                            m_bmesh;
-       
+
        // this is so m_transverts doesn't need to be converted
        // before deformation
        float                                           (*m_transverts)[3];
        float                                           (*m_transnors)[3];
-       struct Object*                          m_objMesh; 
+       struct Object*                          m_objMesh;
        // --
        int                                                     m_tvtot;
        BL_DeformableGameObject*        m_gameobj;
index b40fb7a9f47cacf57dcd1743ea603b1eabde3c23..44b24927843a23d27d43cf16fb8444e6211628f2 100644 (file)
@@ -136,7 +136,7 @@ struct DerivedMesh* BL_ModifierDeformer::GetPhysicsMesh()
        /* we need to compute the deformed mesh taking into account the current
         * shape and skin deformers, we cannot just call mesh_create_derived_physics()
         * because that would use the m_transvers already deformed previously by BL_ModifierDeformer::Update(),
-        * so restart from scratch by forcing a full update the shape/skin deformers 
+        * so restart from scratch by forcing a full update the shape/skin deformers
         * (will do nothing if there is no such deformer) */
        BL_ShapeDeformer::ForceUpdate();
        BL_ShapeDeformer::Update();
index 4efe4ca5bfcee7a6b0c186d7f2d2aa2bff40812a..7de64745534e57e92db92505835f3077e9a1ee39 100644 (file)
@@ -43,7 +43,7 @@
 struct DerivedMesh;
 struct Object;
 
-class BL_ModifierDeformer : public BL_ShapeDeformer  
+class BL_ModifierDeformer : public BL_ShapeDeformer
 {
 public:
        static bool HasCompatibleDeformer(Object *ob);
index f21db419ebc5208f9760544ac6f040389664058c..38eab7d5c308094ec510af42c5e78375671304c9 100644 (file)
@@ -66,9 +66,9 @@ BL_ShapeActionActuator::BL_ShapeActionActuator(SCA_IObject* gameobj,
                                        short   playtype,
                                        short   blendin,
                                        short   priority,
-                                       float   stride) 
+                                       float   stride)
        : SCA_IActuator(gameobj, KX_ACT_SHAPEACTION),
-               
+
        m_lastpos(0, 0, 0),
        m_blendframe(0),
        m_flag(0),
@@ -110,7 +110,7 @@ void BL_ShapeActionActuator::SetBlendTime(float newtime)
        m_blendframe = newtime;
 }
 
-CValue* BL_ShapeActionActuator::GetReplica() 
+CValue* BL_ShapeActionActuator::GetReplica()
 {
        BL_ShapeActionActuator* replica = new BL_ShapeActionActuator(*this);//m_float,GetName());
        replica->ProcessReplica();
@@ -124,7 +124,7 @@ bool BL_ShapeActionActuator::ClampLocalTime()
                {
                        m_localtime = m_startframe;
                        return true;
-               } 
+               }
                else if (m_localtime > m_endframe)
                {
                        m_localtime = m_endframe;
@@ -148,7 +148,7 @@ bool BL_ShapeActionActuator::ClampLocalTime()
 void BL_ShapeActionActuator::SetStartTime(float curtime)
 {
        float direction = m_startframe < m_endframe ? 1.0 : -1.0;
-       
+
        if (!(m_flag & ACT_FLAG_REVERSE))
                m_starttime = curtime - direction*(m_localtime - m_startframe)/KX_KetsjiEngine::GetAnimFrameRate();
        else
@@ -158,7 +158,7 @@ void BL_ShapeActionActuator::SetStartTime(float curtime)
 void BL_ShapeActionActuator::SetLocalTime(float curtime)
 {
        float delta_time = (curtime - m_starttime)*KX_KetsjiEngine::GetAnimFrameRate();
-       
+
        if (m_endframe < m_startframe)
                delta_time = -delta_time;
 
@@ -173,10 +173,10 @@ void BL_ShapeActionActuator::BlendShape(Key* key, float srcweight)
        vector<float>::const_iterator it;
        float dstweight;
        KeyBlock *kb;
-       
+
        dstweight = 1.0F - srcweight;
 
-       for (it=m_blendshape.begin(), kb = (KeyBlock *)key->block.first; 
+       for (it=m_blendshape.begin(), kb = (KeyBlock *)key->block.first;
             kb && it != m_blendshape.end();
             kb = (KeyBlock *)kb->next, it++)
        {
@@ -195,7 +195,7 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame)
        float newweight;
 
        curtime -= KX_KetsjiEngine::GetSuspendedDelta();
-       
+
        // result = true if animation has to be continued, false if animation stops
        // maybe there are events for us in the queue !
        if (frame)
@@ -203,10 +203,10 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame)
                bNegativeEvent = m_negevent;
                bPositiveEvent = m_posevent;
                RemoveAllEvents();
-               
+
                if (bPositiveEvent)
                        m_flag |= ACT_FLAG_ACTIVE;
-               
+
                if (bNegativeEvent)
                {
                        if (!(m_flag & ACT_FLAG_ACTIVE))
@@ -214,13 +214,13 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame)
                        m_flag &= ~ACT_FLAG_ACTIVE;
                }
        }
-       
+
        /*      This action can only be attached to a deform object */
        BL_DeformableGameObject *obj = (BL_DeformableGameObject*)GetParent();
        float length = m_endframe - m_startframe;
-       
+
        priority = m_priority;
-       
+
        /* Determine pre-incrementation behavior and set appropriate flags */
        switch (m_playtype) {
        case ACT_ACTION_MOTION:
@@ -302,15 +302,15 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame)
        default:
                break;
        }
-       
+
        /* Perform increment */
        if (keepgoing) {
                if (m_playtype == ACT_ACTION_MOTION) {
                        MT_Point3       newpos;
                        MT_Point3       deltapos;
-                       
+
                        newpos = obj->NodeGetWorldPosition();
-                       
+
                        /* Find displacement */
                        deltapos = newpos-m_lastpos;
                        m_localtime += (length/m_stridelength) * deltapos.length();
@@ -320,7 +320,7 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame)
                        SetLocalTime(curtime);
                }
        }
-       
+
        /* Check if a wrapping response is needed */
        if (length) {
                if (m_localtime < m_startframe || m_localtime > m_endframe)
@@ -331,7 +331,7 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame)
        }
        else
                m_localtime = m_startframe;
-       
+
        /* Perform post-increment tasks */
        switch (m_playtype) {
        case ACT_ACTION_FROM_PROP:
@@ -339,7 +339,7 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame)
                        CValue* propval = GetParent()->GetProperty(m_propname);
                        if (propval)
                                m_localtime = propval->GetNumber();
-                       
+
                        if (bNegativeEvent) {
                                keepgoing=false;
                        }
@@ -353,7 +353,7 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame)
                if (wrap) {
                        if (!(m_flag & ACT_FLAG_REVERSE))
                                m_localtime = m_endframe;
-                       else 
+                       else
                                m_localtime = m_startframe;
 
                        m_flag &= ~ACT_FLAG_LOCKINPUT;
@@ -394,7 +394,7 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame)
                keepgoing = false;
                break;
        }
-       
+
        /* Set the property if its defined */
        if (m_framepropname[0] != '\0') {
                CValue* propowner = GetParent();
@@ -407,10 +407,10 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame)
                }
                newval->Release();
        }
-       
+
        if (bNegativeEvent)
                m_blendframe=0.0f;
-       
+
        /* Apply the pose if necessary*/
        if (apply) {
 
@@ -429,7 +429,7 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame)
                        }
                        else {
                                ListBase tchanbase= {NULL, NULL};
-                       
+
                                if (m_blendin && m_blendframe==0.0f) {
                                        // this is the start of the blending, remember the startup shape
                                        obj->GetShape(m_blendshape);
@@ -448,7 +448,7 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame)
                                if (0) { // XXX !execute_ipochannels(&tchanbase)) {
                                        // no update, this is possible if action does not match the keys, stop the action
                                        keepgoing = false;
-                               } 
+                               }
                                else {
                                        // the key have changed, apply blending if needed
                                        if (m_blendin && (m_blendframe<m_blendin)) {
@@ -470,7 +470,7 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame)
                        m_blendframe = 0.0f;
                }
        }
-       
+
        if (!keepgoing) {
                m_blendframe = 0.0f;
        }
@@ -544,7 +544,7 @@ int BL_ShapeActionActuator::pyattr_set_action(void *self_v, const KX_PYATTRIBUTE
 
        bAction *action= NULL;
        STR_String val = _PyUnicode_AsString(value);
-       
+
        if (val != "")
        {
                action= (bAction*)self->GetLogicManager()->GetActionByName(val);
@@ -554,7 +554,7 @@ int BL_ShapeActionActuator::pyattr_set_action(void *self_v, const KX_PYATTRIBUTE
                        return PY_SET_ATTR_FAIL;
                }
        }
-       
+
        self->SetAction(action);
        return PY_SET_ATTR_SUCCESS;
 
index e96d0e0ebb4df7a43e37bbacd82b5eb8419c3a77..899bbbc616db36cfa5c31aef3b3217547bea2880 100644 (file)
@@ -39,7 +39,7 @@
 #include <vector>
 
 struct Key;
-class BL_ShapeActionActuator : public SCA_IActuator  
+class BL_ShapeActionActuator : public SCA_IActuator
 {
 public:
        Py_Header
@@ -57,10 +57,10 @@ public:
        virtual bool Update(double curtime, bool frame);
        virtual CValue* GetReplica();
        virtual void ProcessReplica();
-       
+
        void SetBlendTime (float newtime);
        void BlendShape(struct Key* key, float weight);
-       
+
        bAction*        GetAction() { return m_action; }
        void            SetAction(bAction* act) { m_action= act; }
 
@@ -127,7 +127,7 @@ protected:
        float   m_starttime;
        /** The current time of the action */
        float   m_localtime;
-       
+
        float   m_lastUpdate;
        float   m_blendin;
        float   m_blendstart;
index 94256a64d75ed6383a433da47c772b2709aad582..7653bb3f99b3d03a1cbbeeeb6e31914b6aaee315 100644 (file)
@@ -181,7 +181,7 @@ bool BL_ShapeDeformer::Update(void)
        if (m_lastShapeUpdate != m_gameobj->GetLastFrame()) {
                /* the key coefficient have been set already, we just need to blend the keys */
                Object* blendobj = m_gameobj->GetBlendObject();
-               
+
                /* we will blend the key directly in m_transverts array: it is used by armature as the start position */
                /* m_key can be NULL in case of Modifier deformer */
                if (m_key) {
@@ -199,9 +199,9 @@ bool BL_ShapeDeformer::Update(void)
                        m_bDynamic = true;
                }
 
-               // Don't release the weight array as in Blender, it will most likely be reusable on next frame 
+               // Don't release the weight array as in Blender, it will most likely be reusable on next frame
                // The weight array are ultimately deleted when the skin mesh is destroyed
-                  
+
                /* Update the current frame */
                m_lastShapeUpdate=m_gameobj->GetLastFrame();
 
@@ -215,7 +215,7 @@ bool BL_ShapeDeformer::Update(void)
 
        // non dynamic deformer = Modifer without armature and shape keys, no need to create storage
        if (!bSkinUpdate && bShapeUpdate && m_bDynamic) {
-               // this means that there is no armature, we still need to 
+               // this means that there is no armature, we still need to
                // update the normal (was not done after shape key calculation)
 
 #ifdef __NLA_DEFNORMALS
index f6746dd2302a9054225952829aedca4ed81f3fe9..80a6f908db5de9992d3c5b85287c7b6bf99a220b 100644 (file)
@@ -40,7 +40,7 @@
 #include "BL_DeformableGameObject.h"
 #include <vector>
 
-class BL_ShapeDeformer : public BL_SkinDeformer  
+class BL_ShapeDeformer : public BL_SkinDeformer
 {
 public:
        BL_ShapeDeformer(BL_DeformableGameObject *gameobj,
index 68da99f9fa560ab102f829623b1ee02a8d161678..16700859ebeb540c0b489dce8c08d16758ee17be 100644 (file)
@@ -58,7 +58,7 @@ extern "C"{
        #include "BKE_lattice.h"
        #include "BKE_deform.h"
 }
+
 
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
@@ -188,8 +188,8 @@ void BL_SkinDeformer::BlenderDeformVerts()
        copy_m4_m4(m_objMesh->obmat, m_obmat);
 
        armature_deform_verts( par_arma, m_objMesh, NULL, m_transverts, NULL, m_bmesh->totvert, m_deformflags, NULL, NULL );
-               
-       // restore matrix 
+
+       // restore matrix
        copy_m4_m4(m_objMesh->obmat, obmat);
 
 #ifdef __NLA_DEFNORMALS
@@ -276,7 +276,7 @@ void BL_SkinDeformer::BGEDeformVerts()
                                }
                        }
                }
-               
+
                // Update Vertex Normal
                norm = norm_chan_mat.topLeftCorner<3, 3>()*norm;
 
index 79043f60db811b874b85aaa0f33f626c49593e5b..1feed3c3d164fd5f9865ffccb95afbc977b699aa 100644 (file)
@@ -48,7 +48,7 @@
 #include "RAS_Deformer.h"
 
 
-class BL_SkinDeformer : public BL_MeshDeformer  
+class BL_SkinDeformer : public BL_MeshDeformer
 {
 public:
 //     void SetArmatureController (BL_ArmatureController *cont);
@@ -76,13 +76,13 @@ public:
        bool Update (void);
        bool UpdateInternal (bool shape_applied);
        bool Apply (class RAS_IPolyMaterial *polymat);
-       bool UpdateBuckets(void) 
+       bool UpdateBuckets(void)
        {
                // update the deformer and all the mesh slots; Apply() does it well, so just call it.
                return Apply(NULL);
        }
        bool PoseUpdated(void)
-               { 
+               {
                        if (m_armobj && m_lastArmaUpdate!=m_armobj->GetLastFrame()) {
                                return true;
                        }
index 4d344cdf16a48fddb1cefdb76482a6e14188ee75..434f5753396dd2a3ad9f79004b96dd1283c28fef 100644 (file)
@@ -50,10 +50,10 @@ BL_InterpolatorList::BL_InterpolatorList(bAction *action)
 {
        if (action==NULL)
                return;
-       
+
        for (FCurve *fcu = (FCurve *)action->curves.first; fcu; fcu = fcu->next) {
                if (fcu->rna_path) {
-                       BL_ScalarInterpolator *new_ipo = new BL_ScalarInterpolator(fcu); 
+                       BL_ScalarInterpolator *new_ipo = new BL_ScalarInterpolator(fcu);
                        //assert(new_ipo);
                        push_back(new_ipo);
                }
index d828910233ffad6888f515ab28825510bba5d31a..a82688cea20f9b33df263266390daa3e2b3a9d2f 100644 (file)
@@ -46,7 +46,7 @@ public:
                {}
 
        virtual ~BL_ScalarInterpolator() {}
-       
+
        virtual float GetValue(float currentTime) const;
        struct FCurve *GetFCurve() { return m_fcu; }
 
index 34e363b8fc292eba252f71cafd3633c8d0949db6..5d9f32a09694a44d474c7bbf2d6c482d6bbe943e 100644 (file)
@@ -307,7 +307,7 @@ void KX_BlenderSceneConverter::RemoveScene(KX_Scene *scene)
                        *worldit = m_worldinfos.back();
                        m_worldinfos.pop_back();
                        size--;
-               } 
+               }
                else {
                        i++;
                        worldit++;
@@ -323,7 +323,7 @@ void KX_BlenderSceneConverter::RemoveScene(KX_Scene *scene)
                        *polymit = m_polymaterials.back();
                        m_polymaterials.pop_back();
                        size--;
-               } 
+               }
                else {
                        i++;
                        polymit++;
@@ -341,7 +341,7 @@ void KX_BlenderSceneConverter::RemoveScene(KX_Scene *scene)
                        *matit = m_materials.back();
                        m_materials.pop_back();
                        size--;
-               } 
+               }
                else {
                        i++;
                        matit++;
@@ -358,7 +358,7 @@ void KX_BlenderSceneConverter::RemoveScene(KX_Scene *scene)
                        *meshit = m_meshobjects.back();
                        m_meshobjects.pop_back();
                        size--;
-               } 
+               }
                else {
                        i++;
                        meshit++;
@@ -415,7 +415,7 @@ void KX_BlenderSceneConverter::SetAlwaysUseExpandFraming(bool to_what)
        m_alwaysUseExpandFraming= to_what;
 }
 
-void KX_BlenderSceneConverter::RegisterGameObject(KX_GameObject *gameobject, Object *for_blenderobject) 
+void KX_BlenderSceneConverter::RegisterGameObject(KX_GameObject *gameobject, Object *for_blenderobject)
 {
        /* only maintained while converting, freed during game runtime */
        m_map_blender_to_gameobject.insert(CHashedPtr(for_blenderobject), gameobject);
@@ -423,7 +423,7 @@ void KX_BlenderSceneConverter::RegisterGameObject(KX_GameObject *gameobject, Obj
 
 /* only need to run this during conversion since
  * m_map_blender_to_gameobject is freed after conversion */
-void KX_BlenderSceneConverter::UnregisterGameObject(KX_GameObject *gameobject) 
+void KX_BlenderSceneConverter::UnregisterGameObject(KX_GameObject *gameobject)
 {
        Object *bobp = gameobject->GetBlenderObject();
        if (bobp) {
@@ -437,7 +437,7 @@ void KX_BlenderSceneConverter::UnregisterGameObject(KX_GameObject *gameobject)
        }
 }
 
-KX_GameObject *KX_BlenderSceneConverter::FindGameObject(Object *for_blenderobject) 
+KX_GameObject *KX_BlenderSceneConverter::FindGameObject(Object *for_blenderobject)
 {
        KX_GameObject **obp = m_map_blender_to_gameobject[CHashedPtr(for_blenderobject)];
 
@@ -458,7 +458,7 @@ RAS_MeshObject *KX_BlenderSceneConverter::FindGameMesh(Mesh *for_blendermesh)
 
        if (meshp) {
                return *meshp;
-       } 
+       }
        else {
                return NULL;
        }
@@ -580,7 +580,7 @@ void KX_BlenderSceneConverter::ResetPhysicsObjectsAnimationIpo(bool clearIpo)
                                                                localDel_ipoCurve( tmpicu );
                                                        }
                                                }
-                                       } 
+                                       }
                                        else {
                                                ipo = NULL; // XXX add_ipo(blenderObject->id.name+2, ID_OB);
                                                blenderObject->ipo = ipo;
@@ -637,11 +637,11 @@ void KX_BlenderSceneConverter::WritePhysicsObjectToAnimationIpo(int frameNumber)
                                        const MT_Point3& position = gameObj->NodeGetWorldPosition();
                                        //const MT_Vector3& scale = gameObj->NodeGetWorldScaling();
                                        const MT_Matrix3x3& orn = gameObj->NodeGetWorldOrientation();
-                                       
+
                                        float eulerAngles[3];
                                        float eulerAnglesOld[3] = {0.0f, 0.0f, 0.0f};
                                        float tmat[3][3];
-                                       
+
                                        // XXX animato
                                        Ipo* ipo = blenderObject->ipo;
 
@@ -677,23 +677,23 @@ void KX_BlenderSceneConverter::WritePhysicsObjectToAnimationIpo(int frameNumber)
                                                icu_rz = verify_ipocurve(&blenderObject->id, ipo->blocktype, NULL, NULL, NULL, OB_ROT_Z, 1);
                                                if (icu_rz) icu_rz->ipo = IPO_LIN;
                                        }
-                                       
+
                                        if (icu_rx) eulerAnglesOld[0] = eval_icu( icu_rx, frameNumber - 1 ) / ((180 / 3.14159265f) / 10);
                                        if (icu_ry) eulerAnglesOld[1] = eval_icu( icu_ry, frameNumber - 1 ) / ((180 / 3.14159265f) / 10);
                                        if (icu_rz) eulerAnglesOld[2] = eval_icu( icu_rz, frameNumber - 1 ) / ((180 / 3.14159265f) / 10);
-                                       
+
                                        // orn.getValue((float *)tmat); // uses the wrong ordering, cant use this
                                        for (int r = 0; r < 3; r++)
                                                for (int c = 0; c < 3; c++)
                                                        tmat[r][c] = orn[c][r];
-                                       
+
                                        // mat3_to_eul( eulerAngles,tmat); // better to use Mat3ToCompatibleEul
                                        mat3_to_compatible_eul( eulerAngles, eulerAnglesOld,tmat);
-                                       
+
                                        //eval_icu
                                        for (int x = 0; x < 3; x++)
                                                eulerAngles[x] *= (float) ((180 / 3.14159265f) / 10.0);
-                                       
+
                                        //fill the curves with data
                                        if (icu_lx) insert_vert_icu(icu_lx, frameNumber, position.x(), 1);
                                        if (icu_ly) insert_vert_icu(icu_ly, frameNumber, position.y(), 1);
@@ -701,7 +701,7 @@ void KX_BlenderSceneConverter::WritePhysicsObjectToAnimationIpo(int frameNumber)
                                        if (icu_rx) insert_vert_icu(icu_rx, frameNumber, eulerAngles[0], 1);
                                        if (icu_ry) insert_vert_icu(icu_ry, frameNumber, eulerAngles[1], 1);
                                        if (icu_rz) insert_vert_icu(icu_rz, frameNumber, eulerAngles[2], 1);
-                                       
+
                                        // Handles are corrected at the end, testhandles_ipocurve isn't needed yet
 #endif
                                }
@@ -775,7 +775,7 @@ Main *KX_BlenderSceneConverter::GetMainDynamicPath(const char *path)
        for (vector<Main *>::iterator it = m_DynamicMaggie.begin(); !(it == m_DynamicMaggie.end()); it++)
                if (BLI_path_cmp((*it)->name, path) == 0)
                        return *it;
-       
+
        return NULL;
 }
 
@@ -868,7 +868,7 @@ static void load_datablocks(Main *main_tmp, BlendHandle *bpy_openlib, const char
 
        int totnames_dummy;
        names = BLO_blendhandle_get_datablock_names(bpy_openlib, idcode, &totnames_dummy);
-       
+
        int i = 0;
        LinkNode *n = names;
        while (n) {
@@ -897,7 +897,7 @@ KX_LibLoadStatus *KX_BlenderSceneConverter::LinkBlendFile(BlendHandle *bpy_openl
                BLO_blendhandle_close(bpy_openlib);
                return NULL;
        }
-       
+
        if (GetMainDynamicPath(path)) {
                snprintf(err_local, sizeof(err_local), "blend file already open \"%s\"\n", path);
                *err_str = err_local;
@@ -935,18 +935,18 @@ KX_LibLoadStatus *KX_BlenderSceneConverter::LinkBlendFile(BlendHandle *bpy_openl
 
        BKE_reports_clear(&reports);
        /* done linking */
-       
+
        /* needed for lookups*/
        GetMainDynamic().push_back(main_newlib);
        BLI_strncpy(main_newlib->name, path, sizeof(main_newlib->name));
-       
-       
+
+
        status = new KX_LibLoadStatus(this, m_ketsjiEngine, scene_merge, path);
 
        if (idcode == ID_ME) {
                /* Convert all new meshes into BGE meshes */
                ID *mesh;
-       
+
                for (mesh = (ID *)main_newlib->mesh.first; mesh; mesh = (ID *)mesh->next ) {
                        if (options & LIB_LOAD_VERBOSE)
                                printf("MeshName: %s\n", mesh->name + 2);
@@ -973,15 +973,15 @@ KX_LibLoadStatus *KX_BlenderSceneConverter::LinkBlendFile(BlendHandle *bpy_openl
                for (scene = (ID *)main_newlib->scene.first; scene; scene = (ID *)scene->next ) {
                        if (options & LIB_LOAD_VERBOSE)
                                printf("SceneName: %s\n", scene->name + 2);
-                       
+
                        if (options & LIB_LOAD_ASYNC) {
                                scenes->push_back((Scene *)scene);
-                       } 
+                       }
                        else {
                                /* merge into the base  scene */
                                KX_Scene* other = m_ketsjiEngine->CreateScene((Scene *)scene, true);
                                scene_merge->MergeScene(other);
-                       
+
                                // RemoveScene(other); // Don't run this, it frees the entire scene converter data, just delete the scene
                                delete other;
                        }
@@ -1077,7 +1077,7 @@ bool KX_BlenderSceneConverter::FreeBlendFile(Main *maggie)
                        /* in case the mesh might be refered to later */
                        {
                                CTR_Map<STR_HashedString, void *> &mapStringToMeshes = scene->GetLogicManager()->GetMeshMap();
-                               
+
                                for (int i = 0; i < mapStringToMeshes.size(); i++) {
                                        RAS_MeshObject *meshobj = (RAS_MeshObject *) *mapStringToMeshes.at(i);
                                        if (meshobj && IS_TAGGED(meshobj->GetMesh())) {
@@ -1104,7 +1104,7 @@ bool KX_BlenderSceneConverter::FreeBlendFile(Main *maggie)
                                        }
                                }
                        }
-                       
+
                        //scene->FreeTagged(); /* removed tagged objects and meshes*/
                        CListValue *obj_lists[] = {scene->GetObjectList(), scene->GetInactiveList(), NULL};
 
@@ -1201,7 +1201,7 @@ bool KX_BlenderSceneConverter::FreeBlendFile(Main *maggie)
                        *worldit = m_worldinfos.back();
                        m_worldinfos.pop_back();
                        size--;
-               } 
+               }
                else {
                        i++;
                        worldit++;
@@ -1260,7 +1260,7 @@ bool KX_BlenderSceneConverter::FreeBlendFile(Main *maggie)
                        *matit = m_materials.back();
                        m_materials.pop_back();
                        size--;
-               } 
+               }
                else {
                        i++;
                        matit++;
@@ -1308,7 +1308,7 @@ bool KX_BlenderSceneConverter::FreeBlendFile(Main *maggie)
                        *meshit = m_meshobjects.back();
                        m_meshobjects.pop_back();
                        size--;
-               } 
+               }
                else {
                        i++;
                        meshit++;
index 40c71a4d74bbfb56a2463c6b7626e747d1b8f4be..3379f00c38a716fdd16b6921aa64e824b143b3f9 100644 (file)
@@ -76,16 +76,16 @@ class KX_BlenderSceneConverter : public KX_ISceneConverter
        // Saved KX_LibLoadStatus objects
        map<char *, class KX_LibLoadStatus*> m_status_map;
 
-       // Should also have a list of collision shapes. 
+       // Should also have a list of collision shapes.
        // For the time being this is held in KX_Scene::m_shapes
 
        CTR_Map<CHashedPtr,KX_GameObject*>      m_map_blender_to_gameobject;            /* cleared after conversion */
        CTR_Map<CHashedPtr,RAS_MeshObject*>     m_map_mesh_to_gamemesh;                         /* cleared after conversion */
        CTR_Map<CHashedPtr,SCA_IActuator*>      m_map_blender_to_gameactuator;          /* cleared after conversion */
        CTR_Map<CHashedPtr,SCA_IController*>m_map_blender_to_gamecontroller;    /* cleared after conversion */
-       
+
        CTR_Map<CHashedPtr,BL_InterpolatorList*> m_map_blender_to_gameAdtList;
-       
+
        Main*                                   m_maggie;
        vector<struct Main*>    m_DynamicMaggie;
 
@@ -121,7 +121,7 @@ public:
        bool TryAndLoadNewFile();
 
        void SetAlwaysUseExpandFraming(bool to_what);
-       
+
        void RegisterGameObject(KX_GameObject *gameobject, struct Object *for_blenderobject);
        void UnregisterGameObject(KX_GameObject *gameobject);
        KX_GameObject *FindGameObject(struct Object *for_blenderobject);
@@ -136,7 +136,7 @@ public:
        void RegisterBlenderMaterial(BL_Material *mat);
        void CacheBlenderMaterial(KX_Scene *scene, Material *mat, BL_Material *blmat);
        BL_Material *FindCachedBlenderMaterial(KX_Scene *scene, Material *mat);
-       
+
        void RegisterInterpolatorList(BL_InterpolatorList *actList, struct bAction *for_act);
        BL_InterpolatorList *FindInterpolatorList(struct bAction *for_act);
 
@@ -152,7 +152,7 @@ public:
 
        ///this is for reseting the position,rotation and scale of the gameobjet that is not dynamic
        virtual void    resetNoneDynamicObjectToIpo();
-       
+
        ///this generates ipo curves for position, rotation, allowing to use game physics in animation
        virtual void    WritePhysicsObjectToAnimationIpo(int frameNumber);
        virtual void    TestHandlesPhysicsObjectToAnimationIpo();
@@ -174,7 +174,7 @@ public:
 //     struct Main* GetMain() { return m_maggie; }
        struct Main*              GetMainDynamicPath(const char *path);
        vector<struct Main*> &GetMainDynamic();
-       
+
        class KX_LibLoadStatus *LinkBlendFileMemory(void *data, int length, const char *path, char *group, KX_Scene *scene_merge, char **err_str, short options);
        class KX_LibLoadStatus *LinkBlendFilePath(const char *path, char *group, KX_Scene *scene_merge, char **err_str, short options);
        class KX_LibLoadStatus *LinkBlendFile(struct BlendHandle *bpy_openlib, const char *path, char *group, KX_Scene *scene_merge, char **err_str, short options);
@@ -186,7 +186,7 @@ public:
        virtual void MergeAsyncLoads();
        virtual void FinalizeAsyncLoads();
        void AddScenesToMergeQueue(class KX_LibLoadStatus *status);
+
        void PrintStats() {
                printf("BGE STATS!\n");
 
@@ -208,9 +208,9 @@ public:
 #endif
 //             /printf("\t m_ketsjiEngine->m_scenes: %d\n", m_ketsjiEngine->CurrentScenes()->size());
        }
-       
+
        /* LibLoad Options */
-       enum 
+       enum
        {
                LIB_LOAD_LOAD_ACTIONS = 1,
                LIB_LOAD_VERBOSE = 2,
@@ -223,7 +223,7 @@ public:
 #ifdef WITH_PYTHON
        PyObject *GetPyNamespace();
 #endif
-       
+
 #ifdef WITH_CXX_GUARDEDALLOC
        MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_BlenderSceneConverter")
 #endif
index 974dcbca95bba2f83e669c57576fe21de422061c..d4582425b36db0fbfc122d42202217500a148590 100644 (file)
 
 #include "BL_BlenderDataConversion.h"
 
-/** 
+/**
  * KX_flt_trunc needed to round 'almost' zero values to zero, else velocities etc. are incorrectly set
  */
 
@@ -122,7 +122,7 @@ void BL_ConvertActuators(const char* maggiename,
                          KX_BlenderSceneConverter* converter
                          )
 {
-       
+
        int uniqueint = 0;
        int actcount = 0;
        int executePriority = 0;
@@ -138,7 +138,7 @@ void BL_ConvertActuators(const char* maggiename,
        {
                STR_String uniquename = bact->name;
                STR_String& objectname = gameobj->GetName();
-               
+
                SCA_IActuator* baseact = NULL;
                switch (bact->type)
                {
@@ -168,9 +168,9 @@ void BL_ConvertActuators(const char* maggiename,
                                /* Blender uses a bit vector internally for the local-flags. In */
                                /* KX, we have four bools. The compiler should be smart enough  */
                                /* to do the right thing. We need to explicitly convert here!   */
-                               
+
                                KX_LocalFlags bitLocalFlag;
-                               
+
                                bitLocalFlag.Force = bool((obact->flag & ACT_FORCE_LOCAL)!=0);
                                bitLocalFlag.Torque = bool((obact->flag & ACT_TORQUE_LOCAL) !=0);//rlocal;
                                bitLocalFlag.DLoc = bool((obact->flag & ACT_DLOC_LOCAL)!=0);
@@ -186,7 +186,7 @@ void BL_ConvertActuators(const char* maggiename,
                                {
                                        obref = converter->FindGameObject(obact->reference);
                                }
-                               
+
                                KX_ObjectActuator* tmpbaseact = new KX_ObjectActuator(
                                            gameobj,
                                            obref,
@@ -214,7 +214,7 @@ void BL_ConvertActuators(const char* maggiename,
                                if (actact->flag & ACT_IPOLOCAL) ipo_flags |= BL_Action::ACT_IPOFLAG_LOCAL;
                                if (actact->flag & ACT_IPOADD) ipo_flags |= BL_Action::ACT_IPOFLAG_ADD;
                                if (actact->flag & ACT_IPOCHILD) ipo_flags |= BL_Action::ACT_IPOFLAG_CHILD;
-                                       
+
                                BL_ActionActuator* tmpbaseact = new BL_ActionActuator(
                                            gameobj,
                                            propname,
@@ -242,7 +242,7 @@ void BL_ConvertActuators(const char* maggiename,
                                        bActionActuator* actact = (bActionActuator*) bact->data;
                                        STR_String propname = actact->name;
                                        STR_String propframe = actact->frameProp;
-                                       
+
                                        BL_ShapeActionActuator* tmpbaseact = new BL_ShapeActionActuator(
                                                    gameobj,
                                                    propname,
@@ -270,8 +270,8 @@ void BL_ConvertActuators(const char* maggiename,
                                bCameraActuator *camact = (bCameraActuator *) bact->data;
                                if (camact->ob) {
                                        KX_GameObject *tmpgob = converter->FindGameObject(camact->ob);
-                                       
-                                       /* visifac, fac and axis are not copied from the struct...   */ 
+
+                                       /* visifac, fac and axis are not copied from the struct...   */
                                        /* that's some internal state...                             */
                                        KX_CameraActuator *tmpcamact = new KX_CameraActuator(
                                                    gameobj,
@@ -288,16 +288,16 @@ void BL_ConvertActuators(const char* maggiename,
                case ACT_MESSAGE:
                        {
                                bMessageActuator *msgAct = (bMessageActuator *) bact->data;
-                               
+
                                /* Get the name of the properties that objects must own that
                                 * we're sending to, if present
                                 */
                                STR_String toPropName = msgAct->toPropName;
-                               
+
                                /* Get the Message Subject to send.
                                 */
                                STR_String subject = msgAct->subject;
-                               
+
                                /* Get the bodyType
                                 */
                                int bodyType = msgAct->bodyType;
@@ -306,7 +306,7 @@ void BL_ConvertActuators(const char* maggiename,
                                 * we'll be sending, might be empty
                                 */
                                const STR_String body = msgAct->body;
-                               
+
                                KX_NetworkMessageActuator *tmpmsgact = new KX_NetworkMessageActuator(
                                            gameobj,                                    // actuator controlling object
                                            scene->GetNetworkScene(),   // needed for replication
@@ -327,7 +327,7 @@ void BL_ConvertActuators(const char* maggiename,
                                /* get type, and possibly a start and end frame */
                                KX_SoundActuator::KX_SOUNDACT_TYPE
                                        soundActuatorType = KX_SoundActuator::KX_SOUNDACT_NODEF;
-                               
+
                                switch (soundact->type) {
                                case ACT_SND_PLAY_STOP_SOUND:
                                        soundActuatorType = KX_SoundActuator::KX_SOUNDACT_PLAYSTOP;
@@ -347,13 +347,13 @@ void BL_ConvertActuators(const char* maggiename,
                                case ACT_SND_LOOP_BIDIRECTIONAL_STOP_SOUND:
                                        soundActuatorType = KX_SoundActuator::KX_SOUNDACT_LOOPBIDIRECTIONAL_STOP;
                                        break;
-                                       
+
                                default:
                                        /* This is an error!!! */
                                        soundActuatorType = KX_SoundActuator::KX_SOUNDACT_NODEF;
                                }
-                               
-                               if (soundActuatorType != KX_SoundActuator::KX_SOUNDACT_NODEF) 
+
+                               if (soundActuatorType != KX_SoundActuator::KX_SOUNDACT_NODEF)
                                {
                                        bSound* sound = soundact->sound;
                                        bool is3d = soundact->flag & ACT_SND_3D_SOUND ? true : false;
@@ -407,7 +407,7 @@ void BL_ConvertActuators(const char* maggiename,
                        {
                                bPropertyActuator* propact = (bPropertyActuator*) bact->data;
                                SCA_IObject* destinationObj = NULL;
-                               
+
                                /*
                                 * here the destinationobject is searched. problem with multiple scenes: other scenes
                                 * have not been converted yet, so the destobj will not be found, so the prop will
@@ -418,7 +418,7 @@ void BL_ConvertActuators(const char* maggiename,
                                 */
                                if (propact->ob)
                                        destinationObj = converter->FindGameObject(propact->ob);
-                               
+
                                SCA_PropertyActuator* tmppropact = new SCA_PropertyActuator(
                                            gameobj,
                                            destinationObj,
@@ -431,16 +431,16 @@ void BL_ConvertActuators(const char* maggiename,
                        }
                case ACT_EDIT_OBJECT:
                        {
-                               bEditObjectActuator *editobact 
+                               bEditObjectActuator *editobact
                                        = (bEditObjectActuator *) bact->data;
                                /* There are four different kinds of 'edit object' thingies  */
                                /* The alternative to this lengthy conversion is packing     */
                                /* several actuators in one, which is not very nice design.. */
                                switch (editobact->type) {
-                               case ACT_EDOB_ADD_OBJECT: 
+                               case ACT_EDOB_ADD_OBJECT:
                                        {
-                                               
-                                               // does the 'original' for replication exists, and 
+
+                                               // does the 'original' for replication exists, and
                                                // is it in a non-active layer ?
                                                SCA_IObject* originalval = NULL;
                                                if (editobact->ob)
@@ -453,7 +453,7 @@ void BL_ConvertActuators(const char* maggiename,
                                                                originalval = converter->FindGameObject(editobact->ob);
                                                        }
                                                }
-                                               
+
                                                KX_SCA_AddObjectActuator* tmpaddact = new KX_SCA_AddObjectActuator(
                                                            gameobj,
                                                            originalval,
@@ -470,7 +470,7 @@ void BL_ConvertActuators(const char* maggiename,
                                        break;
                                case ACT_EDOB_END_OBJECT:
                                        {
-                                               KX_SCA_EndObjectActuator* tmpendact 
+                                               KX_SCA_EndObjectActuator* tmpendact
                                                        = new KX_SCA_EndObjectActuator(gameobj,scene);
                                                baseact = tmpendact;
                                        }
@@ -501,7 +501,7 @@ void BL_ConvertActuators(const char* maggiename,
                                                SCA_IObject* originalval = NULL;
                                                if (editobact->ob)
                                                        originalval = converter->FindGameObject(editobact->ob);
-                                                       
+
                                                KX_TrackToActuator* tmptrackact = new KX_TrackToActuator(
                                                            gameobj,
                                                            originalval,
@@ -528,10 +528,10 @@ void BL_ConvertActuators(const char* maggiename,
                                float min = 0.0, max = 0.0;
                                char *prop = NULL;
                                KX_ConstraintActuator::KX_CONSTRAINTTYPE locrot = KX_ConstraintActuator::KX_ACT_CONSTRAINT_NODEF;
-                               bConstraintActuator *conact 
+                               bConstraintActuator *conact
                                        = (bConstraintActuator*) bact->data;
-                               /* convert settings... degrees in the ui become radians  */ 
-                               /* internally                                            */ 
+                               /* convert settings... degrees in the ui become radians  */
+                               /* internally                                            */
                                if (conact->type == ACT_CONST_TYPE_ORI) {
                                        min = conact->minloc[0];
                                        max = conact->maxloc[0];
@@ -617,12 +617,12 @@ void BL_ConvertActuators(const char* maggiename,
                                } else {
                                        switch (conact->flag) {
                                        case ACT_CONST_LOCX:
-                                               locrot = KX_ConstraintActuator::KX_ACT_CONSTRAINT_LOCX; 
+                                               locrot = KX_ConstraintActuator::KX_ACT_CONSTRAINT_LOCX;
                                                min = conact->minloc[0];
                                                max = conact->maxloc[0];
                                                break;
                                        case ACT_CONST_LOCY:
-                                               locrot = KX_ConstraintActuator::KX_ACT_CONSTRAINT_LOCY; 
+                                               locrot = KX_ConstraintActuator::KX_ACT_CONSTRAINT_LOCY;
                                                min = conact->minloc[1];
                                                max = conact->maxloc[1];
                                                break;
@@ -647,7 +647,7 @@ void BL_ConvertActuators(const char* maggiename,
                                                max = conact->maxrot[2] * (float)MT_RADS_PER_DEG;
                                                break;
                                        default:
-                                               ; /* error */ 
+                                               ; /* error */
                                        }
                                }
                                KX_ConstraintActuator *tmpconact = new KX_ConstraintActuator(
@@ -673,7 +673,7 @@ void BL_ConvertActuators(const char* maggiename,
                        {
                                bSceneActuator *sceneact = (bSceneActuator *) bact->data;
                                STR_String nextSceneName("");
-                               
+
                                KX_SceneActuator* tmpsceneact;
                                int mode = KX_SceneActuator::KX_SCENE_NODEF;
                                KX_Camera *cam = NULL;
@@ -709,11 +709,11 @@ void BL_ConvertActuators(const char* maggiename,
                                                        mode = KX_SceneActuator::KX_SCENE_SET_SCENE;
                                                        break;
                                                };
-                                               
+
                                                if (sceneact->scene) {
                                                        nextSceneName = sceneact->scene->id.name + 2;
                                                }
-                                               
+
                                                break;
                                        }
                                case ACT_SCENE_CAMERA:
@@ -727,7 +727,7 @@ void BL_ConvertActuators(const char* maggiename,
                                        break;
                                case ACT_SCENE_RESTART:
                                        {
-                                               
+
                                                mode =  KX_SceneActuator::KX_SCENE_RESTART;
                                                break;
                                        }
@@ -809,21 +809,21 @@ void BL_ConvertActuators(const char* maggiename,
                        }
                case ACT_RANDOM:
                        {
-                               bRandomActuator *randAct 
+                               bRandomActuator *randAct
                                        = (bRandomActuator *) bact->data;
-                               
+
                                unsigned long seedArg = randAct->seed;
                                if (seedArg == 0)
                                {
                                        seedArg = (int)(ketsjiEngine->GetRealTime()*100000.0);
                                        seedArg ^= (intptr_t)randAct;
                                }
-                               SCA_RandomActuator::KX_RANDOMACT_MODE modeArg 
+                               SCA_RandomActuator::KX_RANDOMACT_MODE modeArg
                                        = SCA_RandomActuator::KX_RANDOMACT_NODEF;
                                SCA_RandomActuator *tmprandomact;
                                float paraArg1 = 0.0;
                                float paraArg2 = 0.0;
-                               
+
                                switch (randAct->distribution) {
                                case ACT_RANDOM_BOOL_CONST:
                                        modeArg = SCA_RandomActuator::KX_RANDOMACT_BOOL_CONST;
@@ -890,7 +890,7 @@ void BL_ConvertActuators(const char* maggiename,
                        bool recursive = ((vis_act->flag & ACT_VISIBILITY_RECURSIVE) != 0);
 
                        tmp_vis_act = new KX_VisibilityActuator(gameobj, !v, o, recursive);
-                       
+
                        baseact = tmp_vis_act;
                }
                break;
@@ -900,9 +900,9 @@ void BL_ConvertActuators(const char* maggiename,
                        bStateActuator *sta_act = (bStateActuator *) bact->data;
                        KX_StateActuator * tmp_sta_act = NULL;
 
-                       tmp_sta_act = 
+                       tmp_sta_act =
                                new KX_StateActuator(gameobj, sta_act->type, sta_act->mask);
-                       
+
                        baseact = tmp_sta_act;
                }
                break;
@@ -1004,7 +1004,7 @@ void BL_ConvertActuators(const char* maggiename,
                                                tmpgob = NULL;
                                                break;
                                }
-       
+
                                KX_ParentActuator *tmpparact
                                        = new KX_ParentActuator(gameobj,
                                        mode,
@@ -1014,7 +1014,7 @@ void BL_ConvertActuators(const char* maggiename,
                                baseact = tmpparact;
                                break;
                        }
-               
+
                case ACT_ARMATURE:
                        {
                                bArmatureActuator* armAct = (bArmatureActuator*) bact->data;
@@ -1064,8 +1064,8 @@ void BL_ConvertActuators(const char* maggiename,
                                bool normalup = (stAct->flag & ACT_STEERING_NORMALUP) !=0;
                                bool lockzvel = (stAct->flag & ACT_STEERING_LOCKZVEL) !=0;
                                KX_SteeringActuator *tmpstact
-                                       = new KX_SteeringActuator(gameobj, mode, targetob, navmeshob,stAct->dist, 
-                                       stAct->velocity, stAct->acceleration, stAct->turnspeed, 
+                                       = new KX_SteeringActuator(gameobj, mode, targetob, navmeshob,stAct->dist,
+                                       stAct->velocity, stAct->acceleration, stAct->turnspeed,
                                        selfTerminated, stAct->updateTime,
                                        scene->GetObstacleSimulation(), facingMode, normalup, enableVisualization, lockzvel);
                                baseact = tmpstact;
@@ -1118,7 +1118,7 @@ void BL_ConvertActuators(const char* maggiename,
                default:
                        ; /* generate some error */
                }
-               
+
                if (baseact && !(bact->flag & ACT_DEACTIVATE))
                {
                        baseact->SetExecutePriority(executePriority++);
@@ -1131,14 +1131,14 @@ void BL_ConvertActuators(const char* maggiename,
                        baseact->SetLogicManager(logicmgr);
                        //gameobj->SetProperty(uniquename,baseact);
                        gameobj->AddActuator(baseact);
-                       
+
                        converter->RegisterGameActuator(baseact, bact);
                        // done with baseact, release it
                        baseact->Release();
                }
                else if (baseact)
                        baseact->Release();
-               
+
                bact = bact->next;
        }
 }
index f55d81adb802dbf64d2f8ecc204eb8b68cd6da97..a00a90428da597ad289c40463094def0877bfaaf 100644 (file)
@@ -161,7 +161,7 @@ void BL_ConvertControllers(
                                // When libloading, this is delayed to KX_Scene::MergeScene_LogicBrick to avoid GIL issues
                                if (!libloading)
                                        pyctrl->SetNamespace(converter->GetPyNamespace());
-                               
+
                                if (pycont->mode==SCA_PythonController::SCA_PYEXEC_SCRIPT) {
                                        if (pycont->text)
                                        {
@@ -174,12 +174,12 @@ void BL_ConvertControllers(
                                                        pyctrl->SetScriptName(pycont->text->id.name+2);
                                                        MEM_freeN(buf);
                                                }
-                                               
+
                                        }
                                }
                                else {
                                        /* let the controller print any warnings here when importing */
-                                       pyctrl->SetScriptText(STR_String(pycont->module)); 
+                                       pyctrl->SetScriptText(STR_String(pycont->module));
                                        pyctrl->SetScriptName(pycont->module); /* will be something like module.func so using it as the name is OK */
 
                                        if (pycont->flag & CONT_PY_DEBUG) {
@@ -193,7 +193,7 @@ void BL_ConvertControllers(
                        }
                        default:
                        {
-                               
+
                        }
                }
 
@@ -216,7 +216,7 @@ void BL_ConvertControllers(
                        gamecontroller->SetName(bcontr->name);
                        gamecontroller->SetLogicManager(logicmgr);
                        gameobj->AddController(gamecontroller);
-                       
+
                        converter->RegisterGameController(gamecontroller, bcontr);
 
 #ifdef WITH_PYTHON
@@ -231,7 +231,7 @@ void BL_ConvertControllers(
                                        /* We cant do this because importing runs the script which could end up accessing
                                         * internal BGE functions, this is unstable while we're converting the scene.
                                         * This is a pity because its useful to see errors at startup but cant help it */
-                                       
+
                                        // pyctrl->Import();
                                }
                        }
@@ -243,7 +243,7 @@ void BL_ConvertControllers(
                }
                else if (gamecontroller)
                        gamecontroller->Release();
-               
+
                bcontr = bcontr->next;
        }
 
index 2f93d70a6f92a94c679b0c04a55a4b4bdd126946..b5bc4148e1a631c670aba5f6d8cf41a9a93668ee 100644 (file)
@@ -39,7 +39,7 @@ void BL_ConvertControllers(
        class KX_GameObject* gameobj,
        class SCA_LogicManager* logicmgr,
        int activeLayerBitInfo,
-       bool isInActiveLayer, 
+       bool isInActiveLayer,
        class KX_BlenderSceneConverter* converter,
        bool libloading
 );
index 2cb61207fb5eef863a5a3f749d47721dd86110e7..5dd7d0e4066be9253b4e17e3ce82a82c3a1366bd 100644 (file)
@@ -65,7 +65,7 @@ void BL_ConvertTextProperty(Object* object, KX_FontObject* fontobj,SCA_TimeEvent
 
 void BL_ConvertProperties(Object* object,KX_GameObject* gameobj,SCA_TimeEventManager* timemgr,SCA_IScene* scene, bool isInActiveLayer)
 {
-       
+
        bProperty* prop = (bProperty*)object->prop.first;
        CValue* propval;
        bool show_debug_info;
@@ -108,8 +108,8 @@ void BL_ConvertProperties(Object* object,KX_GameObject* gameobj,SCA_TimeEventMan
                                float floatprop = *((float*)&prop->data);
 
                                CValue* timeval = new CFloatValue(floatprop);
-                               // set a subproperty called 'timer' so that 
-                               // we can register the replica of this property 
+                               // set a subproperty called 'timer' so that
+                               // we can register the replica of this property
                                // at the time a game object is replicated (AddObjectActuator triggers this)
                                CValue *bval = new CBoolValue(true);
                                timeval->SetProperty("timer",bval);
@@ -118,7 +118,7 @@ void BL_ConvertProperties(Object* object,KX_GameObject* gameobj,SCA_TimeEventMan
                                {
                                        timemgr->AddTimeProperty(timeval);
                                }
-                               
+
                                propval = timeval;
                                gameobj->SetProperty(prop->name,timeval);
 
@@ -128,7 +128,7 @@ void BL_ConvertProperties(Object* object,KX_GameObject* gameobj,SCA_TimeEventMan
                                // todo make an assert etc.
                        }
                }
-               
+
                if (propval)
                {
                        if (show_debug_info && isInActiveLayer)
@@ -138,7 +138,7 @@ void BL_ConvertProperties(Object* object,KX_GameObject* gameobj,SCA_TimeEventMan
                        // done with propval, release it
                        propval->Release();
                }
-               
+
 #ifdef WITH_PYTHON
                /* Warn if we double up on attributes, this isn't quite right since it wont find inherited attributes however there arnt many */
                for (PyAttributeDef *attrdef = KX_GameObject::Attributes; attrdef->m_name; attrdef++) {
index 5e897bb4a623383c4313fa4242b27243fb37539d..618be1e1c9b91c3a3e1c7beeac1dfe1414fce34a 100644 (file)
@@ -109,7 +109,7 @@ void BL_ConvertSensors(struct Object* blenderobject,
        bool invert = false;
        bool level = false;
        bool tap = false;
-       
+
        while (sens)
        {
                sens = sens->next;
index 56248721a37a439bb8e14ef4f1c8e7a579e9e00f..2ed2c9b32269f07687b98bb43a471ec2b27e476b 100644 (file)
@@ -39,7 +39,7 @@ void BL_ConvertSensors(struct Object* blenderobject,
           class KX_KetsjiEngine* kxengine,
           int activeLayerBitInfo,
           bool isInActiveLayer,
-          class RAS_ICanvas* canvas, 
+          class RAS_ICanvas* canvas,
           class KX_BlenderSceneConverter* converter);
 
 #endif  /* __KX_CONVERTSENSORS_H__ */
index 66fcd998269952c0bca90bbe064654187f3dc97f..c43958ebc85ef7ce5e5b77c9a6f60c349b0e82e1 100644 (file)
@@ -148,7 +148,7 @@ void KX_LibLoadStatus::AddProgress(float progress)
 
 #ifdef WITH_PYTHON
 
-PyMethodDef KX_LibLoadStatus::Methods[] = 
+PyMethodDef KX_LibLoadStatus::Methods[] =
 {
        {NULL} //Sentinel
 };
@@ -189,7 +189,7 @@ PyTypeObject KX_LibLoadStatus::Type = {
 PyObject* KX_LibLoadStatus::pyattr_get_onfinish(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
 {
        KX_LibLoadStatus* self = static_cast<KX_LibLoadStatus*>(self_v);
-       
+
        if (self->m_finish_cb) {
                Py_INCREF(self->m_finish_cb);
                return self->m_finish_cb;
@@ -219,7 +219,7 @@ int KX_LibLoadStatus::pyattr_set_onfinish(void *self_v, const KX_PYATTRIBUTE_DEF
 PyObject* KX_LibLoadStatus::pyattr_get_onprogress(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
 {
        KX_LibLoadStatus* self = static_cast<KX_LibLoadStatus*>(self_v);
-       
+
        if (self->m_progress_cb) {
                Py_INCREF(self->m_progress_cb);
                return self->m_progress_cb;
index 877aebff5564a9a8905f109fc3f4c4245de60014..6c8b7fc3e2907bc83200996eaee11a939f0061fd 100644 (file)
@@ -92,7 +92,7 @@ bool KX_SoftBodyDeformer::Apply(class RAS_IPolyMaterial *polymat)
        slot = *mmat->m_slots[(void*)m_gameobj];
 
        // for each array
-       for (slot->begin(it); !slot->end(it); slot->next(it)) 
+       for (slot->begin(it); !slot->end(it); slot->next(it))
        {
                btSoftBody::tNodeArray&   nodes(softBody->m_nodes);
 
index d7bc088e1c06f9ee5c688d63771f1d1561384607..cc7f81ce0c732873cbe3c99067d47d9397602dc0 100644 (file)
@@ -68,7 +68,7 @@ public:
        }
        virtual bool UpdateBuckets(void)
        {
-               // this is to update the mesh slots outside the rasterizer, 
+               // this is to update the mesh slots outside the rasterizer,
                // no need to do it for this deformer, it's done in any case in Apply()
                return false;
        }
index 98ba1d75e520a0b7ff67a8966bb122e14b47c84b..89c724e87ee1084efbd8a7e00d58a47c4f89c02b 100644 (file)
@@ -26,7 +26,7 @@
  * Is used by parser when an expression tree is build containing booleans.
  */
 
-class CBoolValue : public CPropValue  
+class CBoolValue : public CPropValue
 {
 
        //PLUGIN_DECLARE_SERIAL(CBoolValue,CValue)
@@ -44,10 +44,10 @@ public:
        virtual int                     GetValueType();
        bool                            GetBool();
        virtual void            SetValue(CValue* newval);
-       
+
        virtual CValue*         Calc(VALUE_OPERATOR op, CValue *val);
        virtual CValue*         CalcFinal(VALUE_DATA_TYPE dtype, VALUE_OPERATOR op, CValue *val);
-       
+
        void                            Configure(CValue* menuvalue);
        virtual CValue*         GetReplica();
 #ifdef WITH_PYTHON
index b4456dacdf3abc2a775022d6fa9f390300888c39..ddc7df14ff160fa32f77af2990b3ac7c522da2ce 100644 (file)
 #include "EXP_Expression.h"
 #include "EXP_Value.h" // Added by ClassView
 
-class CConstExpr : public CExpression  
+class CConstExpr : public CExpression
 {
        //PLUGIN_DECLARE_SERIAL_EXPRESSION (CConstExpr,CExpression)
 public:
        virtual bool MergeExpression(CExpression* otherexpr);
-       
+
        void BroadcastOperators(VALUE_OPERATOR op);
 
        virtual unsigned char GetExpressionID();
@@ -40,7 +40,7 @@ public:
        CConstExpr(CValue* constval);
        CConstExpr();
        virtual ~CConstExpr();
-                       
+
 
 private:
        CValue* m_value;
index d23addb9f9fb869e6f06fbc41969907622f36abd..e3be9f0c2c46d8ca47f6c0c5f9fd929f55e6a5a7 100644 (file)
@@ -23,7 +23,7 @@
 
 class CListValue;
 
-class CEmptyValue : public CPropValue  
+class CEmptyValue : public CPropValue
 {
        //PLUGIN_DECLARE_SERIAL (CEmptyValue,CValue)
 public:
index a6f91ca200a579d1adbf24c053f593121aefa4b3..aa2b1a6824176287893f62a7e2ad7c8c5e6d1580 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "EXP_Value.h"
 
-class CErrorValue : public CPropValue  
+class CErrorValue : public CPropValue
 {
 
 public:
index 66a6e9476ff2405aec80a35ec9b700f152682636..0ed8c9503b39ec9e535bc46039966ffaef0ed00f 100644 (file)
@@ -56,7 +56,7 @@ class CBrokenLinkInfo
                CBrokenLinkInfo(CExpression** pmemexpr,CExpression* expr)
                        :m_pmemExpr(pmemexpr),
                        m_pExpr(expr)
-                { 
+                {
                        assertd(pmemexpr);
                        m_bRestored=false;
                };
@@ -64,15 +64,15 @@ class CBrokenLinkInfo
                virtual ~CBrokenLinkInfo();
                void RestoreLink();
                void BreakLink();
-               
-               
+
+
        // members vars
        private:
        CExpression** m_pmemExpr;
        CExpression* m_pExpr;
        bool            m_bRestored;
-       
-       
+
+
 #ifdef WITH_CXX_GUARDEDALLOC
        MEM_CXX_CLASS_ALLOC_FUNCS("GE:CBrokenLinkInfo")
 #endif
@@ -85,7 +85,7 @@ class CBrokenLinkInfo
 
 
 
-class CExpression  
+class CExpression
 {
 public:
        enum {
@@ -104,7 +104,7 @@ public:
        virtual bool MergeExpression(CExpression* otherexpr) = 0;
        CExpression();
 
-       
+
        virtual                         CValue* Calculate() = 0;        //pure virtual
        virtual unsigned char GetExpressionID() = 0;
        //virtual bool          IsInside(float x,float y,float z,bool bBorderInclude=true) = 0;         //pure virtual
@@ -120,21 +120,21 @@ public:
                //gRefCountExpr++;
            &nb