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