2 * ***** BEGIN GPL LICENSE BLOCK *****
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
19 * All rights reserved.
21 * This is a new part of Blender.
23 * Contributor(s): Willian P. Germano, Campbell Barton
25 * ***** END GPL LICENSE BLOCK *****
28 /** \file blender/python/generic/bpy_internal_import.h
33 /* Note, the BGE needs to use this too, keep it minimal */
35 #ifndef BPY_INTERNAL_IMPORT_H
36 #define BPY_INTERNAL_IMPORT_H
38 /* python redefines :/ */
39 #ifdef _POSIX_C_SOURCE
40 #undef _POSIX_C_SOURCE
49 void bpy_import_init(PyObject *builtins);
51 PyObject* bpy_text_import(struct Text *text);
52 PyObject* bpy_text_import_name(const char *name, int *found);
53 PyObject* bpy_text_reimport(PyObject *module, int *found);
54 /* void bpy_text_clear_modules(int clear_all);*/ /* Clear user modules */
56 void bpy_text_filename_get(char *fn, size_t fn_len, struct Text *text);
58 extern PyMethodDef bpy_import_meth;
59 extern PyMethodDef bpy_reload_meth;
61 /* The game engine has its own Main struct, if this is set search this rather than G.main */
62 struct Main *bpy_import_main_get(void);
63 void bpy_import_main_set(struct Main *maggie);
65 #endif /* BPY_INTERNAL_IMPORT_H */