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:
authorAaron Carlisle <Blendify>2020-10-23 00:20:57 +0300
committerAaron Carlisle <carlisle.b3d@gmail.com>2020-10-23 00:22:05 +0300
commitbaa24f1c91d21e10f51881f8fad012f30f99e26f (patch)
treee3872d6dd8d50ddb657d9610a2ce3b7a6a31bef9 /source/blender/freestyle/intern/python/Interface1D
parent956af161893f70198bd89d5ab338a24a011d30c2 (diff)
Pydoc: Fix sphinx compile warnings about freestyle
Sphinx expects functions and methods with the same name and different parameters to be written using one directive. See: https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html#basic-markup Unfortunately this makes giving different descriptions for each harder. This was already a request for better support for this in sphinx, see: https://github.com/sphinx-doc/sphinx/issues/7787 Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D9170
Diffstat (limited to 'source/blender/freestyle/intern/python/Interface1D')
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp13
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp14
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp28
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp32
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp14
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp14
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp14
7 files changed, 45 insertions, 84 deletions
diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp
index 187ab94360a..e04a89bad3b 100644
--- a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp
@@ -48,20 +48,13 @@ PyDoc_STRVAR(FEdge_doc,
"from one to the other.\n"
"\n"
".. method:: FEdge()\n"
+ " FEdge(brother)\n"
"\n"
- " Default constructor.\n"
- "\n"
- ".. method:: FEdge(brother)\n"
- "\n"
- " Copy constructor.\n"
+ " Builds an :class:`FEdge` using the default constructor,\n"
+ " copy constructor, or between two :class:`SVertex` objects.\n"
"\n"
" :arg brother: An FEdge object.\n"
" :type brother: :class:`FEdge`\n"
- "\n"
- ".. method:: FEdge(first_vertex, second_vertex)\n"
- "\n"
- " Builds an FEdge going from the first vertex to the second.\n"
- "\n"
" :arg first_vertex: The first SVertex.\n"
" :type first_vertex: :class:`SVertex`\n"
" :arg second_vertex: The second SVertex.\n"
diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp
index 788dfa78992..78c0ee051d6 100644
--- a/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp
@@ -41,20 +41,14 @@ PyDoc_STRVAR(FrsCurve_doc,
"specialization of a Curve.\n"
"\n"
".. method:: __init__()\n"
+ " __init__(brother)\n"
+ " __init__(id)\n"
"\n"
- " Default Constructor.\n"
- "\n"
- ".. method:: __init__(brother)\n"
- "\n"
- " Copy Constructor.\n"
+ " Builds a :class:`FrsCurve` using a default constructor,\n"
+ " copy constructor or from an :class:`Id`.\n"
"\n"
" :arg brother: A Curve object.\n"
" :type brother: :class:`Curve`\n"
- "\n"
- ".. method:: __init__(id)\n"
- "\n"
- " Builds a Curve from its Id.\n"
- "\n"
" :arg id: An Id object.\n"
" :type id: :class:`Id`");
diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp
index b31efe1f923..910f9cdfa07 100644
--- a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp
@@ -50,12 +50,9 @@ PyDoc_STRVAR(Stroke_doc,
"defines the stroke's shape and appearance at this vertex position.\n"
"\n"
".. method:: Stroke()\n"
+ " Stroke(brother)\n"
"\n"
- " Default constructor\n"
- "\n"
- ".. method:: Stroke(brother)\n"
- "\n"
- " Copy constructor");
+ " Creates a :class:`Stroke` using the default constructor or copy constructor\n");
static int Stroke_init(BPy_Stroke *self, PyObject *args, PyObject *kwds)
{
@@ -127,21 +124,18 @@ static PyObject *Stroke_compute_sampling(BPy_Stroke *self, PyObject *args, PyObj
PyDoc_STRVAR(Stroke_resample_doc,
".. method:: resample(n)\n"
+ " resample(sampling)\n"
"\n"
- " Resamples the stroke so that it eventually has N points. That means\n"
- " it is going to add N-vertices_size, where vertices_size is the\n"
- " number of points we already have. If vertices_size >= N, no\n"
- " resampling is done.\n"
+ " Resamples the stroke so using one of two methods with the goal\n"
+ " of creating a stroke with fewer points and the same shape.\n"
"\n"
- " :arg n: The number of vertices we eventually want in our stroke.\n"
+ " :arg n: Resamples the stroke so that it eventually has N points. That means\n"
+ " it is going to add N-vertices_size, where vertices_size is the\n"
+ " number of points we already have. If vertices_size >= N, no\n"
+ " resampling is done.\n"
" :type n: int\n"
- "\n"
- ".. method:: resample(sampling)\n"
- "\n"
- " Resamples the stroke with a given sampling. If the sampling is\n"
- " smaller than the actual sampling value, no resampling is done.\n"
- "\n"
- " :arg sampling: The new sampling value.\n"
+ " :arg sampling: Resamples the stroke with a given sampling value. If the\n"
+ " sampling is smaller than the actual sampling value, no resampling is done.\n"
" :type sampling: float");
static PyObject *Stroke_resample(BPy_Stroke *self, PyObject *args, PyObject *kwds)
diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp
index 58c2ba69c79..e9160d7a5c7 100644
--- a/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp
@@ -36,23 +36,21 @@ extern "C" {
/*----------------------ViewEdge methods ----------------------------*/
-PyDoc_STRVAR(ViewEdge_doc,
- "Class hierarchy: :class:`Interface1D` > :class:`ViewEdge`\n"
- "\n"
- "Class defining a ViewEdge. A ViewEdge in an edge of the image graph.\n"
- "it connects two :class:`ViewVertex` objects. It is made by connecting\n"
- "a set of FEdges.\n"
- "\n"
- ".. method:: __init__()\n"
- "\n"
- " Default constructor.\n"
- "\n"
- ".. method:: __init__(brother)\n"
- "\n"
- " Copy constructor.\n"
- "\n"
- " :arg brother: A ViewEdge object.\n"
- " :type brother: :class:`ViewEdge`");
+PyDoc_STRVAR(
+ ViewEdge_doc,
+ "Class hierarchy: :class:`Interface1D` > :class:`ViewEdge`\n"
+ "\n"
+ "Class defining a ViewEdge. A ViewEdge in an edge of the image graph.\n"
+ "it connects two :class:`ViewVertex` objects. It is made by connecting\n"
+ "a set of FEdges.\n"
+ "\n"
+ ".. method:: __init__()\n"
+ " __init__(brother)\n"
+ "\n"
+ " Builds a :class:`ViewEdge` using the default constructor or the copy constructor.\n"
+ "\n"
+ " :arg brother: A ViewEdge object.\n"
+ " :type brother: :class:`ViewEdge`");
static int ViewEdge_init(BPy_ViewEdge *self, PyObject *args, PyObject *kwds)
{
diff --git a/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp
index 9cdc344081e..028e36145b9 100644
--- a/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp
@@ -40,20 +40,14 @@ PyDoc_STRVAR(Chain_doc,
"Splitting and Creation processes.\n"
"\n"
".. method:: __init__()\n"
+ " __init__(brother)\n"
+ " __init__(id)\n"
"\n"
- " Default constructor.\n"
- "\n"
- ".. method:: __init__(brother)\n"
- "\n"
- " Copy constructor.\n"
+ " Builds a :class:`Chain` using the default constructor,\n"
+ " copy constructor or from an :class:`Id`.\n"
"\n"
" :arg brother: A Chain object.\n"
" :type brother: :class:`Chain`\n"
- "\n"
- ".. method:: __init__(id)\n"
- "\n"
- " Builds a chain from its Id.\n"
- "\n"
" :arg id: An Id object.\n"
" :type id: :class:`Id`");
diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp
index c329a3badd5..018e0449552 100644
--- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp
@@ -42,20 +42,14 @@ PyDoc_STRVAR(FEdgeSharp_doc,
"a is None.\n"
"\n"
".. method:: __init__()\n"
+ " __init__(brother)\n"
+ " __init__(first_vertex, second_vertex)\n"
"\n"
- " Default constructor.\n"
- "\n"
- ".. method:: __init__(brother)\n"
- "\n"
- " Copy constructor.\n"
+ " Builds an :class:`FEdgeSharp` using the default constructor,\n"
+ " copy constructor, or between two :class:`SVertex` objects.\n"
"\n"
" :arg brother: An FEdgeSharp object.\n"
" :type brother: :class:`FEdgeSharp`\n"
- "\n"
- ".. method:: __init__(first_vertex, second_vertex)\n"
- "\n"
- " Builds an FEdgeSharp going from the first vertex to the second.\n"
- "\n"
" :arg first_vertex: The first SVertex object.\n"
" :type first_vertex: :class:`SVertex`\n"
" :arg second_vertex: The second SVertex object.\n"
diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp
index 3fb739b18db..014f0411356 100644
--- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp
@@ -39,20 +39,14 @@ PyDoc_STRVAR(FEdgeSmooth_doc,
"a suggestive contour.\n"
"\n"
".. method:: __init__()\n"
+ " __init__(brother)\n"
+ " __init__(first_vertex, second_vertex)\n"
"\n"
- " Default constructor.\n"
- "\n"
- ".. method:: __init__(brother)\n"
- "\n"
- " Copy constructor.\n"
+ " Builds an :class:`FEdgeSmooth` using the default constructor,\n"
+ " copy constructor, or between two :class:`SVertex`.\n"
"\n"
" :arg brother: An FEdgeSmooth object.\n"
" :type brother: :class:`FEdgeSmooth`\n"
- "\n"
- ".. method:: __init__(first_vertex, second_vertex)\n"
- "\n"
- " Builds an FEdgeSmooth going from the first to the second.\n"
- "\n"
" :arg first_vertex: The first SVertex object.\n"
" :type first_vertex: :class:`SVertex`\n"
" :arg second_vertex: The second SVertex object.\n"