svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r20849:20855
[blender-staging.git] / source / gameengine / Converter / KX_BlenderSceneConverter.cpp
index 42b96d65622c77a061531f68b45038e39d32afc5..d5c93758f9409d75116eca2efb24429b175736c9 100644 (file)
@@ -83,8 +83,8 @@ extern "C"
 #include "DNA_curve_types.h"
 #include "BLI_blenlib.h"
 #include "MEM_guardedalloc.h"
-#include "BSE_editipo.h"
-#include "BSE_editipo_types.h"
+//XXX #include "BSE_editipo.h"
+//XXX #include "BSE_editipo_types.h"
 #include "DNA_ipo_types.h"
 #include "BKE_global.h"
 #include "BKE_ipo.h" // eval_icu
@@ -639,8 +639,9 @@ void KX_BlenderSceneConverter::RegisterWorldInfo(
  * When deleting an IPO curve from Python, check if the IPO is being
  * edited and if so clear the pointer to the old curve.
  */
-void KX_BlenderSceneConverter::localDel_ipoCurve ( IpoCurve * icu)
+void KX_BlenderSceneConverter::localDel_ipoCurve ( IpoCurve * icu )
 {
+#if 0 //XXX
        if (!G.sipo)
                return;
 
@@ -655,15 +656,16 @@ void KX_BlenderSceneConverter::localDel_ipoCurve ( IpoCurve * icu)
                        return;
                }
        }
+#endif
 }
 
 //quick hack
 extern "C"
 {
        Ipo *add_ipo( char *name, int idcode );
-       char *getIpoCurveName( IpoCurve * icu );
-       struct IpoCurve *verify_ipocurve(struct ID *, short, char *, char *, char *, int, short);
-       void testhandles_ipocurve(struct IpoCurve *icu);
+       //XXX char *getIpoCurveName( IpoCurve * icu );
+       //XXX struct IpoCurve *verify_ipocurve(struct ID *, short, char *, char *, char *, int);
+       //XXX void testhandles_ipocurve(struct IpoCurve *icu);
        void insert_vert_icu(struct IpoCurve *, float, float, short);
        float eval_icu(struct IpoCurve *icu, float ipotime);
        //void Mat3ToEul(float tmat[][3], float *eul);
@@ -675,11 +677,11 @@ IpoCurve* findIpoCurve(IpoCurve* first, const char* searchName)
        IpoCurve* icu1;
        for( icu1 = first; icu1; icu1 = icu1->next ) 
        {
-               char* curveName = getIpoCurveName( icu1 );
+               /*XXX char* curveName = getIpoCurveName( icu1 );
                if( !strcmp( curveName, searchName) )
                {
                        return icu1;
-               }
+               }*/
        }
        return 0;
 }
@@ -753,7 +755,7 @@ void        KX_BlenderSceneConverter::ResetPhysicsObjectsAnimationIpo(bool clearIpo)
                                                        }
                                                }
                                        } else
-                                       {       ipo = add_ipo(blenderObject->id.name+2, ID_OB);
+                                       {       ipo = NULL; // XXX add_ipo(blenderObject->id.name+2, ID_OB);
                                                blenderObject->ipo = ipo;
 
                                        }
@@ -850,6 +852,8 @@ void        KX_BlenderSceneConverter::WritePhysicsObjectToAnimationIpo(int frameNumber)
                                        float eulerAnglesOld[3] = {0.0f, 0.0f, 0.0f};                                           
                                        float tmat[3][3];
                                        
+                                       // XXX animato
+#if 0
                                        Ipo* ipo = blenderObject->ipo;
 
                                        //create the curves, if not existing, set linear if new
@@ -910,6 +914,7 @@ void        KX_BlenderSceneConverter::WritePhysicsObjectToAnimationIpo(int frameNumber)
                                        if (icu_rz) insert_vert_icu(icu_rz, frameNumber, eulerAngles[2], 1);
                                        
                                        // Handles are corrected at the end, testhandles_ipocurve isnt needed yet
+#endif
                                }
                        }
                }
@@ -940,6 +945,8 @@ void        KX_BlenderSceneConverter::TestHandlesPhysicsObjectToAnimationIpo()
                                Object* blenderObject = FindBlenderObject(gameObj);
                                if (blenderObject && blenderObject->ipo)
                                {
+                                       // XXX animato
+#if 0
                                        Ipo* ipo = blenderObject->ipo;
                                        
                                        //create the curves, if not existing
@@ -950,6 +957,7 @@ void        KX_BlenderSceneConverter::TestHandlesPhysicsObjectToAnimationIpo()
                                        testhandles_ipocurve(findIpoCurve((IpoCurve *)ipo->curve.first,"RotX"));
                                        testhandles_ipocurve(findIpoCurve((IpoCurve *)ipo->curve.first,"RotY"));
                                        testhandles_ipocurve(findIpoCurve((IpoCurve *)ipo->curve.first,"RotZ"));
+#endif
                                }
                        }