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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2014-06-16 05:11:37 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2014-06-16 05:12:52 +0400
commit8365cebe32089dc1dc962a42361ceea936ffe82d (patch)
tree668e3fca1df7ac8b7e4b6735ab51904dc2ac9d17 /source/blender/freestyle/intern/python
parent840891e22a12c7bbb7c3b8d086ef0c6ff11a24d9 (diff)
Freestyle: Python API docstring updates.
Diffstat (limited to 'source/blender/freestyle/intern/python')
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp14
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp33
2 files changed, 36 insertions, 11 deletions
diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp
index 9deaf1ac364..2427953b527 100644
--- a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp
@@ -287,13 +287,13 @@ static PyObject *Stroke_stroke_vertices_end(BPy_Stroke *self)
}
PyDoc_STRVAR(Stroke_reversed_doc,
- ".. method:: __reversed__()\n"
- "\n"
- " Returns a StrokeVertexIterator iterating over the vertices of the Stroke\n"
- " in the reversed order (from the last to the first).\n"
- "\n"
- " :return: A StrokeVertexIterator pointing after the last StrokeVertex.\n"
- " :rtype: :class:`StrokeVertexIterator`");
+".. method:: __reversed__()\n"
+"\n"
+" Returns a StrokeVertexIterator iterating over the vertices of the Stroke\n"
+" in the reversed order (from the last to the first).\n"
+"\n"
+" :return: A StrokeVertexIterator pointing after the last StrokeVertex.\n"
+" :rtype: :class:`StrokeVertexIterator`");
static PyObject *Stroke_reversed(BPy_Stroke *self)
{
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp
index a17ad0e39d8..63a2541d865 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp
@@ -49,7 +49,7 @@ PyDoc_STRVAR(StrokeVertexIterator_doc,
"specialized StrokeVertex type. In this case, one should use a\n"
"StrokeVertexIterator. To call functions of the UnaryFuntion0D type,\n"
"a StrokeVertexIterator can be converted to an Interface0DIterator by\n"
-"by calling Interface0DIterator(it)."
+"by calling Interface0DIterator(it).\n"
"\n"
".. method:: __init__()\n"
"\n"
@@ -137,6 +137,14 @@ static PyObject *StrokeVertexIterator_iternext(BPy_StrokeVertexIterator *self)
/*----------------------StrokeVertexIterator methods ----------------------------*/
+PyDoc_STRVAR(StrokeVertexIterator_incremented_doc,
+".. method:: incremented()\n"
+"\n"
+" Returns a copy of an incremented StrokeVertexIterator.\n"
+"\n"
+" :return: A StrokeVertexIterator pointing the next StrokeVertex.\n"
+" :rtype: :class:`StrokeVertexIterator`");
+
static PyObject *StrokeVertexIterator_incremented(BPy_StrokeVertexIterator *self)
{
if (self->sv_it->isEnd()) {
@@ -148,6 +156,14 @@ static PyObject *StrokeVertexIterator_incremented(BPy_StrokeVertexIterator *self
return BPy_StrokeVertexIterator_from_StrokeVertexIterator(*copy, self->reversed);
}
+PyDoc_STRVAR(StrokeVertexIterator_decremented_doc,
+".. method:: decremented()\n"
+"\n"
+" Returns a copy of a decremented StrokeVertexIterator.\n"
+"\n"
+" :return: A StrokeVertexIterator pointing the previous StrokeVertex.\n"
+" :rtype: :class:`StrokeVertexIterator`");
+
static PyObject *StrokeVertexIterator_decremented(BPy_StrokeVertexIterator *self)
{
if (self->sv_it->isBegin()) {
@@ -160,6 +176,15 @@ static PyObject *StrokeVertexIterator_decremented(BPy_StrokeVertexIterator *self
return BPy_StrokeVertexIterator_from_StrokeVertexIterator(*copy, self->reversed);
}
+PyDoc_STRVAR(StrokeVertexIterator_reversed_doc,
+".. method:: reversed()\n"
+"\n"
+" Returns a StrokeVertexIterator that traverses stroke vertices in the\n"
+" reversed order.\n"
+"\n"
+" :return: A StrokeVertexIterator traversing stroke vertices backward.\n"
+" :rtype: :class:`StrokeVertexIterator`");
+
static PyObject *StrokeVertexIterator_reversed(BPy_StrokeVertexIterator *self)
{
StrokeInternal::StrokeVertexIterator *copy = new StrokeInternal::StrokeVertexIterator(*self->sv_it);
@@ -167,9 +192,9 @@ static PyObject *StrokeVertexIterator_reversed(BPy_StrokeVertexIterator *self)
}
static PyMethodDef BPy_StrokeVertexIterator_methods[] = {
- {"incremented", (PyCFunction) StrokeVertexIterator_incremented, METH_NOARGS, NULL},
- {"decremented", (PyCFunction) StrokeVertexIterator_decremented, METH_NOARGS, NULL},
- {"reversed", (PyCFunction) StrokeVertexIterator_reversed, METH_NOARGS, NULL},
+ {"incremented", (PyCFunction) StrokeVertexIterator_incremented, METH_NOARGS, StrokeVertexIterator_incremented_doc},
+ {"decremented", (PyCFunction)StrokeVertexIterator_decremented, METH_NOARGS, StrokeVertexIterator_decremented_doc},
+ {"reversed", (PyCFunction)StrokeVertexIterator_reversed, METH_NOARGS, StrokeVertexIterator_reversed_doc},
{NULL, NULL, 0, NULL}
};