python api renaming and added headers for some files which didnt have one, no functionality change.
This commit is contained in:
@@ -52,6 +52,7 @@ set(SRC
|
||||
|
||||
bpy.h
|
||||
bpy_app.h
|
||||
bpy_driver.h
|
||||
bpy_operator.h
|
||||
bpy_operator_wrap.h
|
||||
bpy_props.h
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
|
||||
#define WITH_PYTHON /* for AUD_PyInit.h, possibly others */
|
||||
|
||||
#include <Python.h>
|
||||
|
||||
#include "bpy.h"
|
||||
#include "bpy_util.h"
|
||||
#include "bpy_rna.h"
|
||||
|
||||
@@ -22,7 +22,10 @@
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
#include <Python.h>
|
||||
|
||||
#include "bpy_app.h"
|
||||
#include "bpy_driver.h"
|
||||
|
||||
#include "BLI_path_util.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
@@ -21,15 +21,9 @@
|
||||
*
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
#ifndef BPY_APP_H__
|
||||
#define BPY_APP_H__
|
||||
|
||||
#include <Python.h>
|
||||
#ifndef BPY_APP_H
|
||||
#define BPY_APP_H
|
||||
|
||||
PyObject *BPY_app_struct( void );
|
||||
|
||||
/* bpy_driver.c */
|
||||
int bpy_pydriver_create_dict(void);
|
||||
extern PyObject *bpy_pydriver_Dict;
|
||||
|
||||
#endif
|
||||
#endif // BPY_APP_H
|
||||
|
||||
30
source/blender/python/intern/bpy_driver.h
Normal file
30
source/blender/python/intern/bpy_driver.h
Normal file
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* $Id: bpy_app.h 33348 2010-11-27 02:39:51Z campbellbarton $
|
||||
*
|
||||
* ***** 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.
|
||||
*
|
||||
* Contributor(s): Campbell Barton
|
||||
*
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
#ifndef BPY_DRIVER_H
|
||||
#define BPY_DRIVER_H
|
||||
|
||||
int bpy_pydriver_create_dict(void);
|
||||
extern PyObject *bpy_pydriver_Dict;
|
||||
|
||||
#endif // BPY_DRIVER_H
|
||||
@@ -56,6 +56,12 @@
|
||||
#include "../generic/bpy_internal_import.h" // our own imports
|
||||
#include "../generic/py_capi_utils.h"
|
||||
|
||||
/* inittab initialization functions */
|
||||
#include "../generic/noise_py_api.h"
|
||||
#include "../generic/mathutils.h"
|
||||
#include "../generic/bgl.h"
|
||||
#include "../generic/blf_py_api.h"
|
||||
|
||||
/* for internal use, when starting and ending python scripts */
|
||||
|
||||
/* incase a python script triggers another python call, stop bpy_context_clear from invalidating */
|
||||
@@ -197,12 +203,7 @@ void BPY_context_set(bContext *C)
|
||||
BPy_SetContext(C);
|
||||
}
|
||||
|
||||
/* init-tab */
|
||||
extern PyObject *BPyInit_noise(void);
|
||||
extern PyObject *BPyInit_mathutils(void);
|
||||
// extern PyObject *BPyInit_mathutils_geometry(void); // BPyInit_mathutils calls, py doesnt work with thos :S
|
||||
extern PyObject *BPyInit_bgl(void);
|
||||
extern PyObject *BPyInit_blf(void);
|
||||
/* defined in AUD_C-API.cpp */
|
||||
extern PyObject *AUD_initPython(void);
|
||||
|
||||
static struct _inittab bpy_internal_modules[]= {
|
||||
|
||||
@@ -24,9 +24,11 @@
|
||||
*/
|
||||
|
||||
/* Note, this module is not to be used directly by the user.
|
||||
* its accessed from blender with bpy.__ops__
|
||||
* Internally its exposed as '_bpy.ops', which provides functions for 'bpy.ops', a python package.
|
||||
* */
|
||||
|
||||
#include <Python.h>
|
||||
|
||||
#include "bpy_operator.h"
|
||||
#include "bpy_operator_wrap.h"
|
||||
#include "bpy_rna.h" /* for setting arg props only - pyrna_py_to_prop() */
|
||||
@@ -41,6 +43,7 @@
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
#include "BKE_report.h"
|
||||
#include "BKE_context.h"
|
||||
|
||||
static PyObject *pyop_poll(PyObject *UNUSED(self), PyObject *args)
|
||||
{
|
||||
@@ -255,7 +258,7 @@ static PyObject *pyop_as_string(PyObject *UNUSED(self), PyObject *args)
|
||||
char *buf = NULL;
|
||||
PyObject *pybuf;
|
||||
|
||||
bContext *C = (bContext *)BPy_GetContext();
|
||||
bContext *C= (bContext *)BPy_GetContext();
|
||||
|
||||
if(C==NULL) {
|
||||
PyErr_SetString(PyExc_SystemError, "Context is None, cant get the string representation of this object.");
|
||||
|
||||
@@ -25,13 +25,6 @@
|
||||
#ifndef BPY_OPERATOR_H
|
||||
#define BPY_OPERATOR_H
|
||||
|
||||
#include <Python.h>
|
||||
|
||||
#include "RNA_access.h"
|
||||
#include "RNA_types.h"
|
||||
#include "DNA_windowmanager_types.h"
|
||||
#include "BKE_context.h"
|
||||
|
||||
extern PyTypeObject pyop_base_Type;
|
||||
|
||||
#define BPy_OperatorBase_Check(v) (PyObject_TypeCheck(v, &pyop_base_Type))
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
#include <Python.h>
|
||||
|
||||
#include "bpy_operator_wrap.h"
|
||||
#include "WM_api.h"
|
||||
#include "WM_types.h"
|
||||
|
||||
@@ -25,8 +25,6 @@
|
||||
#ifndef BPY_OPERATOR_WRAP_H
|
||||
#define BPY_OPERATOR_WRAP_H
|
||||
|
||||
#include <Python.h>
|
||||
|
||||
/* these are used for operator methods, used by bpy_operator.c */
|
||||
PyObject *PYOP_wrap_macro_define(PyObject *self, PyObject *args);
|
||||
#endif
|
||||
|
||||
@@ -22,14 +22,14 @@
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
#include <Python.h>
|
||||
|
||||
#include "bpy_props.h"
|
||||
#include "bpy_rna.h"
|
||||
#include "bpy_util.h"
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
|
||||
|
||||
#include "RNA_define.h" /* for defining our own rna */
|
||||
#include "RNA_enum_types.h"
|
||||
|
||||
|
||||
@@ -25,8 +25,6 @@
|
||||
#ifndef BPY_PROPS_H
|
||||
#define BPY_PROPS_H
|
||||
|
||||
#include <Python.h>
|
||||
|
||||
PyObject *BPY_rna_props( void );
|
||||
|
||||
#define PYRNA_STACK_ARRAY 32
|
||||
|
||||
@@ -21,6 +21,9 @@
|
||||
*
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
#include <Python.h>
|
||||
|
||||
#include <float.h> /* FLT_MIN/MAX */
|
||||
|
||||
#include "bpy_rna.h"
|
||||
|
||||
@@ -24,8 +24,6 @@
|
||||
#ifndef BPY_RNA_H
|
||||
#define BPY_RNA_H
|
||||
|
||||
#include <Python.h>
|
||||
|
||||
#include "RNA_access.h"
|
||||
#include "RNA_types.h"
|
||||
#include "BKE_idprop.h"
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
*
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
#include <Python.h>
|
||||
|
||||
#include "bpy_rna.h"
|
||||
#include "BKE_global.h"
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
#include <Python.h>
|
||||
|
||||
#include "bpy_rna.h"
|
||||
#include "bpy_rna_callback.h"
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
#include <Python.h>
|
||||
|
||||
#include "bpy_util.h"
|
||||
#include "BLI_dynstr.h"
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
@@ -22,8 +22,6 @@
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
#include <Python.h>
|
||||
|
||||
#ifndef BPY_UTIL_H
|
||||
#define BPY_UTIL_H
|
||||
|
||||
|
||||
Reference in New Issue
Block a user