move geometry python module into mathutils.geometry, since it provides utility functions using mathutils types.
This commit is contained in:
@@ -34,10 +34,10 @@ SET(SRC
|
||||
bgl.c
|
||||
blf_api.c
|
||||
bpy_internal_import.c
|
||||
geometry.c
|
||||
mathutils.c
|
||||
mathutils_color.c
|
||||
mathutils_euler.c
|
||||
mathutils_geometry.c
|
||||
mathutils_matrix.c
|
||||
mathutils_quat.c
|
||||
mathutils_vector.c
|
||||
|
@@ -249,6 +249,8 @@ PyObject *Mathutils_Init(void)
|
||||
{
|
||||
PyObject *submodule;
|
||||
|
||||
|
||||
|
||||
if( PyType_Ready( &vector_Type ) < 0 )
|
||||
return NULL;
|
||||
if( PyType_Ready( &matrix_Type ) < 0 )
|
||||
@@ -270,6 +272,9 @@ PyObject *Mathutils_Init(void)
|
||||
PyModule_AddObject( submodule, "Quaternion", (PyObject *)&quaternion_Type );
|
||||
PyModule_AddObject( submodule, "Color", (PyObject *)&color_Type );
|
||||
|
||||
/* submodule */
|
||||
PyModule_AddObject( submodule, "geometry", Geometry_Init());
|
||||
|
||||
mathutils_matrix_vector_cb_index= Mathutils_RegisterCallback(&mathutils_matrix_vector_cb);
|
||||
|
||||
return (submodule);
|
||||
|
@@ -55,6 +55,7 @@ typedef struct {
|
||||
#include "mathutils_quat.h"
|
||||
#include "mathutils_euler.h"
|
||||
#include "mathutils_color.h"
|
||||
#include "mathutils_geometry.h"
|
||||
|
||||
PyObject *BaseMathObject_getOwner( BaseMathObject * self, void * );
|
||||
PyObject *BaseMathObject_getWrapped( BaseMathObject *self, void * );
|
||||
|
@@ -27,7 +27,7 @@
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
#include "geometry.h"
|
||||
#include "mathutils_geometry.h"
|
||||
|
||||
/* Used for PolyFill */
|
||||
#include "BKE_displist.h"
|
||||
@@ -819,7 +819,7 @@ struct PyMethodDef M_Geometry_methods[] = {
|
||||
|
||||
static struct PyModuleDef M_Geometry_module_def = {
|
||||
PyModuleDef_HEAD_INIT,
|
||||
"geometry", /* m_name */
|
||||
"mathutils.geometry", /* m_name */
|
||||
M_Geometry_doc, /* m_doc */
|
||||
0, /* m_size */
|
||||
M_Geometry_methods, /* m_methods */
|
@@ -38,7 +38,7 @@
|
||||
#include "BKE_utildefines.h"
|
||||
|
||||
/* external util modules */
|
||||
#include "../generic/geometry.h"
|
||||
#include "../generic/mathutils.h"
|
||||
#include "../generic/bgl.h"
|
||||
#include "../generic/blf_api.h"
|
||||
#include "../generic/IDProp.h"
|
||||
@@ -195,7 +195,6 @@ void BPy_init_modules( void )
|
||||
printf("bpy: couldnt find 'scripts/modules', blender probably wont start.\n");
|
||||
}
|
||||
/* stand alone utility modules not related to blender directly */
|
||||
Geometry_Init();
|
||||
Mathutils_Init();
|
||||
Noise_Init();
|
||||
BGL_Init();
|
||||
|
Reference in New Issue
Block a user