Blender V2.61 - r43446

KX_PythonInit.h

Go to the documentation of this file.
00001 /*
00002  * ***** BEGIN GPL LICENSE BLOCK *****
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License
00006  * as published by the Free Software Foundation; either version 2
00007  * of the License, or (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software Foundation,
00016  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00017  *
00018  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
00019  * All rights reserved.
00020  *
00021  * The Original Code is: all of this file.
00022  *
00023  * Contributor(s): none yet.
00024  *
00025  * ***** END GPL LICENSE BLOCK *****
00026  */
00027 
00032 #ifndef __KX_PYTHON_INIT
00033 #define __KX_PYTHON_INIT
00034 
00035 #include "KX_Python.h"
00036 #include "STR_String.h"
00037 
00038 typedef enum {
00039     psl_Lowest = 0,
00040     psl_Highest
00041 } TPythonSecurityLevel;
00042 
00043 extern bool gUseVisibilityTemp;
00044 
00045 #ifdef WITH_PYTHON
00046 PyObject*   initGameLogic(class KX_KetsjiEngine *engine, class KX_Scene* ketsjiscene);
00047 PyObject*   initGameKeys();
00048 PyObject*   initRasterizer(class RAS_IRasterizer* rasty,class RAS_ICanvas* canvas);
00049 PyObject*   initGamePlayerPythonScripting(const STR_String& progname, TPythonSecurityLevel level, struct Main *maggie, int argc, char** argv);
00050 PyObject*   initVideoTexture(void); 
00051 void        exitGamePlayerPythonScripting();
00052 PyObject*   initGamePythonScripting(const STR_String& progname, TPythonSecurityLevel level, struct Main *maggie);
00053 void        exitGamePythonScripting();
00054 
00055 void setupGamePython(KX_KetsjiEngine* ketsjiengine, KX_Scene* startscene, Main *blenderdata, PyObject *pyGlobalDict, PyObject **gameLogic, PyObject **gameLogic_keys, int argc, char** argv);
00056 
00057 void        setGamePythonPath(const char *path);
00058 void        resetGamePythonPath();
00059 void        pathGamePythonConfig( char *path );
00060 int         saveGamePythonConfig( char **marshal_buffer);
00061 int         loadGamePythonConfig(char *marshal_buffer, int marshal_length);
00062 #endif
00063 
00064 class KX_KetsjiEngine;
00065 class KX_Scene;
00066 
00067 void KX_SetActiveScene(class KX_Scene* scene);
00068 class KX_Scene* KX_GetActiveScene();
00069 class KX_KetsjiEngine* KX_GetActiveEngine();
00070 #include "MT_Vector3.h"
00071 
00072 void        KX_RasterizerDrawDebugLine(const MT_Vector3& from,const MT_Vector3& to,const MT_Vector3& color);
00073 void        KX_RasterizerDrawDebugCircle(const MT_Vector3& center, const MT_Scalar radius, const MT_Vector3& color,
00074                                          const MT_Vector3& normal, int nsector);
00075 
00076 
00077 #endif //__KX_PYTHON_INIT
00078