diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-02-01 00:52:26 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-02-01 00:52:26 +0300 |
commit | fd3842f3a2b9f92fabec6268271429200b2713bd (patch) | |
tree | a5c408ce5260de6636b2581abb74a0fcdcd6bf0f /source/blender/python/generic | |
parent | 02c6d160d7332feaed3efd1a6378406966a25bb1 (diff) |
Mathutils doc improvements + other small things
- bpy.app moved into PyStructSequence (used by sys.float_info)
- added buildinfo into bpy.app.build_*
- bpy.ui removed (wasnt used)
- include external example files in Mathutils docs (only Mathutils and Vector are currently written)
- added support to auto document PyStructSequence's
- CMake had "'s inside all its strings.
Diffstat (limited to 'source/blender/python/generic')
-rw-r--r-- | source/blender/python/generic/BGL.c | 2 | ||||
-rw-r--r-- | source/blender/python/generic/BGL.h | 1 | ||||
-rw-r--r-- | source/blender/python/generic/CMakeLists.txt | 34 | ||||
-rw-r--r-- | source/blender/python/generic/Mathutils.c | 5 | ||||
-rw-r--r-- | source/blender/python/generic/euler.c | 5 | ||||
-rw-r--r-- | source/blender/python/generic/matrix.c | 5 | ||||
-rw-r--r-- | source/blender/python/generic/quat.c | 5 | ||||
-rw-r--r-- | source/blender/python/generic/vector.c | 5 |
8 files changed, 55 insertions, 7 deletions
diff --git a/source/blender/python/generic/BGL.c b/source/blender/python/generic/BGL.c index 767af8e0836..a0eb050341f 100644 --- a/source/blender/python/generic/BGL.c +++ b/source/blender/python/generic/BGL.c @@ -33,7 +33,7 @@ * allowing script writers to make OpenGL calls in their Python scripts. */ #include "BGL.h" /*This must come first */ - +#include <GL/glew.h> #include "MEM_guardedalloc.h" static int type_size( int type ); diff --git a/source/blender/python/generic/BGL.h b/source/blender/python/generic/BGL.h index 91f88549faf..d83a48445c9 100644 --- a/source/blender/python/generic/BGL.h +++ b/source/blender/python/generic/BGL.h @@ -41,7 +41,6 @@ #endif #include <Python.h> -#include <GL/glew.h> PyObject *BGL_Init(void); diff --git a/source/blender/python/generic/CMakeLists.txt b/source/blender/python/generic/CMakeLists.txt new file mode 100644 index 00000000000..da916ef33c7 --- /dev/null +++ b/source/blender/python/generic/CMakeLists.txt @@ -0,0 +1,34 @@ +# ***** 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 ***** + +FILE(GLOB SRC *.c) + +SET(INC + . + ../../blenlib + ../../makesdna + ../../blenkernel + ../../editors/include + ../../../../intern/guardedalloc + ../../../../extern/glew/include + ${PYTHON_INC} +) + +BLENDERLIB(bf_gen_python "${SRC}" "${INC}") diff --git a/source/blender/python/generic/Mathutils.c b/source/blender/python/generic/Mathutils.c index fa2c60813ed..cc8ced2d2db 100644 --- a/source/blender/python/generic/Mathutils.c +++ b/source/blender/python/generic/Mathutils.c @@ -54,7 +54,10 @@ #include "BKE_utildefines.h" //-------------------------DOC STRINGS --------------------------- -static char M_Mathutils_doc[] = "This module provides access to matrices, eulers, quaternions and vectors."; +static char M_Mathutils_doc[] = +"This module provides access to matrices, eulers, quaternions and vectors.\n" +"\n" +".. literalinclude:: ../examples/mathutils.py\n"; //-----------------------------METHODS---------------------------- //-----------------quat_rotation (internal)----------- diff --git a/source/blender/python/generic/euler.c b/source/blender/python/generic/euler.c index c41107286e0..2ba3d1d7675 100644 --- a/source/blender/python/generic/euler.c +++ b/source/blender/python/generic/euler.c @@ -591,7 +591,10 @@ static struct PyMethodDef Euler_methods[] = { }; //------------------PY_OBECT DEFINITION-------------------------- -static char euler_doc[] = "This object gives access to Eulers in Blender."; +static char euler_doc[] = +"This object gives access to Eulers in Blender.\n" +"\n" +".. literalinclude:: ../examples/mathutils_euler.py\n"; PyTypeObject euler_Type = { PyVarObject_HEAD_INIT(NULL, 0) diff --git a/source/blender/python/generic/matrix.c b/source/blender/python/generic/matrix.c index af754e532a9..181004929ff 100644 --- a/source/blender/python/generic/matrix.c +++ b/source/blender/python/generic/matrix.c @@ -1280,7 +1280,10 @@ static struct PyMethodDef Matrix_methods[] = { }; /*------------------PY_OBECT DEFINITION--------------------------*/ -static char matrix_doc[] = "This object gives access to Matrices in Blender."; +static char matrix_doc[] = +"This object gives access to Matrices in Blender.\n" +"\n" +".. literalinclude:: ../examples/mathutils_matrix.py\n"; PyTypeObject matrix_Type = { PyVarObject_HEAD_INIT(NULL, 0) diff --git a/source/blender/python/generic/quat.c b/source/blender/python/generic/quat.c index 33d35da5175..54172537e26 100644 --- a/source/blender/python/generic/quat.c +++ b/source/blender/python/generic/quat.c @@ -860,7 +860,10 @@ static PyGetSetDef Quaternion_getseters[] = { }; //------------------PY_OBECT DEFINITION-------------------------- -static char quaternion_doc[] = "This object gives access to Quaternions in Blender."; +static char quaternion_doc[] = +"This object gives access to Quaternions in Blender.\n" +"\n" +".. literalinclude:: ../examples/mathutils_quat.py\n"; PyTypeObject quaternion_Type = { PyVarObject_HEAD_INIT(NULL, 0) diff --git a/source/blender/python/generic/vector.c b/source/blender/python/generic/vector.c index 4efd168eb87..a8452773012 100644 --- a/source/blender/python/generic/vector.c +++ b/source/blender/python/generic/vector.c @@ -2110,7 +2110,10 @@ static struct PyMethodDef Vector_methods[] = { vec*mat and mat*vec both get sent to Vector_mul and it neesd to sort out the order */ -static char vector_doc[] = "This object gives access to Vectors in Blender."; +static char vector_doc[] = +"This object gives access to Vectors in Blender.\n" +"\n" +".. literalinclude:: ../examples/mathutils_vector.py\n"; PyTypeObject vector_Type = { PyVarObject_HEAD_INIT(NULL, 0) |