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>2020-04-01 03:28:05 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-04-01 03:30:08 +0300
commit6a1f0c1eaafee3b96563b84e48547ec6ec655fc3 (patch)
tree383ef4dd3fbebc6e45c9688f3d6f6425308a600b /source/blender/python
parent2d39e46f84ffd28892deb6a93f099c051d16c95f (diff)
Cleanup: use doxy sections for 'idprop' API
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/generic/idprop_py_api.c71
1 files changed, 58 insertions, 13 deletions
diff --git a/source/blender/python/generic/idprop_py_api.c b/source/blender/python/generic/idprop_py_api.c
index ae9ffe4f3b8..cabeeba18b9 100644
--- a/source/blender/python/generic/idprop_py_api.c
+++ b/source/blender/python/generic/idprop_py_api.c
@@ -40,11 +40,11 @@ extern bool pyrna_id_FromPyObject(PyObject *obj, ID **id);
extern PyObject *pyrna_id_CreatePyObject(ID *id);
extern bool pyrna_id_CheckPyObject(PyObject *obj);
-/*********************** ID Property Main Wrapper Stuff ***************/
-
-/* ----------------------------------------------------------------------------
- * static conversion functions to avoid duplicate code, no type checking.
- */
+/* -------------------------------------------------------------------- */
+/** \name Python from ID-Property (Internal Conversions)
+ *
+ * Low level conversion to avoid duplicate code, no type checking.
+ * \{ */
static PyObject *idprop_py_from_idp_string(const IDProperty *prop)
{
@@ -124,7 +124,11 @@ static PyObject *idprop_py_from_idp_idparray(ID *id, IDProperty *prop)
return seq;
}
-/* -------------------------------------------------------------------------- */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name IDProp Group Access
+ * \{ */
/* use for both array and group */
static Py_hash_t BPy_IDGroup_hash(BPy_IDProperty *self)
@@ -374,7 +378,11 @@ static const char *idp_try_read_name(PyObject *name_obj)
return name;
}
-/* -------------------------------------------------------------------------- */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name ID-Property from Python (Internal Conversions)
+ * \{ */
/**
* The 'idp_from_Py*' functions expect that the input type has been checked before
@@ -658,7 +666,12 @@ static IDProperty *idp_from_PyObject(PyObject *name_obj, PyObject *ob)
}
}
-/* -------------------------------------------------------------------------- */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Mapping Get/Set (Internal Access)
+ * \{ */
+
/**
* \note group can be a pointer array or a group.
* assume we already checked key is a string.
@@ -862,6 +875,12 @@ static PyObject *BPy_IDGroup_MapDataToPy(IDProperty *prop)
return NULL;
}
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name ID-Property Group Methods
+ * \{ */
+
PyDoc_STRVAR(
BPy_IDGroup_pop_doc,
".. method:: pop(key, default)\n"
@@ -1142,6 +1161,12 @@ static struct PyMethodDef BPy_IDGroup_methods[] = {
{NULL, NULL, 0, NULL},
};
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name ID-Property Group Type
+ * \{ */
+
static PySequenceMethods BPy_IDGroup_Seq = {
(lenfunc)BPy_IDGroup_Map_Len, /* lenfunc sq_length */
NULL, /* binaryfunc sq_concat */
@@ -1223,7 +1248,11 @@ PyTypeObject BPy_IDGroup_Type = {
BPy_IDGroup_getseters, /* struct PyGetSetDef *tp_getset; */
};
-/********Array Wrapper********/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name ID Array Methods
+ * \{ */
static PyTypeObject *idp_array_py_type(BPy_IDArray *self, bool *r_is_double)
{
@@ -1567,6 +1596,10 @@ static PyBufferProcs BPy_IDArray_Buffer = {
(releasebufferproc)BPy_IDArray_releasebuffer,
};
+/* -------------------------------------------------------------------- */
+/** \name ID Array Type
+ * \{ */
+
PyTypeObject BPy_IDArray_Type = {
PyVarObject_HEAD_INIT(NULL, 0)
/* For printing, in format "<module>.<name>" */
@@ -1648,7 +1681,11 @@ PyTypeObject BPy_IDArray_Type = {
NULL,
};
-/*********** ID Property Group iterator ********/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name ID-Property Group Iterator Type
+ * \{ */
static PyObject *IDGroup_Iter_repr(BPy_IDGroup_Iter *self)
{
@@ -1746,9 +1783,11 @@ void IDProp_Init_Types(void)
PyType_Ready(&BPy_IDArray_Type);
}
-/*----------------------------MODULE INIT-------------------------*/
+/** \} */
-/* --- */
+/* -------------------------------------------------------------------- */
+/** \name Public Module 'idprop.types'
+ * \{ */
static struct PyModuleDef IDProp_types_module_def = {
PyModuleDef_HEAD_INIT,
@@ -1784,7 +1823,11 @@ static PyObject *BPyInit_idprop_types(void)
return submodule;
}
-/* --- */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Public Module 'idprop'
+ * \{ */
static PyMethodDef IDProp_methods[] = {
{NULL, NULL, 0, NULL},
@@ -1818,3 +1861,5 @@ PyObject *BPyInit_idprop(void)
return mod;
}
+
+/** \} */