svn merge -r 16351:16368 https://svn.blender.org/svnroot/bf-blender/trunk/blender
[blender-staging.git] / source / gameengine / Converter / KX_BlenderSceneConverter.cpp
index f5fb8ce852df05aaf47171767d15ffaa1f58710f..e246e49af3f1a726d6725154eeb791fa13696bd3 100644 (file)
@@ -184,20 +184,21 @@ bool KX_BlenderSceneConverter::TryAndLoadNewFile()
        return result;
 }
 
-
+Scene *KX_BlenderSceneConverter::GetBlenderSceneForName(const STR_String& name)
+{
+       Scene *sce;
 
        /**
         * Find the specified scene by name, or the first
         * scene if nothing matches (shouldn't happen).
         */
-static struct Scene *GetSceneForName2(struct Main *maggie, const STR_String& scenename) {
-       Scene *sce;
 
-       for (sce= (Scene*) maggie->scene.first; sce; sce= (Scene*) sce->id.next)
-               if (scenename == (sce->id.name+2))
+       for (sce= (Scene*) m_maggie->scene.first; sce; sce= (Scene*) sce->id.next)
+               if (name == (sce->id.name+2))
                        return sce;
 
-       return (Scene*) maggie->scene.first;
+       return (Scene*)m_maggie->scene.first;
+
 }
 #include "KX_PythonInit.h"
 
@@ -263,7 +264,7 @@ void KX_BlenderSceneConverter::ConvertScene(const STR_String& scenename,
                                                                                        class RAS_ICanvas* canvas)
 {
        //find out which physics engine
-       Scene *blenderscene = GetSceneForName2(m_maggie, scenename);
+       Scene *blenderscene = GetBlenderSceneForName(scenename);
 
        e_PhysicsEngine physics_engine = UseBullet;
        // hook for registration function during conversion.
@@ -823,7 +824,7 @@ void        KX_BlenderSceneConverter::WritePhysicsObjectToAnimationIpo(int frameNumber)
                        KX_GameObject* gameObj = (KX_GameObject*)parentList->GetValue(g);
                        if (gameObj->IsDynamic())
                        {
-                               KX_IPhysicsController* physCtrl = gameObj->GetPhysicsController();
+                               //KX_IPhysicsController* physCtrl = gameObj->GetPhysicsController();
                                
                                Object* blenderObject = FindBlenderObject(gameObj);
                                if (blenderObject)
@@ -851,7 +852,7 @@ void        KX_BlenderSceneConverter::WritePhysicsObjectToAnimationIpo(int frameNumber)
 
 
 
-                                       const MT_Vector3& scale = gameObj->NodeGetWorldScaling();
+                                       //const MT_Vector3& scale = gameObj->NodeGetWorldScaling();
                                        const MT_Point3& position = gameObj->NodeGetWorldPosition();
                                        
                                        Ipo* ipo = blenderObject->ipo;
@@ -979,7 +980,7 @@ void        KX_BlenderSceneConverter::TestHandlesPhysicsObjectToAnimationIpo()
                        KX_GameObject* gameObj = (KX_GameObject*)parentList->GetValue(g);
                        if (gameObj->IsDynamic())
                        {
-                               KX_IPhysicsController* physCtrl = gameObj->GetPhysicsController();
+                               //KX_IPhysicsController* physCtrl = gameObj->GetPhysicsController();
                                
                                Object* blenderObject = FindBlenderObject(gameObj);
                                if (blenderObject)
@@ -1007,8 +1008,8 @@ void      KX_BlenderSceneConverter::TestHandlesPhysicsObjectToAnimationIpo()
 
 
 
-                                       const MT_Vector3& scale = gameObj->NodeGetWorldScaling();
-                                       const MT_Point3& position = gameObj->NodeGetWorldPosition();
+                                       //const MT_Vector3& scale = gameObj->NodeGetWorldScaling();
+                                       //const MT_Point3& position = gameObj->NodeGetWorldPosition();
                                        
                                        Ipo* ipo = blenderObject->ipo;
                                        if (ipo)