diff options
author | Joseph Gilbert <ascotan@gmail.com> | 2004-02-29 16:20:34 +0300 |
---|---|---|
committer | Joseph Gilbert <ascotan@gmail.com> | 2004-02-29 16:20:34 +0300 |
commit | 8f3a9815baafb6f8fe00659cf6390a8c4092ef8b (patch) | |
tree | 9a69af7bffd6fd0d7da8e998d74a37dc273628a2 /source/blender/python/api2_2x/Types.c | |
parent | 2255ac3b19ec3b2aa0e884ad5960f34c9c0efa23 (diff) |
Mathutils library for the python API
- support for quaternions, euler, vector, matrix operations.
- euler supports unique rotation calculation
- new matrix memory construction and internal functions
- quaternion slerp and diff calculation
- 2d, 3d, 4d vector construction and handling
- full conversion support between types
- update to object/window to reflect to matrix type
- update to types/blender/module to reflect new module
Diffstat (limited to 'source/blender/python/api2_2x/Types.c')
-rw-r--r-- | source/blender/python/api2_2x/Types.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/python/api2_2x/Types.c b/source/blender/python/api2_2x/Types.c index 0a45ceb89df..0bcf6b5afe0 100644 --- a/source/blender/python/api2_2x/Types.c +++ b/source/blender/python/api2_2x/Types.c @@ -24,13 +24,17 @@ * * This is a new part of Blender. * - * Contributor(s): Willian P. Germano, Alex Mole + * Contributor(s): Willian P. Germano, Alex Mole, Joseph Gilbert * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ #include "Types.h" +char M_Types_doc[] = +"The Blender Types module\n\n\ +This module is a dictionary of all Blender Python types"; + struct PyMethodDef Null_methods[] = {{NULL, NULL}}; /*****************************************************************************/ @@ -44,7 +48,10 @@ PyObject *Types_Init (void) * do it now, we get an easy way to crash Blender. Maybe we'd better * have an Init function for all these internal types that more than one * module can use. We could call it after setting the Blender dictionary */ + matrix_Type.ob_type = &PyType_Type; vector_Type.ob_type = &PyType_Type; + euler_Type.ob_type = &PyType_Type; + quaternion_Type.ob_type = &PyType_Type; rgbTuple_Type.ob_type = &PyType_Type; constant_Type.ob_type = &PyType_Type; buffer_Type.ob_type = &PyType_Type; @@ -100,6 +107,9 @@ PyObject *Types_Init (void) PyDict_SetItemString(dict, "bufferType", (PyObject *)&buffer_Type); PyDict_SetItemString(dict, "constantType", (PyObject *)&constant_Type); PyDict_SetItemString(dict, "rgbTupleType", (PyObject *)&rgbTuple_Type); + PyDict_SetItemString(dict, "matrix_Type", (PyObject *)&matrix_Type); + PyDict_SetItemString(dict, "eulerType", (PyObject *)&euler_Type); + PyDict_SetItemString(dict, "quaternionType", (PyObject *)&quaternion_Type); PyDict_SetItemString(dict, "BezTripleType", (PyObject *)&BezTriple_Type); return submodule; |