diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-02-14 07:15:25 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-02-14 07:15:25 +0300 |
commit | 72bc3f22b7d01349eaa82b58f8b03a1a26b738ba (patch) | |
tree | 2ad1f687b487dea019aa0cb4e9cf885e6df06cd1 /source/blender/python/generic | |
parent | 54190dd8e5562cf5f964e6bb60be170c9063c616 (diff) |
python api renaming and added headers for some files which didnt have one, no functionality change.
Diffstat (limited to 'source/blender/python/generic')
22 files changed, 72 insertions, 37 deletions
diff --git a/source/blender/python/generic/CMakeLists.txt b/source/blender/python/generic/CMakeLists.txt index 58d69db4a0e..b3dec148e9d 100644 --- a/source/blender/python/generic/CMakeLists.txt +++ b/source/blender/python/generic/CMakeLists.txt @@ -34,13 +34,13 @@ set(SRC blf_py_api.c bpy_internal_import.c mathutils.c - mathutils_color.c - mathutils_euler.c + mathutils_Color.c + mathutils_Euler.c + mathutils_Matrix.c + mathutils_Quaternion.c + mathutils_Vector.c mathutils_geometry.c - mathutils_matrix.c - mathutils_quat.c - mathutils_vector.c - noise.c + noise_py_api.c py_capi_utils.c IDProp.h @@ -48,13 +48,15 @@ set(SRC blf_py_api.h bpy_internal_import.h mathutils.h - mathutils_color.h - mathutils_euler.h + mathutils_Color.h + mathutils_Euler.h + mathutils_Matrix.h + mathutils_Quaternion.h + mathutils_Vector.h mathutils_geometry.h - mathutils_matrix.h - mathutils_quat.h - mathutils_vector.h + noise_py_api.h py_capi_utils.h ) + blender_add_lib(bf_python_ext "${SRC}" "${INC}") diff --git a/source/blender/python/generic/IDProp.c b/source/blender/python/generic/IDProp.c index ad0c96afa17..8004af95050 100644 --- a/source/blender/python/generic/IDProp.c +++ b/source/blender/python/generic/IDProp.c @@ -23,6 +23,8 @@ * ***** END GPL LICENSE BLOCK ***** */ +#include <Python.h> + #include "IDProp.h" #include "MEM_guardedalloc.h" diff --git a/source/blender/python/generic/IDProp.h b/source/blender/python/generic/IDProp.h index cd5bff4788e..b0a3b894f08 100644 --- a/source/blender/python/generic/IDProp.h +++ b/source/blender/python/generic/IDProp.h @@ -22,7 +22,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#include <Python.h> +#ifndef IDPROP_H +#define IDPROP_H struct ID; struct IDProperty; @@ -62,3 +63,5 @@ void IDProp_Init_Types(void); #define IDPROP_ITER_KEYS 0 #define IDPROP_ITER_ITEMS 1 + +#endif /* IDPROP_H */ diff --git a/source/blender/python/generic/bgl.c b/source/blender/python/generic/bgl.c index 2b15a6f4826..63d310ae4e0 100644 --- a/source/blender/python/generic/bgl.c +++ b/source/blender/python/generic/bgl.c @@ -31,6 +31,8 @@ * The BGL submodule "wraps" OpenGL functions and constants, * allowing script writers to make OpenGL calls in their Python scripts. */ +#include <Python.h> + #include "bgl.h" /*This must come first */ #include <GL/glew.h> #include "MEM_guardedalloc.h" @@ -38,7 +40,6 @@ #include "BLI_utildefines.h" - static char Method_Buffer_doc[] = "(type, dimensions, [template]) - Create a new Buffer object\n\n\ (type) - The format to store data in\n\ diff --git a/source/blender/python/generic/bgl.h b/source/blender/python/generic/bgl.h index 049b3f101a0..48462bc108e 100644 --- a/source/blender/python/generic/bgl.h +++ b/source/blender/python/generic/bgl.h @@ -36,8 +36,6 @@ #ifndef BGL_H #define BGL_H -#include <Python.h> - PyObject *BPyInit_bgl(void); /*@ Create a buffer object */ diff --git a/source/blender/python/generic/mathutils.c b/source/blender/python/generic/mathutils.c index f56ac6c61bf..0098335169b 100644 --- a/source/blender/python/generic/mathutils.c +++ b/source/blender/python/generic/mathutils.c @@ -87,6 +87,8 @@ * - geometry.BarycentricTransform -> barycentric_transform */ +#include <Python.h> + #include "mathutils.h" #include "BLI_math.h" diff --git a/source/blender/python/generic/mathutils.h b/source/blender/python/generic/mathutils.h index 07342f8144b..8442b66a1db 100644 --- a/source/blender/python/generic/mathutils.h +++ b/source/blender/python/generic/mathutils.h @@ -31,8 +31,6 @@ #ifndef MATHUTILS_H #define MATHUTILS_H -#include <Python.h> - /* Can cast different mathutils types to this, use for generic funcs */ extern char BaseMathObject_Wrapped_doc[]; @@ -50,11 +48,11 @@ typedef struct { BASE_MATH_MEMBERS(data) } BaseMathObject; -#include "mathutils_vector.h" -#include "mathutils_matrix.h" -#include "mathutils_quat.h" -#include "mathutils_euler.h" -#include "mathutils_color.h" +#include "mathutils_Vector.h" +#include "mathutils_Matrix.h" +#include "mathutils_Quaternion.h" +#include "mathutils_Euler.h" +#include "mathutils_Color.h" #include "mathutils_geometry.h" PyObject *BaseMathObject_getOwner( BaseMathObject * self, void * ); diff --git a/source/blender/python/generic/mathutils_color.c b/source/blender/python/generic/mathutils_Color.c index f7e62242703..1c870ead438 100644 --- a/source/blender/python/generic/mathutils_color.c +++ b/source/blender/python/generic/mathutils_Color.c @@ -22,13 +22,13 @@ * ***** END GPL LICENSE BLOCK ***** */ +#include <Python.h> + #include "mathutils.h" #include "BLI_math.h" #include "BLI_utildefines.h" - - #define COLOR_SIZE 3 //----------------------------------mathutils.Color() ------------------- diff --git a/source/blender/python/generic/mathutils_color.h b/source/blender/python/generic/mathutils_Color.h index f3f185b2991..619cccbe085 100644 --- a/source/blender/python/generic/mathutils_color.h +++ b/source/blender/python/generic/mathutils_Color.h @@ -31,8 +31,6 @@ #ifndef MATHUTILS_COLOR_H #define MATHUTILS_COLOR_H -#include <Python.h> - extern PyTypeObject color_Type; #define ColorObject_Check(_v) PyObject_TypeCheck((_v), &color_Type) diff --git a/source/blender/python/generic/mathutils_euler.c b/source/blender/python/generic/mathutils_Euler.c index b6040274065..c42387f77fb 100644 --- a/source/blender/python/generic/mathutils_euler.c +++ b/source/blender/python/generic/mathutils_Euler.c @@ -26,13 +26,13 @@ * ***** END GPL LICENSE BLOCK ***** */ +#include <Python.h> + #include "mathutils.h" #include "BLI_math.h" #include "BLI_utildefines.h" - - #ifndef int32_t #include "BLO_sys_types.h" #endif diff --git a/source/blender/python/generic/mathutils_euler.h b/source/blender/python/generic/mathutils_Euler.h index fc4e4ddb667..1bb26ec21d2 100644 --- a/source/blender/python/generic/mathutils_euler.h +++ b/source/blender/python/generic/mathutils_Euler.h @@ -31,8 +31,6 @@ #ifndef MATHUTILS_EULER_H #define MATHUTILS_EULER_H -#include <Python.h> - extern PyTypeObject euler_Type; #define EulerObject_Check(_v) PyObject_TypeCheck((_v), &euler_Type) diff --git a/source/blender/python/generic/mathutils_matrix.c b/source/blender/python/generic/mathutils_Matrix.c index 1da8141eef1..87979af61b7 100644 --- a/source/blender/python/generic/mathutils_matrix.c +++ b/source/blender/python/generic/mathutils_Matrix.c @@ -25,6 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ +#include <Python.h> + #include "mathutils.h" #include "BLI_math.h" diff --git a/source/blender/python/generic/mathutils_matrix.h b/source/blender/python/generic/mathutils_Matrix.h index 7b980222048..505a7253f1a 100644 --- a/source/blender/python/generic/mathutils_matrix.h +++ b/source/blender/python/generic/mathutils_Matrix.h @@ -30,8 +30,6 @@ #ifndef MATHUTILS_MATRIX_H #define MATHUTILS_MATRIX_H -#include <Python.h> - extern PyTypeObject matrix_Type; #define MatrixObject_Check(_v) PyObject_TypeCheck((_v), &matrix_Type) #define MATRIX_MAX_DIM 4 diff --git a/source/blender/python/generic/mathutils_quat.c b/source/blender/python/generic/mathutils_Quaternion.c index e577d808091..d4affd05abf 100644 --- a/source/blender/python/generic/mathutils_quat.c +++ b/source/blender/python/generic/mathutils_Quaternion.c @@ -26,6 +26,8 @@ * ***** END GPL LICENSE BLOCK ***** */ +#include <Python.h> + #include "mathutils.h" #include "BLI_math.h" diff --git a/source/blender/python/generic/mathutils_quat.h b/source/blender/python/generic/mathutils_Quaternion.h index cfa82f20d42..6052dfa1a41 100644 --- a/source/blender/python/generic/mathutils_quat.h +++ b/source/blender/python/generic/mathutils_Quaternion.h @@ -31,8 +31,6 @@ #ifndef MATHUTILS_QUAT_H #define MATHUTILS_QUAT_H -#include <Python.h> - extern PyTypeObject quaternion_Type; #define QuaternionObject_Check(_v) PyObject_TypeCheck((_v), &quaternion_Type) diff --git a/source/blender/python/generic/mathutils_vector.c b/source/blender/python/generic/mathutils_Vector.c index 0da5fe983ad..0efd805697f 100644 --- a/source/blender/python/generic/mathutils_vector.c +++ b/source/blender/python/generic/mathutils_Vector.c @@ -25,6 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ +#include <Python.h> + #include "mathutils.h" #include "BLI_blenlib.h" diff --git a/source/blender/python/generic/mathutils_vector.h b/source/blender/python/generic/mathutils_Vector.h index 2dbe9d9d3fe..4013a392ff9 100644 --- a/source/blender/python/generic/mathutils_vector.h +++ b/source/blender/python/generic/mathutils_Vector.h @@ -31,8 +31,6 @@ #ifndef MATHUTILS_VECTOR_H #define MATHUTILS_VECTOR_H -#include <Python.h> - extern PyTypeObject vector_Type; #define VectorObject_Check(_v) PyObject_TypeCheck((_v), &vector_Type) diff --git a/source/blender/python/generic/mathutils_geometry.c b/source/blender/python/generic/mathutils_geometry.c index d1e9a2452f3..62867eb46c1 100644 --- a/source/blender/python/generic/mathutils_geometry.c +++ b/source/blender/python/generic/mathutils_geometry.c @@ -27,6 +27,8 @@ * ***** END GPL LICENSE BLOCK ***** */ +#include <Python.h> + #include "mathutils_geometry.h" /* Used for PolyFill */ diff --git a/source/blender/python/generic/mathutils_geometry.h b/source/blender/python/generic/mathutils_geometry.h index 27c24848efe..1af25c7a751 100644 --- a/source/blender/python/generic/mathutils_geometry.h +++ b/source/blender/python/generic/mathutils_geometry.h @@ -31,7 +31,6 @@ #ifndef MATHUTILS_GEOMETRY_H #define MATHUTILS_GEOMETRY_H -#include <Python.h> #include "mathutils.h" PyMODINIT_FUNC BPyInit_mathutils_geometry(void); diff --git a/source/blender/python/generic/noise.c b/source/blender/python/generic/noise_py_api.c index 36147493dc5..73818971564 100644 --- a/source/blender/python/generic/noise.c +++ b/source/blender/python/generic/noise_py_api.c @@ -35,6 +35,7 @@ /************************/ #include <Python.h> + #include "structseq.h" #include "BLI_blenlib.h" @@ -42,6 +43,7 @@ #include "DNA_texture_types.h" +#include "noise_py_api.h" /*-----------------------------------------*/ /* 'mersenne twister' random number generator */ diff --git a/source/blender/python/generic/noise_py_api.h b/source/blender/python/generic/noise_py_api.h new file mode 100644 index 00000000000..d1fe8ccc7b8 --- /dev/null +++ b/source/blender/python/generic/noise_py_api.h @@ -0,0 +1,29 @@ +/** + * $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. + * + * Contributor(s): Campbell Barton + * + * ***** END GPL LICENSE BLOCK ***** + */ +#ifndef NOISE_PY_API_H +#define NOISE_PY_API_H + +PyObject *BPyInit_noise(void); + +#endif // NOISE_PY_API_H diff --git a/source/blender/python/generic/py_capi_utils.c b/source/blender/python/generic/py_capi_utils.c index 9f7a9f2cabe..dedd6c1bcf4 100644 --- a/source/blender/python/generic/py_capi_utils.c +++ b/source/blender/python/generic/py_capi_utils.c @@ -21,6 +21,7 @@ */ #include <Python.h> + #include "py_capi_utils.h" /* for debugging */ |