diff options
Diffstat (limited to 'source/blender/python/intern')
-rw-r--r-- | source/blender/python/intern/Makefile | 67 | ||||
-rw-r--r-- | source/blender/python/intern/bpy.c | 2 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_operator_wrap.c | 1 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_rna.h | 1 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_ui.c | 69 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_ui.h | 31 |
6 files changed, 169 insertions, 2 deletions
diff --git a/source/blender/python/intern/Makefile b/source/blender/python/intern/Makefile new file mode 100644 index 00000000000..6c0b7b4d14e --- /dev/null +++ b/source/blender/python/intern/Makefile @@ -0,0 +1,67 @@ +# +# $Id$ +# +# ***** BEGIN GPL LICENSE BLOCK ***** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. +# All rights reserved. +# +# The Original Code is: all of this file. +# +# Contributor(s): none yet. +# +# ***** END GPL LICENSE BLOCK ***** +# +# + +LIBNAME = python +DIR = $(OCGDIR)/blender/$(LIBNAME) + +include nan_compile.mk + +CFLAGS += $(LEVEL_1_C_WARNINGS) + +# OpenGL and Python +CPPFLAGS += $(OGL_CPPFLAGS) +CPPFLAGS += -I$(NAN_GLEW)/include +CPPFLAGS += -I$(NAN_PYTHON)/include/python$(NAN_PYTHON_VERSION) + +# PreProcessor stuff + +CPPFLAGS += -I$(NAN_GHOST)/include +CPPFLAGS += $(NAN_SDLCFLAGS) + +# modules +CPPFLAGS += -I../../editors/include +CPPFLAGS += -I../../python +CPPFLAGS += -I../../makesdna +CPPFLAGS += -I../../makesrna +CPPFLAGS += -I../../blenlib +CPPFLAGS += -I../../blenkernel +CPPFLAGS += -I../../nodes +CPPFLAGS += -I../../imbuf +CPPFLAGS += -I../../blenloader +CPPFLAGS += -I../../windowmanager +CPPFLAGS += -I../../render/extern/include +CPPFLAGS += -I$(NAN_AUDASPACE)/include + +# path to the guarded memory allocator +CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include +CPPFLAGS += -I$(NAN_MEMUTIL)/include + +# path to our own headerfiles +CPPFLAGS += -I.. diff --git a/source/blender/python/intern/bpy.c b/source/blender/python/intern/bpy.c index 340e3f4ac57..906f6ccbca2 100644 --- a/source/blender/python/intern/bpy.c +++ b/source/blender/python/intern/bpy.c @@ -60,7 +60,7 @@ #include "../generic/blf_py_api.h" #include "../generic/IDProp.h" -#include "AUD_PyInit.h" +//#include "AUD_PyInit.h" PyObject *bpy_package_py= NULL; diff --git a/source/blender/python/intern/bpy_operator_wrap.c b/source/blender/python/intern/bpy_operator_wrap.c index e1ef8aa49c1..de29cb2aeac 100644 --- a/source/blender/python/intern/bpy_operator_wrap.c +++ b/source/blender/python/intern/bpy_operator_wrap.c @@ -1,4 +1,3 @@ - /* * $Id$ * diff --git a/source/blender/python/intern/bpy_rna.h b/source/blender/python/intern/bpy_rna.h index ba19f155842..e9969277550 100644 --- a/source/blender/python/intern/bpy_rna.h +++ b/source/blender/python/intern/bpy_rna.h @@ -31,6 +31,7 @@ /* --- bpy build options --- */ #ifdef WITH_PYTHON_SAFETY +#include <Python.h> /* play it safe and keep optional for now, need to test further now this affects looping on 10000's of verts for eg. */ #define USE_WEAKREFS diff --git a/source/blender/python/intern/bpy_ui.c b/source/blender/python/intern/bpy_ui.c new file mode 100644 index 00000000000..ab50ebd8bd5 --- /dev/null +++ b/source/blender/python/intern/bpy_ui.c @@ -0,0 +1,69 @@ +/** + * $Id$ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * Contributor(s): Campbell Barton + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#include "bpy_ui.h" +#include "bpy_util.h" +#include "bpy_rna.h" /* for rna buttons */ +#include "bpy_operator.h" /* for setting button operator properties */ + +#include "WM_types.h" /* for WM_OP_INVOKE_DEFAULT & friends */ + +#include "BLI_dynstr.h" + +#include "MEM_guardedalloc.h" +#include "BKE_global.h" /* evil G.* */ +#include "BKE_context.h" + +#include "DNA_screen_types.h" +#include "DNA_space_types.h" /* only for SpaceLink */ +#include "UI_interface.h" +#include "WM_api.h" + +/* Dummy Module, may want to include non RNA UI functions here, else it can be removed */ + +static struct PyMethodDef ui_methods[] = { + {NULL, NULL, 0, NULL} +}; + +static struct PyModuleDef ui_module = { + PyModuleDef_HEAD_INIT, + "_bpy.ui", + "", + -1,/* multiple "initialization" just copies the module dict. */ + ui_methods, + NULL, NULL, NULL, NULL +}; + +PyObject *BPY_ui_module( void ) +{ + PyObject *submodule; + submodule= PyModule_Create(&ui_module); + + /* INCREF since its its assumed that all these functions return the + * module with a new ref like PyDict_New, since they are passed to + * PyModule_AddObject which steals a ref */ + Py_INCREF(submodule); + + return submodule; +} diff --git a/source/blender/python/intern/bpy_ui.h b/source/blender/python/intern/bpy_ui.h new file mode 100644 index 00000000000..95afa1f08c8 --- /dev/null +++ b/source/blender/python/intern/bpy_ui.h @@ -0,0 +1,31 @@ +/** + * $Id: bpy_ui.h 21094 2009-06-23 00:09:26Z gsrb3d $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * Contributor(s): Campbell Barton + * + * ***** END GPL LICENSE BLOCK ***** + */ +#ifndef BPY_UI_H__ +#define BPY_UI_H__ + +#include <Python.h> + +PyObject *BPY_ui_module( void ); + +#endif |