Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-04-15 18:54:15 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-04-15 18:54:15 +0400
commit6520aa97a93e2438ddb739b2b990061ed18ab1d7 (patch)
tree661662ab9cf2b71cb245ae5f0c8f70c3dc71a687 /source/blender/python/mathutils
parent24286ba5bd75b29ce454b85585272b7741c7d6c3 (diff)
add 'idprop' module so we can document idprop.types.*, currently doc generator has no access to ID Property types.
Diffstat (limited to 'source/blender/python/mathutils')
-rw-r--r--source/blender/python/mathutils/mathutils.c28
-rw-r--r--source/blender/python/mathutils/mathutils_Color.c2
-rw-r--r--source/blender/python/mathutils/mathutils_Euler.c2
-rw-r--r--source/blender/python/mathutils/mathutils_Matrix.c2
-rw-r--r--source/blender/python/mathutils/mathutils_Quaternion.c2
-rw-r--r--source/blender/python/mathutils/mathutils_Vector.c2
6 files changed, 19 insertions, 19 deletions
diff --git a/source/blender/python/mathutils/mathutils.c b/source/blender/python/mathutils/mathutils.c
index 5ae58973602..f78050a7639 100644
--- a/source/blender/python/mathutils/mathutils.c
+++ b/source/blender/python/mathutils/mathutils.c
@@ -433,8 +433,8 @@ static struct PyModuleDef M_Mathutils_module_def = {
PyMODINIT_FUNC PyInit_mathutils(void)
{
+ PyObject *mod;
PyObject *submodule;
- PyObject *item;
PyObject *sys_modules = PyThreadState_GET()->interp->modules;
if (PyType_Ready(&vector_Type) < 0)
@@ -450,31 +450,31 @@ PyMODINIT_FUNC PyInit_mathutils(void)
if (PyType_Ready(&color_Type) < 0)
return NULL;
- submodule = PyModule_Create(&M_Mathutils_module_def);
+ mod = PyModule_Create(&M_Mathutils_module_def);
/* each type has its own new() function */
- PyModule_AddObject(submodule, "Vector", (PyObject *)&vector_Type);
- PyModule_AddObject(submodule, "Matrix", (PyObject *)&matrix_Type);
- PyModule_AddObject(submodule, "Euler", (PyObject *)&euler_Type);
- PyModule_AddObject(submodule, "Quaternion", (PyObject *)&quaternion_Type);
- PyModule_AddObject(submodule, "Color", (PyObject *)&color_Type);
+ PyModule_AddObject(mod, vector_Type.tp_name, (PyObject *)&vector_Type);
+ PyModule_AddObject(mod, matrix_Type.tp_name, (PyObject *)&matrix_Type);
+ PyModule_AddObject(mod, euler_Type.tp_name, (PyObject *)&euler_Type);
+ PyModule_AddObject(mod, quaternion_Type.tp_name, (PyObject *)&quaternion_Type);
+ PyModule_AddObject(mod, color_Type.tp_name, (PyObject *)&color_Type);
/* submodule */
- PyModule_AddObject(submodule, "geometry", (item = PyInit_mathutils_geometry()));
+ PyModule_AddObject(mod, "geometry", (submodule = PyInit_mathutils_geometry()));
/* XXX, python doesnt do imports with this usefully yet
* 'from mathutils.geometry import PolyFill'
* ...fails without this. */
- PyDict_SetItemString(sys_modules, "mathutils.geometry", item);
- Py_INCREF(item);
+ PyDict_SetItemString(sys_modules, PyModule_GetName(submodule), submodule);
+ Py_INCREF(submodule);
/* Noise submodule */
- PyModule_AddObject(submodule, "noise", (item = PyInit_mathutils_noise()));
- PyDict_SetItemString(sys_modules, "mathutils.noise", item);
- Py_INCREF(item);
+ PyModule_AddObject(mod, "noise", (submodule = PyInit_mathutils_noise()));
+ PyDict_SetItemString(sys_modules, PyModule_GetName(submodule), submodule);
+ Py_INCREF(submodule);
mathutils_matrix_row_cb_index = Mathutils_RegisterCallback(&mathutils_matrix_row_cb);
mathutils_matrix_col_cb_index = Mathutils_RegisterCallback(&mathutils_matrix_col_cb);
mathutils_matrix_translation_cb_index = Mathutils_RegisterCallback(&mathutils_matrix_translation_cb);
- return submodule;
+ return mod;
}
diff --git a/source/blender/python/mathutils/mathutils_Color.c b/source/blender/python/mathutils/mathutils_Color.c
index 9b06214b8ec..fc8b2886f37 100644
--- a/source/blender/python/mathutils/mathutils_Color.c
+++ b/source/blender/python/mathutils/mathutils_Color.c
@@ -807,7 +807,7 @@ PyDoc_STRVAR(color_doc,
);
PyTypeObject color_Type = {
PyVarObject_HEAD_INIT(NULL, 0)
- "mathutils.Color", //tp_name
+ "Color", //tp_name
sizeof(ColorObject), //tp_basicsize
0, //tp_itemsize
(destructor)BaseMathObject_dealloc, //tp_dealloc
diff --git a/source/blender/python/mathutils/mathutils_Euler.c b/source/blender/python/mathutils/mathutils_Euler.c
index 4e3b5f8d52e..a663bd71130 100644
--- a/source/blender/python/mathutils/mathutils_Euler.c
+++ b/source/blender/python/mathutils/mathutils_Euler.c
@@ -650,7 +650,7 @@ PyDoc_STRVAR(euler_doc,
);
PyTypeObject euler_Type = {
PyVarObject_HEAD_INIT(NULL, 0)
- "mathutils.Euler", //tp_name
+ "Euler", //tp_name
sizeof(EulerObject), //tp_basicsize
0, //tp_itemsize
(destructor)BaseMathObject_dealloc, //tp_dealloc
diff --git a/source/blender/python/mathutils/mathutils_Matrix.c b/source/blender/python/mathutils/mathutils_Matrix.c
index bd37b645cbb..a48e7ed854d 100644
--- a/source/blender/python/mathutils/mathutils_Matrix.c
+++ b/source/blender/python/mathutils/mathutils_Matrix.c
@@ -2316,7 +2316,7 @@ PyDoc_STRVAR(matrix_doc,
);
PyTypeObject matrix_Type = {
PyVarObject_HEAD_INIT(NULL, 0)
- "mathutils.Matrix", /*tp_name*/
+ "Matrix", /*tp_name*/
sizeof(MatrixObject), /*tp_basicsize*/
0, /*tp_itemsize*/
(destructor)BaseMathObject_dealloc, /*tp_dealloc*/
diff --git a/source/blender/python/mathutils/mathutils_Quaternion.c b/source/blender/python/mathutils/mathutils_Quaternion.c
index 2a1cef5a241..d1da4660f3b 100644
--- a/source/blender/python/mathutils/mathutils_Quaternion.c
+++ b/source/blender/python/mathutils/mathutils_Quaternion.c
@@ -1192,7 +1192,7 @@ PyDoc_STRVAR(quaternion_doc,
);
PyTypeObject quaternion_Type = {
PyVarObject_HEAD_INIT(NULL, 0)
- "mathutils.Quaternion", //tp_name
+ "Quaternion", //tp_name
sizeof(QuaternionObject), //tp_basicsize
0, //tp_itemsize
(destructor)BaseMathObject_dealloc, //tp_dealloc
diff --git a/source/blender/python/mathutils/mathutils_Vector.c b/source/blender/python/mathutils/mathutils_Vector.c
index 17fa9cdd802..07bda4c2b91 100644
--- a/source/blender/python/mathutils/mathutils_Vector.c
+++ b/source/blender/python/mathutils/mathutils_Vector.c
@@ -2791,7 +2791,7 @@ PyDoc_STRVAR(vector_doc,
PyTypeObject vector_Type = {
PyVarObject_HEAD_INIT(NULL, 0)
/* For printing, in format "<module>.<name>" */
- "mathutils.Vector", /* char *tp_name; */
+ "Vector", /* char *tp_name; */
sizeof(VectorObject), /* int tp_basicsize; */
0, /* tp_itemsize; For allocation */