Reserved some Bullet 2.x constraint data.
[blender.git] / source / gameengine / Converter / KX_BlenderSceneConverter.cpp
index 83b2a11e606a99e6b84384109941057fda540faa..10f3ea3961665e09e830e8190c3275cad69cb95b 100644 (file)
@@ -576,7 +576,7 @@ Ipo* KX_BlenderSceneConverter::findIpoForName(char* objName)
 }
 
 
-void   KX_BlenderSceneConverter::ResetPhysicsObjectsAnimationIpo()
+void   KX_BlenderSceneConverter::ResetPhysicsObjectsAnimationIpo(bool clearIpo)
 {
 
        KX_SceneList* scenes = m_ketsjiEngine->CurrentScenes();
@@ -604,6 +604,7 @@ void        KX_BlenderSceneConverter::ResetPhysicsObjectsAnimationIpo()
                                        if (ipo)
                                        {
                                                //clear the curve data
+                                               if (clearIpo){
                                                IpoCurve *icu1;
                                                int numCurves = 0;
                                                for( icu1 = (IpoCurve*)ipo->curve.first; icu1;  ) {
@@ -618,6 +619,7 @@ void        KX_BlenderSceneConverter::ResetPhysicsObjectsAnimationIpo()
                                                        MEM_freeN( tmpicu );
                                                        localDel_ipoCurve( tmpicu ,m_sipo);
                                                }
+                                         }
                                        } else
                                        {
                                                ipo = add_ipo(blenderObject->id.name+2, ID_OB);