G.sipo was being passed in the BGE when it wasnt needed, just access G.sipo directly.
authorCampbell Barton <ideasman42@gmail.com>
Sat, 13 Jun 2009 13:02:01 +0000 (13:02 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 13 Jun 2009 13:02:01 +0000 (13:02 +0000)
KX_PythonSeq.cpp - disable the cmpfunc with py3, need to have richcmp.

source/blender/src/space.c
source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
source/gameengine/Converter/KX_BlenderSceneConverter.cpp
source/gameengine/Converter/KX_BlenderSceneConverter.h
source/gameengine/GamePlayer/ghost/GPG_Application.cpp
source/gameengine/Ketsji/KX_PythonSeq.cpp

index 8ff2b526ae8878837ecb5cff7e7a57e3b12c2f90..1e845376952e3e8cc5c501a999236e0838b3656f 100644 (file)
 #include "BLO_sys_types.h" // for intptr_t support
 
 /* maybe we need this defined somewhere else */
-extern void StartKetsjiShell(ScrArea *area, char* startscenename, struct Main* maggie, struct SpaceIpo* sipo,int always_use_expand_framing);
-extern void StartKetsjiShellSimulation(ScrArea *area, char* startscenename, struct Main* maggie, struct SpaceIpo* sipo,int always_use_expand_framing);/*rcruiz*/
+extern void StartKetsjiShell(ScrArea *area, char* startscenename, struct Main* maggie,int always_use_expand_framing);
+extern void StartKetsjiShellSimulation(ScrArea *area, char* startscenename, struct Main* maggie, int always_use_expand_framing);/*rcruiz*/
 
 /**
  * When the mipmap setting changes, we want to redraw the view right
@@ -556,7 +556,7 @@ void start_game(void)
        space_set_commmandline_options();
 
        SaveState();
-       StartKetsjiShell(curarea, startscene->id.name+2, G.main,G.sipo, 1);
+       StartKetsjiShell(curarea, startscene->id.name+2, G.main, 1);
        RestoreState();
 
        /* Restart BPY - unload the game engine modules. */
@@ -634,7 +634,7 @@ void start_RBSimulation(void)
        space_set_commmandline_options();
 
        SaveState();
-       StartKetsjiShellSimulation(curarea, startscene->id.name+2, G.main,G.sipo, 1);
+       StartKetsjiShellSimulation(curarea, startscene->id.name+2, G.main, 1);
        RestoreState();
 
        /* Restart BPY - unload the game engine modules. */
index 38a2ccd5d79be5bc22115b4c6842527e4175b4fc..ec751376d4afe80a447e5462b30864d8e5d0490a 100644 (file)
@@ -104,7 +104,6 @@ static BlendFileData *load_game_data(char *filename) {
 extern "C" void StartKetsjiShell(struct ScrArea *area,
                                                                 char* scenename,
                                                                 struct Main* maggie1,
-                                                                struct SpaceIpo *sipo,
                                                                 int always_use_expand_framing)
 {
        int exitrequested = KX_EXIT_REQUEST_NO_REQUEST;
@@ -330,7 +329,7 @@ extern "C" void StartKetsjiShell(struct ScrArea *area,
                        }
                        
                        // create a scene converter, create and convert the startingscene
-                       KX_ISceneConverter* sceneconverter = new KX_BlenderSceneConverter(blenderdata,sipo, ketsjiengine);
+                       KX_ISceneConverter* sceneconverter = new KX_BlenderSceneConverter(blenderdata, ketsjiengine);
                        ketsjiengine->SetSceneConverter(sceneconverter);
                        sceneconverter->addInitFromFrame=false;
                        if (always_use_expand_framing)
@@ -549,7 +548,6 @@ extern "C" void StartKetsjiShell(struct ScrArea *area,
 extern "C" void StartKetsjiShellSimulation(struct ScrArea *area,
                                                                 char* scenename,
                                                                 struct Main* maggie,
-                                                                struct SpaceIpo *sipo,
                                                                 int always_use_expand_framing)
 {
     int exitrequested = KX_EXIT_REQUEST_NO_REQUEST;
@@ -648,7 +646,7 @@ extern "C" void StartKetsjiShellSimulation(struct ScrArea *area,
                if (exitrequested != KX_EXIT_REQUEST_QUIT_GAME)
                {
                        // create a scene converter, create and convert the startingscene
-                       KX_ISceneConverter* sceneconverter = new KX_BlenderSceneConverter(maggie,sipo, ketsjiengine);
+                       KX_ISceneConverter* sceneconverter = new KX_BlenderSceneConverter(maggie, ketsjiengine);
                        ketsjiengine->SetSceneConverter(sceneconverter);
                        sceneconverter->addInitFromFrame=true;
                        
index 646e569a27ebc24e899c673114daf8af79428d27..42b96d65622c77a061531f68b45038e39d32afc5 100644 (file)
@@ -94,11 +94,9 @@ extern "C"
 
 KX_BlenderSceneConverter::KX_BlenderSceneConverter(
                                                        struct Main* maggie,
-                                                       struct SpaceIpo*        sipo,
                                                        class KX_KetsjiEngine* engine
                                                        )
                                                        : m_maggie(maggie),
-                                                       m_sipo(sipo),
                                                        m_ketsjiEngine(engine),
                                                        m_alwaysUseExpandFraming(false),
                                                        m_usemat(false),
@@ -641,13 +639,13 @@ 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 ,struct SpaceIpo*    sipo)
+void KX_BlenderSceneConverter::localDel_ipoCurve ( IpoCurve * icu)
 {
-       if (!sipo)
+       if (!G.sipo)
                return;
 
        int i;
-       EditIpo *ei= (EditIpo *)sipo->editipo;
+       EditIpo *ei= (EditIpo *)G.sipo->editipo;
        if (!ei) return;
 
        for(i=0; i<G.sipo->totipo; i++, ei++) {
@@ -751,7 +749,7 @@ void        KX_BlenderSceneConverter::ResetPhysicsObjectsAnimationIpo(bool clearIpo)
                                                                if( tmpicu->bezt )
                                                                        MEM_freeN( tmpicu->bezt );
                                                                MEM_freeN( tmpicu );
-                                                               localDel_ipoCurve( tmpicu ,m_sipo);
+                                                               localDel_ipoCurve( tmpicu );
                                                        }
                                                }
                                        } else
index f7c1a506457db0ff01e49d6ce14586d487bb71dd..cf8dd5b339ab900605f28c580f3994617515be29 100644 (file)
@@ -44,7 +44,6 @@ class BL_InterpolatorList;
 class BL_Material;
 struct IpoCurve;
 struct Main;
-struct SpaceIpo;
 struct Scene;
 
 class KX_BlenderSceneConverter : public KX_ISceneConverter
@@ -69,7 +68,6 @@ class KX_BlenderSceneConverter : public KX_ISceneConverter
        GEN_Map<CHashedPtr,BL_InterpolatorList*> m_map_blender_to_gameipolist;
        
        Main*                                   m_maggie;
-       SpaceIpo*                               m_sipo;
 
        STR_String                              m_newfilename;
        class KX_KetsjiEngine*  m_ketsjiEngine;
@@ -78,13 +76,12 @@ class KX_BlenderSceneConverter : public KX_ISceneConverter
        bool                                    m_usemat;
        bool                                    m_useglslmat;
 
-       void localDel_ipoCurve ( IpoCurve * icu ,struct SpaceIpo*       sipo);
+       void localDel_ipoCurve ( IpoCurve * icu );
 //     struct Ipo* findIpoForName(char* objName);
 
 public:
        KX_BlenderSceneConverter(
                Main* maggie,
-               SpaceIpo *sipo,
                class KX_KetsjiEngine* engine
        );
 
index 8a594f7365d83841631325b25a1f0409e7c096b3..bd332e8bbd7c24ad38757c4885cc25fc06c3c239 100644 (file)
@@ -663,7 +663,7 @@ bool GPG_Application::startEngine(void)
        */
        
        // create a scene converter, create and convert the stratingscene
-       m_sceneconverter = new KX_BlenderSceneConverter(m_maggie,0, m_ketsjiengine);
+       m_sceneconverter = new KX_BlenderSceneConverter(m_maggie, m_ketsjiengine);
        if (m_sceneconverter)
        {
                STR_String startscenename = m_startSceneName.Ptr();
index cc8021fc2e4e2b9acb036efb615d711f9252bed2..f2bc4671f4e21ccf08cce5736cd82cab1ce939f3 100644 (file)
@@ -313,7 +313,11 @@ PyTypeObject KX_PythonSeq_Type = {
        NULL,                       /* printfunc tp_print; */
        NULL,                       /* getattrfunc tp_getattr; */
        NULL,                       /* setattrfunc tp_setattr; */
+#if PY_VERSION_HEX >= 0x03000000 // TODO - richcmp
+       NULL,
+#else
        ( cmpfunc ) KX_PythonSeq_compare, /* cmpfunc tp_compare; */
+#endif
        ( reprfunc ) KX_PythonSeq_repr,   /* reprfunc tp_repr; */
 
        /* Method suites for standard classes */