Revision: 20854
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20854
Author:   campbellbarton
Date:     2009-06-13 15:02:01 +0200 (Sat, 13 Jun 2009)

Log Message:
-----------
G.sipo was being passed in the BGE when it wasnt needed, just access G.sipo 
directly.
KX_PythonSeq.cpp - disable the cmpfunc with py3, need to have richcmp.

Modified Paths:
--------------
    trunk/blender/source/blender/src/space.c
    trunk/blender/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
    trunk/blender/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
    trunk/blender/source/gameengine/Converter/KX_BlenderSceneConverter.h
    trunk/blender/source/gameengine/GamePlayer/ActiveX/BlenderPlayerCtl.cpp
    trunk/blender/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
    
trunk/blender/source/gameengine/GamePlayer/netscape/src/ketsji/KXH_ketsji_hooks.cpp
    trunk/blender/source/gameengine/Ketsji/KX_PythonSeq.cpp

Modified: trunk/blender/source/blender/src/space.c
===================================================================
--- trunk/blender/source/blender/src/space.c    2009-06-13 12:29:46 UTC (rev 
20853)
+++ trunk/blender/source/blender/src/space.c    2009-06-13 13:02:01 UTC (rev 
20854)
@@ -194,8 +194,8 @@
 #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 @@
        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 @@
        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. */

Modified: 
trunk/blender/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
===================================================================
--- trunk/blender/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp     
2009-06-13 12:29:46 UTC (rev 20853)
+++ trunk/blender/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp     
2009-06-13 13:02:01 UTC (rev 20854)
@@ -104,7 +104,6 @@
 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 @@
                        }
                        
                        // 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 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 @@
                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;
                        

Modified: trunk/blender/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
===================================================================
--- trunk/blender/source/gameengine/Converter/KX_BlenderSceneConverter.cpp      
2009-06-13 12:29:46 UTC (rev 20853)
+++ trunk/blender/source/gameengine/Converter/KX_BlenderSceneConverter.cpp      
2009-06-13 13:02:01 UTC (rev 20854)
@@ -94,11 +94,9 @@
 
 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 @@
  * 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 @@
                                                                if( 
tmpicu->bezt )
                                                                        
MEM_freeN( tmpicu->bezt );
                                                                MEM_freeN( 
tmpicu );
-                                                               
localDel_ipoCurve( tmpicu ,m_sipo);
+                                                               
localDel_ipoCurve( tmpicu );
                                                        }
                                                }
                                        } else

Modified: trunk/blender/source/gameengine/Converter/KX_BlenderSceneConverter.h
===================================================================
--- trunk/blender/source/gameengine/Converter/KX_BlenderSceneConverter.h        
2009-06-13 12:29:46 UTC (rev 20853)
+++ trunk/blender/source/gameengine/Converter/KX_BlenderSceneConverter.h        
2009-06-13 13:02:01 UTC (rev 20854)
@@ -44,7 +44,6 @@
 class BL_Material;
 struct IpoCurve;
 struct Main;
-struct SpaceIpo;
 struct Scene;
 
 class KX_BlenderSceneConverter : public KX_ISceneConverter
@@ -69,7 +68,6 @@
        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 @@
        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
        );
 

Modified: 
trunk/blender/source/gameengine/GamePlayer/ActiveX/BlenderPlayerCtl.cpp
===================================================================
--- trunk/blender/source/gameengine/GamePlayer/ActiveX/BlenderPlayerCtl.cpp     
2009-06-13 12:29:46 UTC (rev 20853)
+++ trunk/blender/source/gameengine/GamePlayer/ActiveX/BlenderPlayerCtl.cpp     
2009-06-13 13:02:01 UTC (rev 20854)
@@ -649,7 +649,7 @@
                updateEngineInfoDisplay();
                
                // create a scene converter, create and convert the starting 
scene
-               m_sceneconverter = new 
KX_BlenderSceneConverter(m_gamedata->main, 0, m_ketsjiengine);
+               m_sceneconverter = new 
KX_BlenderSceneConverter(m_gamedata->main, m_ketsjiengine);
                if (m_sceneconverter)
                {
                        m_ketsjiengine->SetSceneConverter(m_sceneconverter);

Modified: trunk/blender/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
===================================================================
--- trunk/blender/source/gameengine/GamePlayer/ghost/GPG_Application.cpp        
2009-06-13 12:29:46 UTC (rev 20853)
+++ trunk/blender/source/gameengine/GamePlayer/ghost/GPG_Application.cpp        
2009-06-13 13:02:01 UTC (rev 20854)
@@ -663,7 +663,7 @@
        */
        
        // 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();

Modified: 
trunk/blender/source/gameengine/GamePlayer/netscape/src/ketsji/KXH_ketsji_hooks.cpp
===================================================================
--- 
trunk/blender/source/gameengine/GamePlayer/netscape/src/ketsji/KXH_ketsji_hooks.cpp
 2009-06-13 12:29:46 UTC (rev 20853)
+++ 
trunk/blender/source/gameengine/GamePlayer/netscape/src/ketsji/KXH_ketsji_hooks.cpp
 2009-06-13 13:02:01 UTC (rev 20854)
@@ -521,8 +521,7 @@
        if (k->kx_engine)
        {       
                k->converter = new
-                       KX_BlenderSceneConverter(active_file->main, 0,
-                                                k->kx_engine);
+                       KX_BlenderSceneConverter(active_file->main, 
k->kx_engine);
                
                PyObject* dictionaryobject 
                        = initGamePlayerPythonScripting("Ketsji", 

Modified: trunk/blender/source/gameengine/Ketsji/KX_PythonSeq.cpp
===================================================================
--- trunk/blender/source/gameengine/Ketsji/KX_PythonSeq.cpp     2009-06-13 
12:29:46 UTC (rev 20853)
+++ trunk/blender/source/gameengine/Ketsji/KX_PythonSeq.cpp     2009-06-13 
13:02:01 UTC (rev 20854)
@@ -313,7 +313,11 @@
        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 */


_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to