From baa24f1c91d21e10f51881f8fad012f30f99e26f Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Thu, 22 Oct 2020 17:20:57 -0400 Subject: 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 --- .../intern/python/Interface0D/BPy_CurvePoint.cpp | 32 +++++++--------------- 1 file changed, 10 insertions(+), 22 deletions(-) (limited to 'source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp') diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp index 81dd79ff270..7b3571c479f 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp @@ -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) { -- cgit v1.2.3