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
This commit is contained in:
Aaron Carlisle
2020-10-22 17:20:57 -04:00
committed by Aaron Carlisle
parent 956af16189
commit baa24f1c91
35 changed files with 305 additions and 540 deletions

View File

@@ -55,21 +55,14 @@ PyDoc_STRVAR(
"Class defining a material.\n"
"\n"
".. method:: __init__()\n"
" __init__(brother)\n"
" __init__(line, diffuse, ambient, specular, emission, shininess, priority)\n"
"\n"
" Default constructor.\n"
" Creates a :class:`FrsMaterial` using either default constructor,\n"
" copy constructor, or an overloaded constructor\n"
"\n"
".. method:: __init__(brother)\n"
"\n"
" Copy constructor.\n"
"\n"
" :arg brother: A Material object.\n"
" :arg brother: A Material object to be used as a copy constructor.\n"
" :type brother: :class:`Material`\n"
"\n"
".. method:: __init__(line, diffuse, ambient, specular, emission, shininess, priority)\n"
"\n"
" Builds a Material from its line, diffuse, ambient, specular, emissive\n"
" colors, a shininess coefficient and line color priority.\n"
"\n"
" :arg line: The line color.\n"
" :type line: :class:`mathutils.Vector`, list or tuple of 4 float values\n"
" :arg diffuse: The diffuse color.\n"

View File

@@ -46,24 +46,21 @@ int Id_Init(PyObject *module)
//------------------------INSTANCE METHODS ----------------------------------
PyDoc_STRVAR(Id_doc,
PyDoc_STRVAR(
Id_doc,
"Class for representing an object Id.\n"
"\n"
".. method:: __init__(first=0, second=0)\n"
".. method:: __init__(brother)\n"
" __init__(first=0, second=0)\n"
"\n"
" Build the Id from two numbers.\n"
" Build the Id from two numbers or another :class:`Id` using the copy constructor.\n"
"\n"
" :arg brother: An Id object.\n"
" :type brother: :class:`Id`"
" :arg first: The first number.\n"
" :type first: int\n"
" :arg second: The second number.\n"
" :type second: int\n"
"\n"
".. method:: __init__(brother)\n"
"\n"
" Copy constructor.\n"
"\n"
" :arg brother: An Id object.\n"
" :type brother: :class:`Id`");
" :type second: int\n");
static int Id_init(BPy_Id *self, PyObject *args, PyObject *kwds)
{

View File

@@ -101,6 +101,7 @@ static PyObject *Operators_select(BPy_Operators * /*self*/, PyObject *args, PyOb
PyDoc_STRVAR(Operators_chain_doc,
".. staticmethod:: chain(it, pred, modifier)\n"
" chain(it, pred)\n"
"\n"
" Builds a set of chains from the current set of ViewEdges. Each\n"
" ViewEdge of the current list starts a new chain. The chaining\n"
@@ -116,28 +117,9 @@ PyDoc_STRVAR(Operators_chain_doc,
" :type pred: :class:`UnaryPredicate1D`\n"
" :arg modifier: A function that takes a ViewEdge as argument and\n"
" that is used to modify the processed ViewEdge state (the\n"
" timestamp incrementation is a typical illustration of such a\n"
" modifier).\n"
" :type modifier: :class:`UnaryFunction1DVoid`\n"
"\n"
".. staticmethod:: chain(it, pred)\n"
"\n"
" Builds a set of chains from the current set of ViewEdges. Each\n"
" ViewEdge of the current list starts a new chain. The chaining\n"
" operator then iterates over the ViewEdges of the ViewMap using the\n"
" user specified iterator. This operator only iterates using the\n"
" increment operator and is therefore unidirectional. This chaining\n"
" operator is different from the previous one because it doesn't take\n"
" any modifier as argument. Indeed, the time stamp (insuring that a\n"
" ViewEdge is processed one time) is automatically managed in this\n"
" case.\n"
"\n"
" :arg it: The iterator on the ViewEdges of the ViewMap. It contains\n"
" the chaining rule. \n"
" :type it: :class:`ViewEdgeIterator`\n"
" :arg pred: The predicate on the ViewEdge that expresses the\n"
" stopping condition.\n"
" :type pred: :class:`UnaryPredicate1D`");
" timestamp incrementation is a typical illustration of such a modifier).\n"
" If this argument is not given, the time stamp is automatically managed.\n"
" :type modifier: :class:`UnaryFunction1DVoid`\n");
static PyObject *Operators_chain(BPy_Operators * /*self*/, PyObject *args, PyObject *kwds)
{
@@ -195,6 +177,7 @@ static PyObject *Operators_chain(BPy_Operators * /*self*/, PyObject *args, PyObj
PyDoc_STRVAR(Operators_bidirectional_chain_doc,
".. staticmethod:: bidirectional_chain(it, pred)\n"
" bidirectional_chain(it)\n"
"\n"
" Builds a set of chains from the current set of ViewEdges. Each\n"
" ViewEdge of the current list potentially starts a new chain. The\n"
@@ -211,30 +194,10 @@ PyDoc_STRVAR(Operators_bidirectional_chain_doc,
" :arg it: The ChainingIterator on the ViewEdges of the ViewMap. It\n"
" contains the chaining rule.\n"
" :type it: :class:`ChainingIterator`\n"
" :arg pred: The predicate on the ViewEdge that expresses the\n"
" stopping condition.\n"
" :type pred: :class:`UnaryPredicate1D`\n"
"\n"
".. staticmethod:: bidirectional_chain(it)\n"
"\n"
" The only difference with the above bidirectional chaining algorithm\n"
" is that we don't need to pass a stopping criterion. This might be\n"
" desirable when the stopping criterion is already contained in the\n"
" iterator definition. Builds a set of chains from the current set of\n"
" ViewEdges. Each ViewEdge of the current list potentially starts a new\n"
" chain. The chaining operator then iterates over the ViewEdges of the\n"
" ViewMap using the user specified iterator. This operator iterates\n"
" both using the increment and decrement operators and is therefore\n"
" bidirectional. This operator works with a ChainingIterator which\n"
" contains the chaining rules. It is this last one which can be told to\n"
" chain only edges that belong to the selection or not to process twice\n"
" a ViewEdge during the chaining. Each time a ViewEdge is added to a\n"
" chain, its chaining time stamp is incremented. This allows you to\n"
" keep track of the number of chains to which a ViewEdge belongs to.\n"
"\n"
" :arg it: The ChainingIterator on the ViewEdges of the ViewMap. It\n"
" contains the chaining rule.\n"
" :type it: :class:`ChainingIterator`");
" :arg pred: The predicate on the ViewEdge that expresses the stopping condition.\n"
" This parameter is optional, you make not want to pass a stopping criterion\n"
" when the stopping criterion is already contained in the iterator definition.\n"
" :type pred: :class:`UnaryPredicate1D`\n");
static PyObject *Operators_bidirectional_chain(BPy_Operators * /*self*/,
PyObject *args,
@@ -287,44 +250,34 @@ static PyObject *Operators_bidirectional_chain(BPy_Operators * /*self*/,
PyDoc_STRVAR(Operators_sequential_split_doc,
".. staticmethod:: sequential_split(starting_pred, stopping_pred, sampling=0.0)\n"
" sequential_split(pred, sampling=0.0)\n"
"\n"
" Splits each chain of the current set of chains in a sequential way.\n"
" The points of each chain are processed (with a specified sampling)\n"
" sequentially. Each time a user specified starting condition is\n"
" verified, a new chain begins and ends as soon as a user-defined\n"
" stopping predicate is verified. This allows chains overlapping rather\n"
" than chains partitioning. The first point of the initial chain is the\n"
" sequentially. The first point of the initial chain is the\n"
" first point of one of the resulting chains. The splitting ends when\n"
" no more chain can start.\n"
"\n"
" .. tip::\n"
"\n"
" By specifiying a starting and stopping predicate allows\n"
" the chains to overlapp rather than chains partitioning.\n"
"\n"
" :arg starting_pred: The predicate on a point that expresses the\n"
" starting condition.\n"
" starting condition. Each time this condition is verified, a new chain begins\n"
" :type starting_pred: :class:`UnaryPredicate0D`\n"
" :arg stopping_pred: The predicate on a point that expresses the\n"
" stopping condition.\n"
" stopping condition. The chain ends as soon as this predicate is verified.\n"
" :type stopping_pred: :class:`UnaryPredicate0D`\n"
" :arg pred: The predicate on a point that expresses the splitting condition.\n"
" Each time the condition is verified, the chain is split into two chains.\n"
" The resulting set of chains is a partition of the initial chain\n"
" :type pred: :class:`UnaryPredicate0D`\n"
" :arg sampling: The resolution used to sample the chain for the\n"
" predicates evaluation. (The chain is not actually resampled;\n"
" a virtual point only progresses along the curve using this\n"
" resolution.)\n"
" :type sampling: float\n"
"\n"
".. staticmethod:: sequential_split(pred, sampling=0.0)\n"
"\n"
" Splits each chain of the current set of chains in a sequential way.\n"
" The points of each chain are processed (with a specified sampling)\n"
" sequentially and each time a user specified condition is verified,\n"
" the chain is split into two chains. The resulting set of chains is a\n"
" partition of the initial chain\n"
"\n"
" :arg pred: The predicate on a point that expresses the splitting\n"
" condition.\n"
" :type pred: :class:`UnaryPredicate0D`\n"
" :arg sampling: The resolution used to sample the chain for the\n"
" predicate evaluation. (The chain is not actually resampled; a\n"
" virtual point only progresses along the curve using this\n"
" resolution.)\n"
" :type sampling: float");
" :type sampling: float\n");
static PyObject *Operators_sequential_split(BPy_Operators * /*self*/,
PyObject *args,
@@ -389,8 +342,10 @@ static PyObject *Operators_sequential_split(BPy_Operators * /*self*/,
Py_RETURN_NONE;
}
PyDoc_STRVAR(Operators_recursive_split_doc,
PyDoc_STRVAR(
Operators_recursive_split_doc,
".. staticmethod:: recursive_split(func, pred_1d, sampling=0.0)\n"
" recursive_split(func, pred_0d, pred_1d, sampling=0.0)\n"
"\n"
" Splits the current set of chains in a recursive way. We process the\n"
" points of each chain (with a specified sampling) to find the point\n"
@@ -399,31 +354,9 @@ PyDoc_STRVAR(Operators_recursive_split_doc,
" recursivity level is controlled through a predicate 1D that expresses\n"
" a stopping condition on the chain that is about to be processed.\n"
"\n"
" :arg func: The Unary Function evaluated at each point of the chain.\n"
" The splitting point is the point minimizing this function.\n"
" :type func: :class:`UnaryFunction0DDouble`\n"
" :arg pred_1d: The Unary Predicate expressing the recursivity stopping\n"
" condition. This predicate is evaluated for each curve before it\n"
" actually gets split. If pred_1d(chain) is true, the curve won't be\n"
" split anymore.\n"
" :type pred_1d: :class:`UnaryPredicate1D`\n"
" :arg sampling: The resolution used to sample the chain for the\n"
" predicates evaluation. (The chain is not actually resampled, a\n"
" virtual point only progresses along the curve using this\n"
" resolution.)\n"
" :type sampling: float\n"
"\n"
".. staticmethod:: recursive_split(func, pred_0d, pred_1d, sampling=0.0)\n"
"\n"
" Splits the current set of chains in a recursive way. We process the\n"
" points of each chain (with a specified sampling) to find the point\n"
" minimizing a specified function. The chain is split in two at this\n"
" point and the two new chains are processed in the same way. The user\n"
" can specify a 0D predicate to make a first selection on the points\n"
" The user can also specify a 0D predicate to make a first selection on the points\n"
" that can potentially be split. A point that doesn't verify the 0D\n"
" predicate won't be candidate in realizing the min. The recursivity\n"
" level is controlled through a predicate 1D that expresses a stopping\n"
" condition on the chain that is about to be processed.\n"
" predicate won't be candidate in realizing the min.\n"
"\n"
" :arg func: The Unary Function evaluated at each point of the chain.\n"
" The splitting point is the point minimizing this function.\n"
@@ -443,7 +376,7 @@ PyDoc_STRVAR(Operators_recursive_split_doc,
" predicates evaluation. (The chain is not actually resampled; a\n"
" virtual point only progresses along the curve using this\n"
" resolution.)\n"
" :type sampling: float");
" :type sampling: float\n");
static PyObject *Operators_recursive_split(BPy_Operators * /*self*/,
PyObject *args,

View File

@@ -50,17 +50,15 @@ int SShape_Init(PyObject *module)
/*----------------------SShape methods ----------------------------*/
PyDoc_STRVAR(SShape_doc,
PyDoc_STRVAR(
SShape_doc,
"Class to define a feature shape. It is the gathering of feature\n"
"elements from an identified input shape.\n"
"\n"
".. method:: __init__()\n"
" __init__(brother)\n"
"\n"
" Default constructor.\n"
"\n"
".. method:: __init__(brother)\n"
"\n"
" Copy constructor.\n"
" Creates a :class:`SShape` class using either a default constructor or copy constructor.\n"
"\n"
" :arg brother: An SShape object.\n"
" :type brother: :class:`SShape`");

View File

@@ -53,20 +53,16 @@ PyDoc_STRVAR(StrokeAttribute_doc,
"Vertex.\n"
"\n"
".. method:: __init__()\n"
" __init__(brother)\n"
" __init__(red, green, blue, alpha, thickness_right, thickness_left)\n"
" __init__(attribute1, attribute2, t)\n"
"\n"
" Default constructor.\n"
" Creates a :class:`StrokeAttribute` object using either a default constructor,\n"
" copy constructor, overloaded constructor, or and interpolation constructor\n"
" to interpolate between two :class:`StrokeAttribute` objects.\n"
"\n"
".. method:: __init__(brother)\n"
"\n"
" Copy constructor.\n"
"\n"
" :arg brother: A StrokeAttribute object.\n"
" :arg brother: A StrokeAttribute object to be used as a copy constructor.\n"
" :type brother: :class:`StrokeAttribute`\n"
"\n"
".. method:: __init__(red, green, blue, alpha, thickness_right, thickness_left)\n"
"\n"
" Build a stroke vertex attribute from a set of parameters.\n"
"\n"
" :arg red: Red component of a stroke color.\n"
" :type red: float\n"
" :arg green: Green component of a stroke color.\n"
@@ -79,12 +75,6 @@ PyDoc_STRVAR(StrokeAttribute_doc,
" :type thickness_right: float\n"
" :arg thickness_left: Stroke thickness on the left.\n"
" :type thickness_left: float\n"
"\n"
".. method:: __init__(attribute1, attribute2, t)\n"
"\n"
" Interpolation constructor. Build a StrokeAttribute from two\n"
" StrokeAttribute objects and an interpolation parameter.\n"
"\n"
" :arg attribute1: The first StrokeAttribute object.\n"
" :type attribute1: :class:`StrokeAttribute`\n"
" :arg attribute2: The second StrokeAttribute object.\n"

View File

@@ -55,20 +55,14 @@ PyDoc_STRVAR(ViewShape_doc,
"and :class:`ViewEdge`) that are issued from the same input shape.\n"
"\n"
".. method:: __init__()\n"
" __init__(brother)\n"
" __init__(sshape)\n"
"\n"
" Default constructor.\n"
"\n"
".. method:: __init__(brother)\n"
"\n"
" Copy constructor.\n"
" Builds a :class:`ViewShape` using the default constructor,\n"
" copy constructor, or from a :class:`SShape`.\n"
"\n"
" :arg brother: A ViewShape object.\n"
" :type brother: :class:`ViewShape`\n"
"\n"
".. method:: __init__(sshape)\n"
"\n"
" Builds a ViewShape from an SShape.\n"
"\n"
" :arg sshape: An SShape object.\n"
" :type sshape: :class:`SShape`");

View File

@@ -44,40 +44,28 @@ PyDoc_STRVAR(CurvePoint_doc,
"given resolution.\n"
"\n"
".. method:: __init__()\n"
" __init__(brother)\n"
" __init__(first_vertex, second_vertex, t2d)\n"
" __init__(first_point, second_point, t2d)\n"
"\n"
" Default constructor.\n"
"\n"
".. method:: __init__(brother)\n"
"\n"
" Copy constructor.\n"
" Builds a CurvePoint using the default constructor, copy constructor,\n"
" or one of the overloaded constructors. The over loaded constructors\n"
" can either take two :class:`SVertex` or two :class:`CurvePoint`\n"
" objects and an interpolation parameter\n"
"\n"
" :arg brother: A CurvePoint object.\n"
" :type brother: :class:`CurvePoint`\n"
"\n"
".. method:: __init__(first_vertex, second_vertex, t2d)\n"
"\n"
" Builds a CurvePoint from two SVertex objects and an interpolation parameter.\n"
"\n"
" :arg first_vertex: The first SVertex.\n"
" :type first_vertex: :class:`SVertex`\n"
" :arg second_vertex: The second SVertex.\n"
" :type second_vertex: :class:`SVertex`\n"
" :arg t2d: A 2D interpolation parameter used to linearly interpolate\n"
" first_vertex and second_vertex.\n"
" :type t2d: float\n"
"\n"
".. method:: __init__(first_point, second_point, t2d)\n"
"\n"
" Builds a CurvePoint from two CurvePoint objects and an interpolation\n"
" parameter.\n"
"\n"
" :arg first_point: The first CurvePoint.\n"
" :type first_point: :class:`CurvePoint`\n"
" :arg second_point: The second CurvePoint.\n"
" :type second_point: :class:`CurvePoint`\n"
" :arg t2d: The 2D interpolation parameter used to linearly interpolate\n"
" first_point and second_point.\n"
" :type t2d: float");
" :arg t2d: A 2D interpolation parameter used to linearly interpolate\n"
" first_vertex and second_vertex or first_point and second_point.\n"
" :type t2d: float\n");
static int CurvePoint_init(BPy_CurvePoint *self, PyObject *args, PyObject *kwds)
{

View File

@@ -38,20 +38,15 @@ PyDoc_STRVAR(SVertex_doc,
"Class to define a vertex of the embedding.\n"
"\n"
".. method:: __init__()\n"
" __init__(brother)\n"
" __init__(point_3d, id)\n"
"\n"
" Default constructor.\n"
"\n"
".. method:: __init__(brother)\n"
"\n"
" Copy constructor.\n"
" Builds a :class:`SVertex` using the default constructor,\n"
" copy constructor or the overloaded constructor which builds"
" a :class:`SVertex` from 3D coordinates and an Id.\n"
"\n"
" :arg brother: A SVertex object.\n"
" :type brother: :class:`SVertex`\n"
"\n"
".. method:: __init__(point_3d, id)\n"
"\n"
" Builds a SVertex from 3D coordinates and an Id.\n"
"\n"
" :arg point_3d: A three-dimensional vector.\n"
" :type point_3d: :class:`mathutils.Vector`\n"
" :arg id: An Id object.\n"

View File

@@ -40,46 +40,29 @@ PyDoc_STRVAR(
"Class to define a stroke vertex.\n"
"\n"
".. method:: __init__()\n"
" __init__(brother)\n"
" __init__(first_vertex, second_vertex, t3d)\n"
" __init__(point)\n"
" __init__(svertex)\n"
" __init__(svertex, attribute)\n"
"\n"
" Default constructor.\n"
"\n"
".. method:: __init__(brother)\n"
"\n"
" Copy constructor.\n"
" Builds a :class:`StrokeVertex` using the default constructor,\n"
" copy constructor, from 2 :class:`StrokeVertex` and an interpolation parameter,\n"
" from a CurvePoint, from a SVertex, or a :class:`SVertex`"
" and a :class:`StrokeAttribute` object.\n"
"\n"
" :arg brother: A StrokeVertex object.\n"
" :type brother: :class:`StrokeVertex`\n"
"\n"
".. method:: __init__(first_vertex, second_vertex, t3d)\n"
"\n"
" Build a stroke vertex from 2 stroke vertices and an interpolation\n"
" parameter.\n"
"\n"
" :arg first_vertex: The first StrokeVertex.\n"
" :type first_vertex: :class:`StrokeVertex`\n"
" :arg second_vertex: The second StrokeVertex.\n"
" :type second_vertex: :class:`StrokeVertex`\n"
" :arg t3d: An interpolation parameter.\n"
" :type t3d: float\n"
"\n"
".. method:: __init__(point)\n"
"\n"
" Build a stroke vertex from a CurvePoint\n"
"\n"
" :arg point: A CurvePoint object.\n"
" :type point: :class:`CurvePoint`\n"
"\n"
".. method:: __init__(svertex)\n"
"\n"
" Build a stroke vertex from a SVertex\n"
"\n"
" :arg svertex: An SVertex object.\n"
" :type svertex: :class:`SVertex`\n"
"\n"
".. method:: __init__(svertex, attribute)\n"
"\n"
" Build a stroke vertex from an SVertex and a StrokeAttribute object.\n"
"\n"
" :arg svertex: An SVertex object.\n"
" :type svertex: :class:`SVertex`\n"
" :arg attribute: A StrokeAttribute object.\n"

View File

@@ -31,19 +31,17 @@ extern "C" {
/*----------------------NonTVertex methods ----------------------------*/
PyDoc_STRVAR(NonTVertex_doc,
PyDoc_STRVAR(
NonTVertex_doc,
"Class hierarchy: :class:`Interface0D` > :class:`ViewVertex` > :class:`NonTVertex`\n"
"\n"
"View vertex for corners, cusps, etc. associated to a single SVertex.\n"
"Can be associated to 2 or more view edges.\n"
"\n"
".. method:: __init__()\n"
" __init__(svertex)\n"
"\n"
" Default constructor.\n"
"\n"
".. method:: __init__(svertex)\n"
"\n"
" Build a NonTVertex from a SVertex.\n"
" Builds a :class:`NonTVertex` using the default constructor or a :class:`SVertex`.\n"
"\n"
" :arg svertex: An SVertex object.\n"
" :type svertex: :class:`SVertex`");

View File

@@ -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"

View File

@@ -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`");

View File

@@ -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"
" 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: 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"
"\n"
" :arg n: The number of vertices we eventually want in our stroke.\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)

View File

@@ -36,7 +36,8 @@ extern "C" {
/*----------------------ViewEdge methods ----------------------------*/
PyDoc_STRVAR(ViewEdge_doc,
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"
@@ -44,12 +45,9 @@ PyDoc_STRVAR(ViewEdge_doc,
"a set of FEdges.\n"
"\n"
".. method:: __init__()\n"
" __init__(brother)\n"
"\n"
" Default constructor.\n"
"\n"
".. method:: __init__(brother)\n"
"\n"
" Copy constructor.\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`");

View File

@@ -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`");

View File

@@ -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"

View File

@@ -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"

View File

@@ -41,20 +41,14 @@ PyDoc_STRVAR(
"traverse() method of the ChainingIterator.\n"
"\n"
".. method:: __init__()\n"
" __init__(brother)\n"
" __init__(vertex, restrict_to_selection=True, restrict_to_unvisited=True)\n"
"\n"
" Default constructor.\n"
"\n"
".. method:: __init__(brother)\n"
"\n"
" Copy constructor.\n"
" Builds an :class:`AdjacencyIterator` using the default constructor,\n"
" copy constructor or the overloaded constructor.\n"
"\n"
" :arg brother: An AdjacencyIterator object.\n"
" :type brother: :class:`AdjacencyIterator`\n"
"\n"
".. method:: __init__(vertex, restrict_to_selection=True, restrict_to_unvisited=True)\n"
"\n"
" Builds a AdjacencyIterator object.\n"
"\n"
" :arg vertex: The vertex which is the next crossing.\n"
" :type vertex: :class:`ViewVertex`\n"
" :arg restrict_to_selection: Indicates whether to force the chaining\n"

View File

@@ -33,7 +33,8 @@ extern "C" {
//------------------------INSTANCE METHODS ----------------------------------
PyDoc_STRVAR(ChainPredicateIterator_doc,
PyDoc_STRVAR(
ChainPredicateIterator_doc,
"Class hierarchy: :class:`freestyle.types.Iterator` >\n"
":class:`freestyle.types.ViewEdgeIterator` >\n"
@@ -51,11 +52,12 @@ PyDoc_STRVAR(ChainPredicateIterator_doc,
"ViewEdge respects these two predicates, None is returned.\n"
"\n"
".. method:: __init__(upred, bpred, restrict_to_selection=True, "
"restrict_to_unvisited=True, begin=None, "
"orientation=True)\n"
" restrict_to_unvisited=True, begin=None, "
" orientation=True)\n"
" __init__(brother)\n"
"\n"
" Builds a ChainPredicateIterator from a unary predicate, a binary\n"
" predicate, a starting ViewEdge and its orientation.\n"
" predicate, a starting ViewEdge and its orientation or using the copy constructor.\n"
"\n"
" :arg upred: The unary predicate that the next ViewEdge must satisfy.\n"
" :type upred: :class:`freestyle.types.UnaryPredicate1D`\n"
@@ -75,11 +77,6 @@ PyDoc_STRVAR(ChainPredicateIterator_doc,
" false, we'll search over the ViewEdges surrounding the ending\n"
" ViewVertex of begin.\n"
" :type orientation: bool\n"
"\n"
".. method:: __init__(brother)\n"
"\n"
" Copy constructor.\n"
"\n"
" :arg brother: A ChainPredicateIterator object.\n"
" :type brother: :class:`ChainPredicateIterator`");

View File

@@ -48,9 +48,10 @@ PyDoc_STRVAR(ChainSilhouetteIterator_doc,
"precedence of the silhouette over the crease criterion.\n"
"\n"
".. method:: __init__(restrict_to_selection=True, begin=None, orientation=True)\n"
" __init__(brother)\n"
"\n"
" Builds a ChainSilhouetteIterator from the first ViewEdge used for\n"
" iteration and its orientation.\n"
" iteration and its orientation or the copy constructor.\n"
"\n"
" :arg restrict_to_selection: Indicates whether to force the chaining\n"
" to stay within the set of selected ViewEdges or not.\n"
@@ -62,11 +63,6 @@ PyDoc_STRVAR(ChainSilhouetteIterator_doc,
" false, we'll search over the ViewEdges surrounding the ending\n"
" ViewVertex of begin.\n"
" :type orientation: bool\n"
"\n"
".. method:: __init__(brother)\n"
"\n"
" Copy constructor.\n"
"\n"
" :arg brother: A ChainSilhouetteIterator object.\n"
" :type brother: :class:`ChainSilhouetteIterator`");

View File

@@ -46,11 +46,12 @@ PyDoc_STRVAR(
"they will be included in the adjacency iterator (i.e, the adjacent\n"
"iterator will only stop on \"valid\" edges).\n"
"\n"
".. method:: __init__(restrict_to_selection=True, restrict_to_unvisited=True, begin=None, "
"orientation=True)\n"
".. method:: __init__(restrict_to_selection=True, restrict_to_unvisited=True,"
" begin=None, orientation=True)\n"
" __init__(brother)\n"
"\n"
" Builds a Chaining Iterator from the first ViewEdge used for\n"
" iteration and its orientation.\n"
" iteration and its orientation or by using the copy constructor.\n"
"\n"
" :arg restrict_to_selection: Indicates whether to force the chaining\n"
" to stay within the set of selected ViewEdges or not.\n"
@@ -63,11 +64,6 @@ PyDoc_STRVAR(
" :arg orientation: The direction to follow to explore the graph. If\n"
" true, the direction indicated by the first ViewEdge is used.\n"
" :type orientation: bool\n"
"\n"
".. method:: __init__(brother)\n"
"\n"
" Copy constructor.\n"
"\n"
" :arg brother: \n"
" :type brother: ChainingIterator");

View File

@@ -39,20 +39,14 @@ PyDoc_STRVAR(CurvePointIterator_doc,
"through the .object attribute.\n"
"\n"
".. method:: __init__()\n"
" __init__(brother)\n"
" __init__(step=0.0)\n"
"\n"
" Default constructor.\n"
"\n"
".. method:: __init__(brother)\n"
"\n"
" Copy constructor.\n"
" Builds a CurvePointIterator object using either the default constructor,\n"
" copy constructor, or the overloaded constructor.\n"
"\n"
" :arg brother: A CurvePointIterator object.\n"
" :type brother: :class:`CurvePointIterator`\n"
"\n"
".. method:: __init__(step=0.0)\n"
"\n"
" Builds a CurvePointIterator object.\n"
"\n"
" :arg step: A resampling resolution with which the curve is resampled.\n"
" If zero, no resampling is done (i.e., the iterator iterates over\n"
" initial vertices).\n"

View File

@@ -38,17 +38,13 @@ PyDoc_STRVAR(Interface0DIterator_doc,
"this iterator is always obtained from a 1D element.\n"
"\n"
".. method:: __init__(brother)\n"
" __init__(it)\n"
"\n"
" Copy constructor.\n"
" Construct a nested Interface0DIterator using either the copy constructor\n"
" or the constructor that takes an he argument of a Function0D.\n"
"\n"
" :arg brother: An Interface0DIterator object.\n"
" :type brother: :class:`Interface0DIterator`\n"
"\n"
".. method:: __init__(it)\n"
"\n"
" Construct a nested Interface0DIterator that can be the argument of\n"
" a Function0D.\n"
"\n"
" :arg it: An iterator object to be nested.\n"
" :type it: :class:`SVertexIterator`, :class:`CurvePointIterator`, or\n"
" :class:`StrokeVertexIterator`");

View File

@@ -32,7 +32,8 @@ extern "C" {
//------------------------INSTANCE METHODS ----------------------------------
PyDoc_STRVAR(SVertexIterator_doc,
PyDoc_STRVAR(
SVertexIterator_doc,
"Class hierarchy: :class:`Iterator` > :class:`SVertexIterator`\n"
"\n"
"Class representing an iterator over :class:`SVertex` of a\n"
@@ -40,21 +41,14 @@ PyDoc_STRVAR(SVertexIterator_doc,
"from a ViewEdge by calling verticesBegin() or verticesEnd().\n"
"\n"
".. method:: __init__()\n"
" __init__(brother)\n"
" __init__(vertex, begin, previous_edge, next_edge, t)"
"\n"
" Default constructor.\n"
"\n"
".. method:: __init__(brother)\n"
"\n"
" Copy constructor.\n"
" Build an SVertexIterator using either the default constructor, copy constructor,\n"
" or the overloaded constructor that starts iteration from an SVertex object vertex.\n"
"\n"
" :arg brother: An SVertexIterator object.\n"
" :type brother: :class:`SVertexIterator`\n"
"\n"
".. method:: __init__(vertex, begin, previous_edge, next_edge, t)\n"
"\n"
" Build an SVertexIterator that starts iteration from an SVertex\n"
" object v.\n"
"\n"
" :arg vertex: The SVertex from which the iterator starts iteration.\n"
" :type vertex: :class:`SVertex`\n"
" :arg begin: The first SVertex of a ViewEdge.\n"

View File

@@ -48,12 +48,10 @@ PyDoc_STRVAR(StrokeVertexIterator_doc,
"by calling Interface0DIterator(it).\n"
"\n"
".. method:: __init__()\n"
" __init__(brother)\n"
"\n"
" Default constructor.\n"
"\n"
".. method:: __init__(brother)\n"
"\n"
" Copy constructor.\n"
" Creates a :class:`StrokeVertexIterator` using either the\n"
" default constructor or the copy constructor.\n"
"\n"
" :arg brother: A StrokeVertexIterator object.\n"
" :type brother: :class:`StrokeVertexIterator`");

View File

@@ -40,9 +40,10 @@ PyDoc_STRVAR(ViewEdgeIterator_doc,
"on a given ViewEdge.\n"
"\n"
".. method:: __init__(begin=None, orientation=True)\n"
" __init__(brother)\n"
"\n"
" Builds a ViewEdgeIterator from a starting ViewEdge and its\n"
" orientation.\n"
" orientation or the copy constructor.\n"
"\n"
" :arg begin: The ViewEdge from where to start the iteration.\n"
" :type begin: :class:`ViewEdge` or None\n"
@@ -51,11 +52,6 @@ PyDoc_STRVAR(ViewEdgeIterator_doc,
" false, we'll search over the ViewEdges surrounding the ending\n"
" ViewVertex of begin.\n"
" :type orientation: bool\n"
"\n"
".. method:: __init__(brother)\n"
"\n"
" Copy constructor.\n"
"\n"
" :arg brother: A ViewEdgeIterator object.\n"
" :type brother: :class:`ViewEdgeIterator`");

View File

@@ -39,12 +39,10 @@ PyDoc_STRVAR(orientedViewEdgeIterator_doc,
"obtained from a ViewVertex by calling edges_begin() or edges_end().\n"
"\n"
".. method:: __init__()\n"
" __init__(iBrother)\n"
"\n"
" Default constructor.\n"
"\n"
".. method:: __init__(iBrother)\n"
"\n"
" Copy constructor.\n"
" Creates an :class:`orientedViewEdgeIterator` using either the\n"
" default constructor or the copy constructor.\n"
"\n"
" :arg iBrother: An orientedViewEdgeIterator object.\n"
" :type iBrother: :class:`orientedViewEdgeIterator`");

View File

@@ -160,13 +160,10 @@ static char UnaryFunction1DDouble___doc__[] =
":class:`Interface1D` and return a float value.\n"
"\n"
".. method:: __init__()\n"
" __init__(integration_type)\n"
"\n"
" Default constructor.\n"
"\n"
".. method:: __init__(integration_type)\n"
"\n"
" Builds a unary 1D function using the integration method given as\n"
" argument.\n"
" Builds a unary 1D function using the default constructor\n"
" or the integration method given as an argument.\n"
"\n"
" :arg integration_type: An integration method.\n"
" :type integration_type: :class:`IntegrationType`\n";

View File

@@ -65,13 +65,10 @@ static char UnaryFunction1DEdgeNature___doc__[] =
":class:`Interface1D` and return a :class:`Nature` object.\n"
"\n"
".. method:: __init__()\n"
" __init__(integration_type)\n"
"\n"
" Default constructor.\n"
"\n"
".. method:: __init__(integration_type)\n"
"\n"
" Builds a unary 1D function using the integration method given as\n"
" argument.\n"
" Builds a unary 1D function using the default constructor\n"
" or the integration method given as an argument.\n"
"\n"
" :arg integration_type: An integration method.\n"
" :type integration_type: :class:`IntegrationType`\n";

View File

@@ -56,13 +56,10 @@ static char UnaryFunction1DFloat___doc__[] =
":class:`Interface1D` and return a float value.\n"
"\n"
".. method:: __init__()\n"
" __init__(integration_type)\n"
"\n"
" Default constructor.\n"
"\n"
".. method:: __init__(integration_type)\n"
"\n"
" Builds a unary 1D function using the integration method given as\n"
" argument.\n"
" Builds a unary 1D function using the default constructor\n"
" or the integration method given as an argument.\n"
"\n"
" :arg integration_type: An integration method.\n"
" :type integration_type: :class:`IntegrationType`\n";

View File

@@ -65,13 +65,10 @@ static char UnaryFunction1DUnsigned___doc__[] =
":class:`Interface1D` and return an int value.\n"
"\n"
".. method:: __init__()\n"
" __init__(integration_type)\n"
"\n"
" Default constructor.\n"
"\n"
".. method:: __init__(integration_type)\n"
"\n"
" Builds a unary 1D function using the integration method given as\n"
" argument.\n"
" Builds a unary 1D function using the default constructor\n"
" or the integration method given as an argument.\n"
"\n"
" :arg integration_type: An integration method.\n"
" :type integration_type: :class:`IntegrationType`\n";

View File

@@ -71,13 +71,10 @@ static char UnaryFunction1DVec2f___doc__[] =
":class:`Interface1D` and return a 2D vector.\n"
"\n"
".. method:: __init__()\n"
" __init__(integration_type)\n"
"\n"
" Default constructor.\n"
"\n"
".. method:: __init__(integration_type)\n"
"\n"
" Builds a unary 1D function using the integration method given as\n"
" argument.\n"
" Builds a unary 1D function using the default constructor\n"
" or the integration method given as an argument.\n"
"\n"
" :arg integration_type: An integration method.\n"
" :type integration_type: :class:`IntegrationType`\n";

View File

@@ -64,13 +64,10 @@ static char UnaryFunction1DVec3f___doc__[] =
":class:`Interface1D` and return a 3D vector.\n"
"\n"
".. method:: __init__()\n"
" __init__(integration_type)\n"
"\n"
" Default constructor.\n"
"\n"
".. method:: __init__(integration_type)\n"
"\n"
" Builds a unary 1D function using the integration method given as\n"
" argument.\n"
" Builds a unary 1D function using the default constructor\n"
" or the integration method given as an argument.\n"
"\n"
" :arg integration_type: An integration method.\n"
" :type integration_type: :class:`IntegrationType`\n";

View File

@@ -80,13 +80,10 @@ static char UnaryFunction1DVectorViewShape___doc__[] =
"objects.\n"
"\n"
".. method:: __init__()\n"
" __init__(integration_type)\n"
"\n"
" Default constructor.\n"
"\n"
".. method:: __init__(integration_type)\n"
"\n"
" Builds a unary 1D function using the integration method given as\n"
" argument.\n"
" Builds a unary 1D function using the default constructor\n"
" or the integration method given as an argument.\n"
"\n"
" :arg integration_type: An integration method.\n"
" :type integration_type: :class:`IntegrationType`\n";

View File

@@ -79,13 +79,10 @@ static char UnaryFunction1DVoid___doc__[] =
":class:`Interface1D`.\n"
"\n"
".. method:: __init__()\n"
" __init__(integration_type)\n"
"\n"
" Default constructor.\n"
"\n"
".. method:: __init__(integration_type)\n"
"\n"
" Builds a unary 1D function using the integration method given as\n"
" argument.\n"
" Builds a unary 1D function using either a default constructor\n"
" or the integration method given as an argument.\n"
"\n"
" :arg integration_type: An integration method.\n"
" :type integration_type: :class:`IntegrationType`\n";