From 7436b578dddf27888802b9bd6a8fa2e0ddd815f6 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 25 Jan 2024 10:22:16 +1100 Subject: [PATCH] Cleanup: force wrapping all uses of PyDoc_STRVAR Without this, minor edits can re-indent the whole doc-string at a different level, causing diffs to be unnecessary noisy. --- .../freestyle/intern/python/BPy_BBox.cpp | 14 +- .../intern/python/BPy_BinaryPredicate0D.cpp | 16 +- .../intern/python/BPy_BinaryPredicate1D.cpp | 16 +- .../intern/python/BPy_ContextFunctions.cpp | 60 +- .../freestyle/intern/python/BPy_Freestyle.cpp | 30 +- .../intern/python/BPy_FrsMaterial.cpp | 71 +- .../freestyle/intern/python/BPy_FrsNoise.cpp | 180 +-- .../freestyle/intern/python/BPy_Id.cpp | 21 +- .../intern/python/BPy_IntegrationType.cpp | 92 +- .../intern/python/BPy_Interface0D.cpp | 116 +- .../intern/python/BPy_Interface1D.cpp | 156 ++- .../freestyle/intern/python/BPy_Iterator.cpp | 64 +- .../intern/python/BPy_MediumType.cpp | 20 +- .../freestyle/intern/python/BPy_Nature.cpp | 54 +- .../freestyle/intern/python/BPy_Operators.cpp | 353 ++--- .../freestyle/intern/python/BPy_SShape.cpp | 79 +- .../intern/python/BPy_StrokeAttribute.cpp | 310 +++-- .../intern/python/BPy_StrokeShader.cpp | 22 +- .../intern/python/BPy_UnaryFunction0D.cpp | 16 +- .../intern/python/BPy_UnaryFunction1D.cpp | 16 +- .../intern/python/BPy_UnaryPredicate0D.cpp | 16 +- .../intern/python/BPy_UnaryPredicate1D.cpp | 16 +- .../freestyle/intern/python/BPy_ViewMap.cpp | 72 +- .../freestyle/intern/python/BPy_ViewShape.cpp | 124 +- .../BinaryPredicate1D/BPy_FalseBP1D.cpp | 6 +- .../BinaryPredicate1D/BPy_Length2DBP1D.cpp | 6 +- .../BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp | 6 +- .../python/BinaryPredicate1D/BPy_TrueBP1D.cpp | 6 +- .../BPy_ViewMapGradientNormBP1D.cpp | 6 +- .../python/Interface0D/BPy_CurvePoint.cpp | 114 +- .../intern/python/Interface0D/BPy_SVertex.cpp | 166 ++- .../python/Interface0D/BPy_ViewVertex.cpp | 100 +- .../CurvePoint/BPy_StrokeVertex.cpp | 53 +- .../Interface0D/ViewVertex/BPy_NonTVertex.cpp | 11 +- .../Interface0D/ViewVertex/BPy_TVertex.cpp | 100 +- .../intern/python/Interface1D/BPy_FEdge.cpp | 136 +- .../python/Interface1D/BPy_FrsCurve.cpp | 90 +- .../intern/python/Interface1D/BPy_Stroke.cpp | 280 ++-- .../python/Interface1D/BPy_ViewEdge.cpp | 123 +- .../python/Interface1D/Curve/BPy_Chain.cpp | 82 +- .../Interface1D/FEdge/BPy_FEdgeSharp.cpp | 140 +- .../Interface1D/FEdge/BPy_FEdgeSmooth.cpp | 82 +- .../python/Iterator/BPy_AdjacencyIterator.cpp | 25 +- .../Iterator/BPy_ChainPredicateIterator.cpp | 1 + .../Iterator/BPy_ChainSilhouetteIterator.cpp | 64 +- .../python/Iterator/BPy_ChainingIterator.cpp | 73 +- .../Iterator/BPy_CurvePointIterator.cpp | 72 +- .../Iterator/BPy_Interface0DIterator.cpp | 84 +- .../python/Iterator/BPy_SVertexIterator.cpp | 31 +- .../Iterator/BPy_StrokeVertexIterator.cpp | 140 +- .../python/Iterator/BPy_ViewEdgeIterator.cpp | 106 +- .../Iterator/BPy_orientedViewEdgeIterator.cpp | 48 +- .../BPy_BackboneStretcherShader.cpp | 6 +- .../StrokeShader/BPy_BezierCurveShader.cpp | 6 +- .../StrokeShader/BPy_BlenderTextureShader.cpp | 6 +- .../StrokeShader/BPy_CalligraphicShader.cpp | 6 +- .../StrokeShader/BPy_ColorNoiseShader.cpp | 6 +- .../StrokeShader/BPy_ConstantColorShader.cpp | 6 +- .../BPy_ConstantThicknessShader.cpp | 6 +- ...y_ConstrainedIncreasingThicknessShader.cpp | 6 +- .../StrokeShader/BPy_GuidingLinesShader.cpp | 6 +- .../BPy_IncreasingColorShader.cpp | 6 +- .../BPy_IncreasingThicknessShader.cpp | 6 +- .../BPy_PolygonalizationShader.cpp | 6 +- .../StrokeShader/BPy_SamplingShader.cpp | 6 +- .../StrokeShader/BPy_SmoothingShader.cpp | 6 +- .../StrokeShader/BPy_SpatialNoiseShader.cpp | 6 +- .../BPy_StrokeTextureStepShader.cpp | 6 +- .../StrokeShader/BPy_ThicknessNoiseShader.cpp | 6 +- .../StrokeShader/BPy_TipRemoverShader.cpp | 6 +- .../BPy_UnaryFunction0DDouble.cpp | 6 +- .../BPy_UnaryFunction0DEdgeNature.cpp | 6 +- .../BPy_UnaryFunction0DFloat.cpp | 6 +- .../UnaryFunction0D/BPy_UnaryFunction0DId.cpp | 6 +- .../BPy_UnaryFunction0DMaterial.cpp | 6 +- .../BPy_UnaryFunction0DUnsigned.cpp | 6 +- .../BPy_UnaryFunction0DVec2f.cpp | 6 +- .../BPy_UnaryFunction0DVec3f.cpp | 6 +- .../BPy_UnaryFunction0DVectorViewShape.cpp | 6 +- .../BPy_UnaryFunction0DViewShape.cpp | 6 +- .../UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp | 6 +- .../BPy_MaterialF0D.cpp | 6 +- .../BPy_CurveNatureF0D.cpp | 6 +- .../UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp | 6 +- .../BPy_VertexOrientation2DF0D.cpp | 6 +- .../BPy_VertexOrientation3DF0D.cpp | 6 +- .../BPy_GetOccludeeF0D.cpp | 6 +- .../BPy_GetShapeF0D.cpp | 6 +- .../BPy_Curvature2DAngleF0D.cpp | 6 +- .../UnaryFunction0D_double/BPy_DensityF0D.cpp | 6 +- .../BPy_GetProjectedXF0D.cpp | 6 +- .../BPy_GetProjectedYF0D.cpp | 6 +- .../BPy_GetProjectedZF0D.cpp | 6 +- .../UnaryFunction0D_double/BPy_GetXF0D.cpp | 6 +- .../UnaryFunction0D_double/BPy_GetYF0D.cpp | 6 +- .../UnaryFunction0D_double/BPy_GetZF0D.cpp | 6 +- .../BPy_LocalAverageDepthF0D.cpp | 6 +- .../BPy_ZDiscontinuityF0D.cpp | 6 +- .../BPy_GetCurvilinearAbscissaF0D.cpp | 6 +- .../BPy_GetParameterF0D.cpp | 6 +- .../BPy_GetViewMapGradientNormF0D.cpp | 6 +- .../BPy_ReadCompleteViewMapPixelF0D.cpp | 6 +- .../BPy_ReadMapPixelF0D.cpp | 6 +- .../BPy_ReadSteerableViewMapPixelF0D.cpp | 6 +- .../BPy_QuantitativeInvisibilityF0D.cpp | 6 +- .../BPy_GetOccludersF0D.cpp | 6 +- .../BPy_UnaryFunction1DDouble.cpp | 16 +- .../BPy_UnaryFunction1DEdgeNature.cpp | 16 +- .../BPy_UnaryFunction1DFloat.cpp | 16 +- .../BPy_UnaryFunction1DUnsigned.cpp | 16 +- .../BPy_UnaryFunction1DVec2f.cpp | 16 +- .../BPy_UnaryFunction1DVec3f.cpp | 16 +- .../BPy_UnaryFunction1DVectorViewShape.cpp | 16 +- .../BPy_UnaryFunction1DVoid.cpp | 16 +- .../BPy_CurveNatureF1D.cpp | 6 +- .../UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp | 6 +- .../BPy_Orientation2DF1D.cpp | 6 +- .../BPy_Orientation3DF1D.cpp | 6 +- .../BPy_Curvature2DAngleF1D.cpp | 6 +- .../UnaryFunction1D_double/BPy_DensityF1D.cpp | 6 +- .../BPy_GetCompleteViewMapDensityF1D.cpp | 6 +- .../BPy_GetDirectionalViewMapDensityF1D.cpp | 6 +- .../BPy_GetProjectedXF1D.cpp | 6 +- .../BPy_GetProjectedYF1D.cpp | 6 +- .../BPy_GetProjectedZF1D.cpp | 6 +- .../BPy_GetSteerableViewMapDensityF1D.cpp | 6 +- .../BPy_GetViewMapGradientNormF1D.cpp | 6 +- .../UnaryFunction1D_double/BPy_GetXF1D.cpp | 6 +- .../UnaryFunction1D_double/BPy_GetYF1D.cpp | 6 +- .../UnaryFunction1D_double/BPy_GetZF1D.cpp | 6 +- .../BPy_LocalAverageDepthF1D.cpp | 6 +- .../BPy_ZDiscontinuityF1D.cpp | 6 +- .../BPy_QuantitativeInvisibilityF1D.cpp | 6 +- .../BPy_GetOccludeeF1D.cpp | 6 +- .../BPy_GetOccludersF1D.cpp | 6 +- .../BPy_GetShapeF1D.cpp | 6 +- .../BPy_ChainingTimeStampF1D.cpp | 6 +- .../BPy_IncrementChainingTimeStampF1D.cpp | 6 +- .../UnaryFunction1D_void/BPy_TimeStampF1D.cpp | 6 +- .../python/UnaryPredicate0D/BPy_FalseUP0D.cpp | 6 +- .../python/UnaryPredicate0D/BPy_TrueUP0D.cpp | 6 +- .../UnaryPredicate1D/BPy_ContourUP1D.cpp | 6 +- .../BPy_DensityLowerThanUP1D.cpp | 6 +- .../BPy_EqualToChainingTimeStampUP1D.cpp | 6 +- .../BPy_EqualToTimeStampUP1D.cpp | 6 +- .../BPy_ExternalContourUP1D.cpp | 6 +- .../python/UnaryPredicate1D/BPy_FalseUP1D.cpp | 6 +- .../BPy_QuantitativeInvisibilityUP1D.cpp | 6 +- .../python/UnaryPredicate1D/BPy_ShapeUP1D.cpp | 6 +- .../python/UnaryPredicate1D/BPy_TrueUP1D.cpp | 6 +- .../BPy_WithinImageBoundaryUP1D.cpp | 6 +- source/blender/python/bmesh/bmesh_py_api.cc | 74 +- .../blender/python/bmesh/bmesh_py_geometry.cc | 30 +- source/blender/python/bmesh/bmesh_py_ops.cc | 5 +- source/blender/python/bmesh/bmesh_py_types.cc | 1193 ++++++++++------- .../python/bmesh/bmesh_py_types_customdata.cc | 294 ++-- .../python/bmesh/bmesh_py_types_meshdata.cc | 141 +- .../python/bmesh/bmesh_py_types_select.cc | 42 +- source/blender/python/bmesh/bmesh_py_utils.cc | 287 ++-- .../blender/python/generic/bl_math_py_api.cc | 95 +- source/blender/python/generic/blf_py_api.cc | 405 +++--- .../blender/python/generic/idprop_py_api.cc | 105 +- .../python/generic/idprop_py_ui_api.cc | 59 +- source/blender/python/generic/imbuf_py_api.cc | 166 ++- source/blender/python/gpu/gpu_py_api.cc | 8 +- source/blender/python/gpu/gpu_py_batch.cc | 57 +- source/blender/python/gpu/gpu_py_buffer.cc | 1 + .../blender/python/gpu/gpu_py_capabilities.cc | 319 +++-- source/blender/python/gpu/gpu_py_compute.cc | 38 +- source/blender/python/gpu/gpu_py_element.cc | 26 +- .../blender/python/gpu/gpu_py_framebuffer.cc | 145 +- source/blender/python/gpu/gpu_py_matrix.cc | 207 +-- source/blender/python/gpu/gpu_py_offscreen.cc | 107 +- source/blender/python/gpu/gpu_py_platform.cc | 87 +- source/blender/python/gpu/gpu_py_select.cc | 21 +- source/blender/python/gpu/gpu_py_shader.cc | 301 +++-- .../python/gpu/gpu_py_shader_create_info.cc | 386 +++--- source/blender/python/gpu/gpu_py_state.cc | 308 +++-- source/blender/python/gpu/gpu_py_texture.cc | 78 +- .../python/gpu/gpu_py_uniformbuffer.cc | 38 +- .../python/gpu/gpu_py_vertex_buffer.cc | 40 +- .../python/gpu/gpu_py_vertex_format.cc | 11 +- source/blender/python/intern/bpy.cc | 190 +-- source/blender/python/intern/bpy_app.cc | 88 +- source/blender/python/intern/bpy_app_icons.cc | 31 +- .../blender/python/intern/bpy_app_timers.cc | 37 +- .../python/intern/bpy_app_translations.cc | 203 +-- .../blender/python/intern/bpy_library_load.cc | 1 + .../python/intern/bpy_library_write.cc | 1 + source/blender/python/intern/bpy_msgbus.cc | 12 +- source/blender/python/intern/bpy_props.cc | 367 ++--- source/blender/python/intern/bpy_rna.cc | 652 +++++---- .../blender/python/intern/bpy_rna_context.cc | 52 +- source/blender/python/intern/bpy_rna_data.cc | 24 +- source/blender/python/intern/bpy_rna_gizmo.cc | 55 +- .../python/intern/bpy_rna_id_collection.cc | 98 +- .../blender/python/intern/bpy_rna_operator.cc | 22 +- source/blender/python/intern/bpy_rna_text.cc | 52 +- .../python/intern/bpy_rna_types_capi.cc | 45 +- source/blender/python/intern/bpy_rna_ui.cc | 10 +- .../python/intern/bpy_utils_previews.cc | 21 +- .../blender/python/intern/bpy_utils_units.cc | 58 +- source/blender/python/mathutils/mathutils.cc | 1 + .../python/mathutils/mathutils_Color.cc | 200 ++- .../python/mathutils/mathutils_Euler.cc | 131 +- .../python/mathutils/mathutils_Matrix.cc | 602 +++++---- .../python/mathutils/mathutils_Quaternion.cc | 401 +++--- .../python/mathutils/mathutils_Vector.cc | 525 +++++--- .../python/mathutils/mathutils_bvhtree.cc | 97 +- .../python/mathutils/mathutils_geometry.cc | 455 ++++--- .../python/mathutils/mathutils_interpolate.cc | 23 +- .../python/mathutils/mathutils_kdtree.cc | 133 +- .../python/mathutils/mathutils_noise.cc | 316 +++-- 213 files changed, 8505 insertions(+), 6231 deletions(-) diff --git a/source/blender/freestyle/intern/python/BPy_BBox.cpp b/source/blender/freestyle/intern/python/BPy_BBox.cpp index e03cf51e644..343264af27d 100644 --- a/source/blender/freestyle/intern/python/BPy_BBox.cpp +++ b/source/blender/freestyle/intern/python/BPy_BBox.cpp @@ -35,12 +35,14 @@ int BBox_Init(PyObject *module) //------------------------INSTANCE METHODS ---------------------------------- -PyDoc_STRVAR(BBox_doc, - "Class for representing a bounding box.\n" - "\n" - ".. method:: __init__()\n" - "\n" - " Default constructor."); +PyDoc_STRVAR( + /* Wrap. */ + BBox_doc, + "Class for representing a bounding box.\n" + "\n" + ".. method:: __init__()\n" + "\n" + " Default constructor."); static int BBox_init(BPy_BBox *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp b/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp index 3da7debd703..08d6a9e0a96 100644 --- a/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp @@ -37,7 +37,9 @@ int BinaryPredicate0D_Init(PyObject *module) //------------------------INSTANCE METHODS ---------------------------------- -static char BinaryPredicate0D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + BinaryPredicate0D___doc__, "Base class for binary predicates working on :class:`Interface0D`\n" "objects. A BinaryPredicate0D is typically an ordering relation\n" "between two Interface0D objects. The predicate evaluates a relation\n" @@ -58,7 +60,7 @@ static char BinaryPredicate0D___doc__[] = " :arg inter2: The second Interface0D object.\n" " :type inter2: :class:`Interface0D`\n" " :return: True or false.\n" - " :rtype: bool\n"; + " :rtype: bool\n"); static int BinaryPredicate0D___init__(BPy_BinaryPredicate0D *self, PyObject *args, PyObject *kwds) { @@ -112,10 +114,12 @@ static PyObject *BinaryPredicate0D___call__(BPy_BinaryPredicate0D *self, /*----------------------BinaryPredicate0D get/setters ----------------------------*/ -PyDoc_STRVAR(BinaryPredicate0D_name_doc, - "The name of the binary 0D predicate.\n" - "\n" - ":type: str"); +PyDoc_STRVAR( + /* Wrap. */ + BinaryPredicate0D_name_doc, + "The name of the binary 0D predicate.\n" + "\n" + ":type: str"); static PyObject *BinaryPredicate0D_name_get(BPy_BinaryPredicate0D *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp b/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp index 6f4b89a0182..146060a0c3f 100644 --- a/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp @@ -73,7 +73,9 @@ int BinaryPredicate1D_Init(PyObject *module) //------------------------INSTANCE METHODS ---------------------------------- -static char BinaryPredicate1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + BinaryPredicate1D___doc__, "Base class for binary predicates working on :class:`Interface1D`\n" "objects. A BinaryPredicate1D is typically an ordering relation\n" "between two Interface1D objects. The predicate evaluates a relation\n" @@ -94,7 +96,7 @@ static char BinaryPredicate1D___doc__[] = " :arg inter2: The second Interface1D object.\n" " :type inter2: :class:`Interface1D`\n" " :return: True or false.\n" - " :rtype: bool\n"; + " :rtype: bool\n"); static int BinaryPredicate1D___init__(BPy_BinaryPredicate1D *self, PyObject *args, PyObject *kwds) { @@ -147,10 +149,12 @@ static PyObject *BinaryPredicate1D___call__(BPy_BinaryPredicate1D *self, /*----------------------BinaryPredicate0D get/setters ----------------------------*/ -PyDoc_STRVAR(BinaryPredicate1D_name_doc, - "The name of the binary 1D predicate.\n" - "\n" - ":type: str"); +PyDoc_STRVAR( + /* Wrap. */ + BinaryPredicate1D_name_doc, + "The name of the binary 1D predicate.\n" + "\n" + ":type: str"); static PyObject *BinaryPredicate1D_name_get(BPy_BinaryPredicate1D *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp b/source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp index 61647502135..e8828e77a42 100644 --- a/source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp +++ b/source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp @@ -23,52 +23,60 @@ extern "C" { //------------------------ MODULE FUNCTIONS ---------------------------------- -static char ContextFunctions_get_time_stamp___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + ContextFunctions_get_time_stamp___doc__, ".. function:: get_time_stamp()\n" "\n" " Returns the system time stamp.\n" "\n" " :return: The system time stamp.\n" - " :rtype: int\n"; + " :rtype: int\n"); static PyObject *ContextFunctions_get_time_stamp(PyObject * /*self*/) { return PyLong_FromLong(ContextFunctions::GetTimeStampCF()); } -static char ContextFunctions_get_canvas_width___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + ContextFunctions_get_canvas_width___doc__, ".. method:: get_canvas_width()\n" "\n" " Returns the canvas width.\n" "\n" " :return: The canvas width.\n" - " :rtype: int\n"; + " :rtype: int\n"); static PyObject *ContextFunctions_get_canvas_width(PyObject * /*self*/) { return PyLong_FromLong(ContextFunctions::GetCanvasWidthCF()); } -static char ContextFunctions_get_canvas_height___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + ContextFunctions_get_canvas_height___doc__, ".. method:: get_canvas_height()\n" "\n" " Returns the canvas height.\n" "\n" " :return: The canvas height.\n" - " :rtype: int\n"; + " :rtype: int\n"); static PyObject *ContextFunctions_get_canvas_height(PyObject * /*self*/) { return PyLong_FromLong(ContextFunctions::GetCanvasHeightCF()); } -static char ContextFunctions_get_border___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + ContextFunctions_get_border___doc__, ".. method:: get_border()\n" "\n" " Returns the border.\n" "\n" " :return: A tuple of 4 numbers (xmin, ymin, xmax, ymax).\n" - " :rtype: tuple\n"; + " :rtype: tuple\n"); static PyObject *ContextFunctions_get_border(PyObject * /*self*/) { @@ -82,7 +90,9 @@ static PyObject *ContextFunctions_get_border(PyObject * /*self*/) return v; } -static char ContextFunctions_load_map___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + ContextFunctions_load_map___doc__, ".. function:: load_map(file_name, map_name, num_levels=4, sigma=1.0)\n" "\n" " Loads an image map for further reading.\n" @@ -96,7 +106,7 @@ static char ContextFunctions_load_map___doc__[] = " built.\n" " :type num_levels: int\n" " :arg sigma: The sigma value of the gaussian function.\n" - " :type sigma: float\n"; + " :type sigma: float\n"); static PyObject *ContextFunctions_load_map(PyObject * /*self*/, PyObject *args, PyObject *kwds) { @@ -114,7 +124,9 @@ static PyObject *ContextFunctions_load_map(PyObject * /*self*/, PyObject *args, Py_RETURN_NONE; } -static char ContextFunctions_read_map_pixel___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + ContextFunctions_read_map_pixel___doc__, ".. function:: read_map_pixel(map_name, level, x, y)\n" "\n" " Reads a pixel in a user-defined map.\n" @@ -131,7 +143,7 @@ static char ContextFunctions_read_map_pixel___doc__[] = " is in the lower-left corner.\n" " :type y: int\n" " :return: The floating-point value stored for that pixel.\n" - " :rtype: float\n"; + " :rtype: float\n"); static PyObject *ContextFunctions_read_map_pixel(PyObject * /*self*/, PyObject *args, @@ -149,7 +161,9 @@ static PyObject *ContextFunctions_read_map_pixel(PyObject * /*self*/, return PyFloat_FromDouble(ContextFunctions::ReadMapPixelCF(mapName, level, x, y)); } -static char ContextFunctions_read_complete_view_map_pixel___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + ContextFunctions_read_complete_view_map_pixel___doc__, ".. function:: read_complete_view_map_pixel(level, x, y)\n" "\n" " Reads a pixel in the complete view map.\n" @@ -164,7 +178,7 @@ static char ContextFunctions_read_complete_view_map_pixel___doc__[] = " is in the lower-left corner.\n" " :type y: int\n" " :return: The floating-point value stored for that pixel.\n" - " :rtype: float\n"; + " :rtype: float\n"); static PyObject *ContextFunctions_read_complete_view_map_pixel(PyObject * /*self*/, PyObject *args, @@ -180,7 +194,9 @@ static PyObject *ContextFunctions_read_complete_view_map_pixel(PyObject * /*self return PyFloat_FromDouble(ContextFunctions::ReadCompleteViewMapPixelCF(level, x, y)); } -static char ContextFunctions_read_directional_view_map_pixel___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + ContextFunctions_read_directional_view_map_pixel___doc__, ".. function:: read_directional_view_map_pixel(orientation, level, x, y)\n" "\n" " Reads a pixel in one of the oriented view map images.\n" @@ -198,7 +214,7 @@ static char ContextFunctions_read_directional_view_map_pixel___doc__[] = " is in the lower-left corner.\n" " :type y: int\n" " :return: The floating-point value stored for that pixel.\n" - " :rtype: float\n"; + " :rtype: float\n"); static PyObject *ContextFunctions_read_directional_view_map_pixel(PyObject * /*self*/, PyObject *args, @@ -217,13 +233,15 @@ static PyObject *ContextFunctions_read_directional_view_map_pixel(PyObject * /*s ContextFunctions::ReadDirectionalViewMapPixelCF(orientation, level, x, y)); } -static char ContextFunctions_get_selected_fedge___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + ContextFunctions_get_selected_fedge___doc__, ".. function:: get_selected_fedge()\n" "\n" " Returns the selected FEdge.\n" "\n" " :return: The selected FEdge.\n" - " :rtype: :class:`FEdge`\n"; + " :rtype: :class:`FEdge`\n"); static PyObject *ContextFunctions_get_selected_fedge(PyObject * /*self*/) { @@ -236,7 +254,11 @@ static PyObject *ContextFunctions_get_selected_fedge(PyObject * /*self*/) /*-----------------------ContextFunctions module docstring-------------------------------*/ -static char module_docstring[] = "The Blender Freestyle.ContextFunctions submodule\n\n"; +PyDoc_STRVAR( + /* Wrap. */ + module_docstring, + "The Blender Freestyle.ContextFunctions submodule\n" + "\n"); /*-----------------------ContextFunctions module functions definitions-------------------*/ diff --git a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp index fc5de0e7cce..1fdbec98a1f 100644 --- a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp +++ b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp @@ -53,13 +53,15 @@ extern "C" { //------------------------ MODULE FUNCTIONS ---------------------------------- -static char Freestyle_getCurrentScene___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + Freestyle_getCurrentScene___doc__, ".. function:: getCurrentScene()\n" "\n" " Returns the current scene.\n" "\n" " :return: The current scene.\n" - " :rtype: :class:`bpy.types.Scene`\n"; + " :rtype: :class:`bpy.types.Scene`\n"); static PyObject *Freestyle_getCurrentScene(PyObject * /*self*/) { @@ -138,7 +140,9 @@ static int ramp_blend_type(const char *type) #include "BKE_material.h" /* ramp_blend() */ -static char Freestyle_blendRamp___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + Freestyle_blendRamp___doc__, ".. function:: blendRamp(type, color1, fac, color2)\n" "\n" " Blend two colors according to a ramp blend type.\n" @@ -152,7 +156,7 @@ static char Freestyle_blendRamp___doc__[] = " :arg color2: 1st color.\n" " :type color2: :class:`mathutils.Vector`, list or tuple of 3 real numbers\n" " :return: Blended color in RGB format.\n" - " :rtype: :class:`mathutils.Vector`\n"; + " :rtype: :class:`mathutils.Vector`\n"); static PyObject *Freestyle_blendRamp(PyObject * /*self*/, PyObject *args) { @@ -191,7 +195,9 @@ static PyObject *Freestyle_blendRamp(PyObject * /*self*/, PyObject *args) return Vector_CreatePyObject(a, 3, nullptr); } -static char Freestyle_evaluateColorRamp___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + Freestyle_evaluateColorRamp___doc__, ".. function:: evaluateColorRamp(ramp, in)\n" "\n" " Evaluate a color ramp at a point in the interval 0 to 1.\n" @@ -201,7 +207,7 @@ static char Freestyle_evaluateColorRamp___doc__[] = " :arg in: Value in the interval 0 to 1.\n" " :type in: float\n" " :return: color in RGBA format.\n" - " :rtype: :class:`mathutils.Vector`\n"; + " :rtype: :class:`mathutils.Vector`\n"); static PyObject *Freestyle_evaluateColorRamp(PyObject * /*self*/, PyObject *args) { @@ -226,7 +232,9 @@ static PyObject *Freestyle_evaluateColorRamp(PyObject * /*self*/, PyObject *args #include "DNA_color_types.h" -static char Freestyle_evaluateCurveMappingF___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + Freestyle_evaluateCurveMappingF___doc__, ".. function:: evaluateCurveMappingF(cumap, cur, value)\n" "\n" " Evaluate a curve mapping at a point in the interval 0 to 1.\n" @@ -238,7 +246,7 @@ static char Freestyle_evaluateCurveMappingF___doc__[] = " :arg value: Input value in the interval 0 to 1.\n" " :type value: float\n" " :return: Mapped output value.\n" - " :rtype: float\n"; + " :rtype: float\n"); static PyObject *Freestyle_evaluateCurveMappingF(PyObject * /*self*/, PyObject *args) { @@ -270,7 +278,9 @@ static PyObject *Freestyle_evaluateCurveMappingF(PyObject * /*self*/, PyObject * /*-----------------------Freestyle module docstring----------------------------*/ -static char module_docstring[] = +PyDoc_STRVAR( + /* Force wrapped line. */ + module_docstring, "This module provides classes for defining line drawing rules (such as\n" "predicates, functions, chaining iterators, and stroke shaders), as well\n" "as helper functions for style module writing.\n" @@ -492,7 +502,7 @@ static char module_docstring[] = "- :class:`IntegrationType`\n" "- :class:`MediumType`\n" "- :class:`Nature`\n" - "\n"; + "\n"); /*-----------------------Freestyle module method def---------------------------*/ diff --git a/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp b/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp index 60e19313db9..2c24f5a8422 100644 --- a/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp +++ b/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp @@ -43,6 +43,7 @@ int FrsMaterial_Init(PyObject *module) //------------------------INSTANCE METHODS ---------------------------------- PyDoc_STRVAR( + /* Wrap. */ FrsMaterial_doc, "Class defining a material.\n" "\n" @@ -302,10 +303,12 @@ void FrsMaterial_mathutils_register_callback() /*----------------------FrsMaterial get/setters ----------------------------*/ -PyDoc_STRVAR(FrsMaterial_line_doc, - "RGBA components of the line color of the material.\n" - "\n" - ":type: :class:`mathutils.Vector`"); +PyDoc_STRVAR( + /* Wrap. */ + FrsMaterial_line_doc, + "RGBA components of the line color of the material.\n" + "\n" + ":type: :class:`mathutils.Vector`"); static PyObject *FrsMaterial_line_get(BPy_FrsMaterial *self, void * /*closure*/) { @@ -323,10 +326,12 @@ static int FrsMaterial_line_set(BPy_FrsMaterial *self, PyObject *value, void * / return 0; } -PyDoc_STRVAR(FrsMaterial_diffuse_doc, - "RGBA components of the diffuse color of the material.\n" - "\n" - ":type: :class:`mathutils.Vector`"); +PyDoc_STRVAR( + /* Wrap. */ + FrsMaterial_diffuse_doc, + "RGBA components of the diffuse color of the material.\n" + "\n" + ":type: :class:`mathutils.Vector`"); static PyObject *FrsMaterial_diffuse_get(BPy_FrsMaterial *self, void * /*closure*/) { @@ -344,10 +349,12 @@ static int FrsMaterial_diffuse_set(BPy_FrsMaterial *self, PyObject *value, void return 0; } -PyDoc_STRVAR(FrsMaterial_specular_doc, - "RGBA components of the specular color of the material.\n" - "\n" - ":type: :class:`mathutils.Vector`"); +PyDoc_STRVAR( + /* Wrap. */ + FrsMaterial_specular_doc, + "RGBA components of the specular color of the material.\n" + "\n" + ":type: :class:`mathutils.Vector`"); static PyObject *FrsMaterial_specular_get(BPy_FrsMaterial *self, void * /*closure*/) { @@ -365,10 +372,12 @@ static int FrsMaterial_specular_set(BPy_FrsMaterial *self, PyObject *value, void return 0; } -PyDoc_STRVAR(FrsMaterial_ambient_doc, - "RGBA components of the ambient color of the material.\n" - "\n" - ":type: :class:`mathutils.Color`"); +PyDoc_STRVAR( + /* Wrap. */ + FrsMaterial_ambient_doc, + "RGBA components of the ambient color of the material.\n" + "\n" + ":type: :class:`mathutils.Color`"); static PyObject *FrsMaterial_ambient_get(BPy_FrsMaterial *self, void * /*closure*/) { @@ -386,10 +395,12 @@ static int FrsMaterial_ambient_set(BPy_FrsMaterial *self, PyObject *value, void return 0; } -PyDoc_STRVAR(FrsMaterial_emission_doc, - "RGBA components of the emissive color of the material.\n" - "\n" - ":type: :class:`mathutils.Color`"); +PyDoc_STRVAR( + /* Wrap. */ + FrsMaterial_emission_doc, + "RGBA components of the emissive color of the material.\n" + "\n" + ":type: :class:`mathutils.Color`"); static PyObject *FrsMaterial_emission_get(BPy_FrsMaterial *self, void * /*closure*/) { @@ -407,10 +418,12 @@ static int FrsMaterial_emission_set(BPy_FrsMaterial *self, PyObject *value, void return 0; } -PyDoc_STRVAR(FrsMaterial_shininess_doc, - "Shininess coefficient of the material.\n" - "\n" - ":type: float"); +PyDoc_STRVAR( + /* Wrap. */ + FrsMaterial_shininess_doc, + "Shininess coefficient of the material.\n" + "\n" + ":type: float"); static PyObject *FrsMaterial_shininess_get(BPy_FrsMaterial *self, void * /*closure*/) { @@ -429,10 +442,12 @@ static int FrsMaterial_shininess_set(BPy_FrsMaterial *self, PyObject *value, voi return 0; } -PyDoc_STRVAR(FrsMaterial_priority_doc, - "Line color priority of the material.\n" - "\n" - ":type: int"); +PyDoc_STRVAR( + /* Wrap. */ + FrsMaterial_priority_doc, + "Line color priority of the material.\n" + "\n" + ":type: int"); static PyObject *FrsMaterial_priority_get(BPy_FrsMaterial *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp b/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp index 7bf678bf6bc..24bf920c4f4 100644 --- a/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp +++ b/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp @@ -41,17 +41,19 @@ int FrsNoise_Init(PyObject *module) //------------------------INSTANCE METHODS ---------------------------------- -PyDoc_STRVAR(FrsNoise_doc, - "Class to provide Perlin noise functionalities.\n" - "\n" - ".. method:: __init__(seed = -1)\n" - "\n" - " Builds a Noise object. Seed is an optional argument. The seed value is used\n" - " as a seed for random number generation if it is equal to or greater than zero;\n" - " otherwise, time is used as a seed.\n" - "\n" - " :arg seed: Seed for random number generation.\n" - " :type seed: int"); +PyDoc_STRVAR( + /* Wrap. */ + FrsNoise_doc, + "Class to provide Perlin noise functionalities.\n" + "\n" + ".. method:: __init__(seed = -1)\n" + "\n" + " Builds a Noise object. Seed is an optional argument. The seed value is used\n" + " as a seed for random number generation if it is equal to or greater than zero;\n" + " otherwise, time is used as a seed.\n" + "\n" + " :arg seed: Seed for random number generation.\n" + " :type seed: int"); static int FrsNoise_init(BPy_FrsNoise *self, PyObject *args, PyObject *kwds) { @@ -78,21 +80,23 @@ static PyObject *FrsNoise_repr(BPy_FrsNoise *self) return PyUnicode_FromFormat("Noise - address: %p", self->n); } -PyDoc_STRVAR(FrsNoise_turbulence1_doc, - ".. method:: turbulence1(v, freq, amp, oct=4)\n" - "\n" - " Returns a noise value for a 1D element.\n" - "\n" - " :arg v: One-dimensional sample point.\n" - " :type v: float\n" - " :arg freq: Noise frequency.\n" - " :type freq: float\n" - " :arg amp: Amplitude.\n" - " :type amp: float\n" - " :arg oct: Number of octaves.\n" - " :type oct: int\n" - " :return: A noise value.\n" - " :rtype: float"); +PyDoc_STRVAR( + /* Wrap. */ + FrsNoise_turbulence1_doc, + ".. method:: turbulence1(v, freq, amp, oct=4)\n" + "\n" + " Returns a noise value for a 1D element.\n" + "\n" + " :arg v: One-dimensional sample point.\n" + " :type v: float\n" + " :arg freq: Noise frequency.\n" + " :type freq: float\n" + " :arg amp: Amplitude.\n" + " :type amp: float\n" + " :arg oct: Number of octaves.\n" + " :type oct: int\n" + " :return: A noise value.\n" + " :rtype: float"); static PyObject *FrsNoise_drand(BPy_FrsNoise * /*self*/, PyObject *args, PyObject *kwds) { @@ -133,21 +137,23 @@ static PyObject *FrsNoise_turbulence1(BPy_FrsNoise *self, PyObject *args, PyObje return PyFloat_FromDouble(self->n->turbulence1(f1, f2, f3, i)); } -PyDoc_STRVAR(FrsNoise_turbulence2_doc, - ".. method:: turbulence2(v, freq, amp, oct=4)\n" - "\n" - " Returns a noise value for a 2D element.\n" - "\n" - " :arg v: Two-dimensional sample point.\n" - " :type v: :class:`mathutils.Vector`, list or tuple of 2 real numbers\n" - " :arg freq: Noise frequency.\n" - " :type freq: float\n" - " :arg amp: Amplitude.\n" - " :type amp: float\n" - " :arg oct: Number of octaves.\n" - " :type oct: int\n" - " :return: A noise value.\n" - " :rtype: float"); +PyDoc_STRVAR( + /* Wrap. */ + FrsNoise_turbulence2_doc, + ".. method:: turbulence2(v, freq, amp, oct=4)\n" + "\n" + " Returns a noise value for a 2D element.\n" + "\n" + " :arg v: Two-dimensional sample point.\n" + " :type v: :class:`mathutils.Vector`, list or tuple of 2 real numbers\n" + " :arg freq: Noise frequency.\n" + " :type freq: float\n" + " :arg amp: Amplitude.\n" + " :type amp: float\n" + " :arg oct: Number of octaves.\n" + " :type oct: int\n" + " :return: A noise value.\n" + " :rtype: float"); static PyObject *FrsNoise_turbulence2(BPy_FrsNoise *self, PyObject *args, PyObject *kwds) { @@ -169,21 +175,23 @@ static PyObject *FrsNoise_turbulence2(BPy_FrsNoise *self, PyObject *args, PyObje return PyFloat_FromDouble(t); } -PyDoc_STRVAR(FrsNoise_turbulence3_doc, - ".. method:: turbulence3(v, freq, amp, oct=4)\n" - "\n" - " Returns a noise value for a 3D element.\n" - "\n" - " :arg v: Three-dimensional sample point.\n" - " :type v: :class:`mathutils.Vector`, list or tuple of 3 real numbers\n" - " :arg freq: Noise frequency.\n" - " :type freq: float\n" - " :arg amp: Amplitude.\n" - " :type amp: float\n" - " :arg oct: Number of octaves.\n" - " :type oct: int\n" - " :return: A noise value.\n" - " :rtype: float"); +PyDoc_STRVAR( + /* Wrap. */ + FrsNoise_turbulence3_doc, + ".. method:: turbulence3(v, freq, amp, oct=4)\n" + "\n" + " Returns a noise value for a 3D element.\n" + "\n" + " :arg v: Three-dimensional sample point.\n" + " :type v: :class:`mathutils.Vector`, list or tuple of 3 real numbers\n" + " :arg freq: Noise frequency.\n" + " :type freq: float\n" + " :arg amp: Amplitude.\n" + " :type amp: float\n" + " :arg oct: Number of octaves.\n" + " :type oct: int\n" + " :return: A noise value.\n" + " :rtype: float"); static PyObject *FrsNoise_turbulence3(BPy_FrsNoise *self, PyObject *args, PyObject *kwds) { @@ -205,15 +213,17 @@ static PyObject *FrsNoise_turbulence3(BPy_FrsNoise *self, PyObject *args, PyObje return PyFloat_FromDouble(t); } -PyDoc_STRVAR(FrsNoise_smoothNoise1_doc, - ".. method:: smoothNoise1(v)\n" - "\n" - " Returns a smooth noise value for a 1D element.\n" - "\n" - " :arg v: One-dimensional sample point.\n" - " :type v: float\n" - " :return: A smooth noise value.\n" - " :rtype: float"); +PyDoc_STRVAR( + /* Wrap. */ + FrsNoise_smoothNoise1_doc, + ".. method:: smoothNoise1(v)\n" + "\n" + " Returns a smooth noise value for a 1D element.\n" + "\n" + " :arg v: One-dimensional sample point.\n" + " :type v: float\n" + " :return: A smooth noise value.\n" + " :rtype: float"); static PyObject *FrsNoise_smoothNoise1(BPy_FrsNoise *self, PyObject *args, PyObject *kwds) { @@ -226,15 +236,17 @@ static PyObject *FrsNoise_smoothNoise1(BPy_FrsNoise *self, PyObject *args, PyObj return PyFloat_FromDouble(self->n->smoothNoise1(f)); } -PyDoc_STRVAR(FrsNoise_smoothNoise2_doc, - ".. method:: smoothNoise2(v)\n" - "\n" - " Returns a smooth noise value for a 2D element.\n" - "\n" - " :arg v: Two-dimensional sample point.\n" - " :type v: :class:`mathutils.Vector`, list or tuple of 2 real numbers\n" - " :return: A smooth noise value.\n" - " :rtype: float"); +PyDoc_STRVAR( + /* Wrap. */ + FrsNoise_smoothNoise2_doc, + ".. method:: smoothNoise2(v)\n" + "\n" + " Returns a smooth noise value for a 2D element.\n" + "\n" + " :arg v: Two-dimensional sample point.\n" + " :type v: :class:`mathutils.Vector`, list or tuple of 2 real numbers\n" + " :return: A smooth noise value.\n" + " :rtype: float"); static PyObject *FrsNoise_smoothNoise2(BPy_FrsNoise *self, PyObject *args, PyObject *kwds) { @@ -254,15 +266,17 @@ static PyObject *FrsNoise_smoothNoise2(BPy_FrsNoise *self, PyObject *args, PyObj return PyFloat_FromDouble(t); } -PyDoc_STRVAR(FrsNoise_smoothNoise3_doc, - ".. method:: smoothNoise3(v)\n" - "\n" - " Returns a smooth noise value for a 3D element.\n" - "\n" - " :arg v: Three-dimensional sample point.\n" - " :type v: :class:`mathutils.Vector`, list or tuple of 3 real numbers\n" - " :return: A smooth noise value.\n" - " :rtype: float"); +PyDoc_STRVAR( + /* Wrap. */ + FrsNoise_smoothNoise3_doc, + ".. method:: smoothNoise3(v)\n" + "\n" + " Returns a smooth noise value for a 3D element.\n" + "\n" + " :arg v: Three-dimensional sample point.\n" + " :type v: :class:`mathutils.Vector`, list or tuple of 3 real numbers\n" + " :return: A smooth noise value.\n" + " :rtype: float"); static PyObject *FrsNoise_smoothNoise3(BPy_FrsNoise *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/BPy_Id.cpp b/source/blender/freestyle/intern/python/BPy_Id.cpp index 07d48947f65..ca77172733d 100644 --- a/source/blender/freestyle/intern/python/BPy_Id.cpp +++ b/source/blender/freestyle/intern/python/BPy_Id.cpp @@ -37,6 +37,7 @@ int Id_Init(PyObject *module) //------------------------INSTANCE METHODS ---------------------------------- PyDoc_STRVAR( + /* Wrap. */ Id_doc, "Class for representing an object Id.\n" "\n" @@ -107,10 +108,12 @@ static PyObject *Id_RichCompare(BPy_Id *o1, BPy_Id *o2, int opid) /*----------------------Id get/setters ----------------------------*/ -PyDoc_STRVAR(Id_first_doc, - "The first number constituting the Id.\n" - "\n" - ":type: int"); +PyDoc_STRVAR( + /* Wrap. */ + Id_first_doc, + "The first number constituting the Id.\n" + "\n" + ":type: int"); static PyObject *Id_first_get(BPy_Id *self, void * /*closure*/) { @@ -128,10 +131,12 @@ static int Id_first_set(BPy_Id *self, PyObject *value, void * /*closure*/) return 0; } -PyDoc_STRVAR(Id_second_doc, - "The second number constituting the Id.\n" - "\n" - ":type: int"); +PyDoc_STRVAR( + /* Wrap. */ + Id_second_doc, + "The second number constituting the Id.\n" + "\n" + ":type: int"); static PyObject *Id_second_get(BPy_Id *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp b/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp index ba2737d0c5b..1cf065add63 100644 --- a/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp +++ b/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp @@ -26,30 +26,32 @@ using namespace Freestyle; //------------------------ MODULE FUNCTIONS ---------------------------------- -PyDoc_STRVAR(Integrator_integrate_doc, - ".. function:: integrate(func, it, it_end, integration_type)\n" - "\n" - " Returns a single value from a set of values evaluated at each 0D\n" - " element of this 1D element.\n" - "\n" - " :arg func: The UnaryFunction0D used to compute a value at each\n" - " Interface0D.\n" - " :type func: :class:`UnaryFunction0D`\n" - " :arg it: The Interface0DIterator used to iterate over the 0D\n" - " elements of this 1D element. The integration will occur over\n" - " the 0D elements starting from the one pointed by it.\n" - " :type it: :class:`Interface0DIterator`\n" - " :arg it_end: The Interface0DIterator pointing the end of the 0D\n" - " elements of the 1D element.\n" - " :type it_end: :class:`Interface0DIterator`\n" - " :arg integration_type: The integration method used to compute a\n" - " single value from a set of values.\n" - " :type integration_type: :class:`IntegrationType`\n" - " :return: The single value obtained for the 1D element. The return\n" - " value type is float if func is of the :class:`UnaryFunction0DDouble`\n" - " or :class:`UnaryFunction0DFloat` type, and int if func is of the\n" - " :class:`UnaryFunction0DUnsigned` type.\n" - " :rtype: int or float"); +PyDoc_STRVAR( + /* Wrap. */ + Integrator_integrate_doc, + ".. function:: integrate(func, it, it_end, integration_type)\n" + "\n" + " Returns a single value from a set of values evaluated at each 0D\n" + " element of this 1D element.\n" + "\n" + " :arg func: The UnaryFunction0D used to compute a value at each\n" + " Interface0D.\n" + " :type func: :class:`UnaryFunction0D`\n" + " :arg it: The Interface0DIterator used to iterate over the 0D\n" + " elements of this 1D element. The integration will occur over\n" + " the 0D elements starting from the one pointed by it.\n" + " :type it: :class:`Interface0DIterator`\n" + " :arg it_end: The Interface0DIterator pointing the end of the 0D\n" + " elements of the 1D element.\n" + " :type it_end: :class:`Interface0DIterator`\n" + " :arg integration_type: The integration method used to compute a\n" + " single value from a set of values.\n" + " :type integration_type: :class:`IntegrationType`\n" + " :return: The single value obtained for the 1D element. The return\n" + " value type is float if func is of the :class:`UnaryFunction0DDouble`\n" + " or :class:`UnaryFunction0DFloat` type, and int if func is of the\n" + " :class:`UnaryFunction0DUnsigned` type.\n" + " :rtype: int or float"); static PyObject *Integrator_integrate(PyObject * /*self*/, PyObject *args, PyObject *kwds) { @@ -99,7 +101,11 @@ static PyObject *Integrator_integrate(PyObject * /*self*/, PyObject *args, PyObj /*-----------------------Integrator module docstring---------------------------------------*/ -PyDoc_STRVAR(module_docstring, "The Blender Freestyle.Integrator submodule\n\n"); +PyDoc_STRVAR( + /* Wrap. */ + module_docstring, + "The Blender Freestyle.Integrator submodule\n" + "\n"); /*-----------------------Integrator module functions definitions---------------------------*/ @@ -127,23 +133,25 @@ static PyModuleDef module_definition = { /*-----------------------BPy_IntegrationType type definition ------------------------------*/ -PyDoc_STRVAR(IntegrationType_doc, - "Class hierarchy: int > :class:`IntegrationType`\n" - "\n" - "Different integration methods that can be invoked to integrate into a\n" - "single value the set of values obtained from each 0D element of an 1D\n" - "element:\n" - "\n" - "* IntegrationType.MEAN: The value computed for the 1D element is the\n" - " mean of the values obtained for the 0D elements.\n" - "* IntegrationType.MIN: The value computed for the 1D element is the\n" - " minimum of the values obtained for the 0D elements.\n" - "* IntegrationType.MAX: The value computed for the 1D element is the\n" - " maximum of the values obtained for the 0D elements.\n" - "* IntegrationType.FIRST: The value computed for the 1D element is the\n" - " first of the values obtained for the 0D elements.\n" - "* IntegrationType.LAST: The value computed for the 1D element is the\n" - " last of the values obtained for the 0D elements."); +PyDoc_STRVAR( + /* Wrap. */ + IntegrationType_doc, + "Class hierarchy: int > :class:`IntegrationType`\n" + "\n" + "Different integration methods that can be invoked to integrate into a\n" + "single value the set of values obtained from each 0D element of an 1D\n" + "element:\n" + "\n" + "* IntegrationType.MEAN: The value computed for the 1D element is the\n" + " mean of the values obtained for the 0D elements.\n" + "* IntegrationType.MIN: The value computed for the 1D element is the\n" + " minimum of the values obtained for the 0D elements.\n" + "* IntegrationType.MAX: The value computed for the 1D element is the\n" + " maximum of the values obtained for the 0D elements.\n" + "* IntegrationType.FIRST: The value computed for the 1D element is the\n" + " first of the values obtained for the 0D elements.\n" + "* IntegrationType.LAST: The value computed for the 1D element is the\n" + " last of the values obtained for the 0D elements."); PyTypeObject IntegrationType_Type = { /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0) diff --git a/source/blender/freestyle/intern/python/BPy_Interface0D.cpp b/source/blender/freestyle/intern/python/BPy_Interface0D.cpp index 50ee9154f99..84241f1a9e1 100644 --- a/source/blender/freestyle/intern/python/BPy_Interface0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_Interface0D.cpp @@ -83,12 +83,14 @@ int Interface0D_Init(PyObject *module) /*----------------------Interface1D methods ----------------------------*/ -PyDoc_STRVAR(Interface0D_doc, - "Base class for any 0D element.\n" - "\n" - ".. method:: __init__()\n" - "\n" - " Default constructor."); +PyDoc_STRVAR( + /* Wrap. */ + Interface0D_doc, + "Base class for any 0D element.\n" + "\n" + ".. method:: __init__()\n" + "\n" + " Default constructor."); static int Interface0D_init(BPy_Interface0D *self, PyObject *args, PyObject *kwds) { @@ -116,16 +118,18 @@ static PyObject *Interface0D_repr(BPy_Interface0D *self) "type: %s - address: %p", self->if0D->getExactTypeName().c_str(), self->if0D); } -PyDoc_STRVAR(Interface0D_get_fedge_doc, - ".. method:: get_fedge(inter)\n" - "\n" - " Returns the FEdge that lies between this 0D element and the 0D\n" - " element given as the argument.\n" - "\n" - " :arg inter: A 0D element.\n" - " :type inter: :class:`Interface0D`\n" - " :return: The FEdge lying between the two 0D elements.\n" - " :rtype: :class:`FEdge`"); +PyDoc_STRVAR( + /* Wrap. */ + Interface0D_get_fedge_doc, + ".. method:: get_fedge(inter)\n" + "\n" + " Returns the FEdge that lies between this 0D element and the 0D\n" + " element given as the argument.\n" + "\n" + " :arg inter: A 0D element.\n" + " :type inter: :class:`Interface0D`\n" + " :return: The FEdge lying between the two 0D elements.\n" + " :rtype: :class:`FEdge`"); static PyObject *Interface0D_get_fedge(BPy_Interface0D *self, PyObject *args, PyObject *kwds) { @@ -156,20 +160,24 @@ static PyMethodDef BPy_Interface0D_methods[] = { /*----------------------Interface1D get/setters ----------------------------*/ -PyDoc_STRVAR(Interface0D_name_doc, - "The string of the name of this 0D element.\n" - "\n" - ":type: str"); +PyDoc_STRVAR( + /* Wrap. */ + Interface0D_name_doc, + "The string of the name of this 0D element.\n" + "\n" + ":type: str"); static PyObject *Interface0D_name_get(BPy_Interface0D *self, void * /*closure*/) { return PyUnicode_FromString(Py_TYPE(self)->tp_name); } -PyDoc_STRVAR(Interface0D_point_3d_doc, - "The 3D point of this 0D element.\n" - "\n" - ":type: :class:`mathutils.Vector`"); +PyDoc_STRVAR( + /* Wrap. */ + Interface0D_point_3d_doc, + "The 3D point of this 0D element.\n" + "\n" + ":type: :class:`mathutils.Vector`"); static PyObject *Interface0D_point_3d_get(BPy_Interface0D *self, void * /*closure*/) { @@ -180,10 +188,12 @@ static PyObject *Interface0D_point_3d_get(BPy_Interface0D *self, void * /*closur return Vector_from_Vec3f(p); } -PyDoc_STRVAR(Interface0D_projected_x_doc, - "The X coordinate of the projected 3D point of this 0D element.\n" - "\n" - ":type: float"); +PyDoc_STRVAR( + /* Wrap. */ + Interface0D_projected_x_doc, + "The X coordinate of the projected 3D point of this 0D element.\n" + "\n" + ":type: float"); static PyObject *Interface0D_projected_x_get(BPy_Interface0D *self, void * /*closure*/) { @@ -194,10 +204,12 @@ static PyObject *Interface0D_projected_x_get(BPy_Interface0D *self, void * /*clo return PyFloat_FromDouble(x); } -PyDoc_STRVAR(Interface0D_projected_y_doc, - "The Y coordinate of the projected 3D point of this 0D element.\n" - "\n" - ":type: float"); +PyDoc_STRVAR( + /* Wrap. */ + Interface0D_projected_y_doc, + "The Y coordinate of the projected 3D point of this 0D element.\n" + "\n" + ":type: float"); static PyObject *Interface0D_projected_y_get(BPy_Interface0D *self, void * /*closure*/) { @@ -208,10 +220,12 @@ static PyObject *Interface0D_projected_y_get(BPy_Interface0D *self, void * /*clo return PyFloat_FromDouble(y); } -PyDoc_STRVAR(Interface0D_projected_z_doc, - "The Z coordinate of the projected 3D point of this 0D element.\n" - "\n" - ":type: float"); +PyDoc_STRVAR( + /* Wrap. */ + Interface0D_projected_z_doc, + "The Z coordinate of the projected 3D point of this 0D element.\n" + "\n" + ":type: float"); static PyObject *Interface0D_projected_z_get(BPy_Interface0D *self, void * /*closure*/) { @@ -222,10 +236,12 @@ static PyObject *Interface0D_projected_z_get(BPy_Interface0D *self, void * /*clo return PyFloat_FromDouble(z); } -PyDoc_STRVAR(Interface0D_point_2d_doc, - "The 2D point of this 0D element.\n" - "\n" - ":type: :class:`mathutils.Vector`"); +PyDoc_STRVAR( + /* Wrap. */ + Interface0D_point_2d_doc, + "The 2D point of this 0D element.\n" + "\n" + ":type: :class:`mathutils.Vector`"); static PyObject *Interface0D_point_2d_get(BPy_Interface0D *self, void * /*closure*/) { @@ -236,10 +252,12 @@ static PyObject *Interface0D_point_2d_get(BPy_Interface0D *self, void * /*closur return Vector_from_Vec2f(p); } -PyDoc_STRVAR(Interface0D_id_doc, - "The Id of this 0D element.\n" - "\n" - ":type: :class:`Id`"); +PyDoc_STRVAR( + /* Wrap. */ + Interface0D_id_doc, + "The Id of this 0D element.\n" + "\n" + ":type: :class:`Id`"); static PyObject *Interface0D_id_get(BPy_Interface0D *self, void * /*closure*/) { @@ -250,10 +268,12 @@ static PyObject *Interface0D_id_get(BPy_Interface0D *self, void * /*closure*/) return BPy_Id_from_Id(id); // return a copy } -PyDoc_STRVAR(Interface0D_nature_doc, - "The nature of this 0D element.\n" - "\n" - ":type: :class:`Nature`"); +PyDoc_STRVAR( + /* Wrap. */ + Interface0D_nature_doc, + "The nature of this 0D element.\n" + "\n" + ":type: :class:`Nature`"); static PyObject *Interface0D_nature_get(BPy_Interface0D *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp index 989e69e55e5..bd45e16ca46 100644 --- a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp @@ -94,12 +94,14 @@ int Interface1D_Init(PyObject *module) /*----------------------Interface1D methods ----------------------------*/ -PyDoc_STRVAR(Interface1D_doc, - "Base class for any 1D element.\n" - "\n" - ".. method:: __init__()\n" - "\n" - " Default constructor."); +PyDoc_STRVAR( + /* Wrap. */ + Interface1D_doc, + "Base class for any 1D element.\n" + "\n" + ".. method:: __init__()\n" + "\n" + " Default constructor."); static int Interface1D_init(BPy_Interface1D *self, PyObject *args, PyObject *kwds) { @@ -127,14 +129,16 @@ static PyObject *Interface1D_repr(BPy_Interface1D *self) "type: %s - address: %p", self->if1D->getExactTypeName().c_str(), self->if1D); } -PyDoc_STRVAR(Interface1D_vertices_begin_doc, - ".. method:: vertices_begin()\n" - "\n" - " Returns an iterator over the Interface1D vertices, pointing to the\n" - " first vertex.\n" - "\n" - " :return: An Interface0DIterator pointing to the first vertex.\n" - " :rtype: :class:`Interface0DIterator`"); +PyDoc_STRVAR( + /* Wrap. */ + Interface1D_vertices_begin_doc, + ".. method:: vertices_begin()\n" + "\n" + " Returns an iterator over the Interface1D vertices, pointing to the\n" + " first vertex.\n" + "\n" + " :return: An Interface0DIterator pointing to the first vertex.\n" + " :rtype: :class:`Interface0DIterator`"); static PyObject *Interface1D_vertices_begin(BPy_Interface1D *self) { @@ -142,14 +146,16 @@ static PyObject *Interface1D_vertices_begin(BPy_Interface1D *self) return BPy_Interface0DIterator_from_Interface0DIterator(if0D_it, false); } -PyDoc_STRVAR(Interface1D_vertices_end_doc, - ".. method:: vertices_end()\n" - "\n" - " Returns an iterator over the Interface1D vertices, pointing after\n" - " the last vertex.\n" - "\n" - " :return: An Interface0DIterator pointing after the last vertex.\n" - " :rtype: :class:`Interface0DIterator`"); +PyDoc_STRVAR( + /* Wrap. */ + Interface1D_vertices_end_doc, + ".. method:: vertices_end()\n" + "\n" + " Returns an iterator over the Interface1D vertices, pointing after\n" + " the last vertex.\n" + "\n" + " :return: An Interface0DIterator pointing after the last vertex.\n" + " :rtype: :class:`Interface0DIterator`"); static PyObject *Interface1D_vertices_end(BPy_Interface1D *self) { @@ -157,19 +163,21 @@ static PyObject *Interface1D_vertices_end(BPy_Interface1D *self) return BPy_Interface0DIterator_from_Interface0DIterator(if0D_it, true); } -PyDoc_STRVAR(Interface1D_points_begin_doc, - ".. method:: points_begin(t=0.0)\n" - "\n" - " Returns an iterator over the Interface1D points, pointing to the\n" - " first point. The difference with vertices_begin() is that here we can\n" - " iterate over points of the 1D element at a any given sampling.\n" - " Indeed, for each iteration, a virtual point is created.\n" - "\n" - " :arg t: A sampling with which we want to iterate over points of\n" - " this 1D element.\n" - " :type t: float\n" - " :return: An Interface0DIterator pointing to the first point.\n" - " :rtype: :class:`Interface0DIterator`"); +PyDoc_STRVAR( + /* Wrap. */ + Interface1D_points_begin_doc, + ".. method:: points_begin(t=0.0)\n" + "\n" + " Returns an iterator over the Interface1D points, pointing to the\n" + " first point. The difference with vertices_begin() is that here we can\n" + " iterate over points of the 1D element at a any given sampling.\n" + " Indeed, for each iteration, a virtual point is created.\n" + "\n" + " :arg t: A sampling with which we want to iterate over points of\n" + " this 1D element.\n" + " :type t: float\n" + " :return: An Interface0DIterator pointing to the first point.\n" + " :rtype: :class:`Interface0DIterator`"); static PyObject *Interface1D_points_begin(BPy_Interface1D *self, PyObject *args, PyObject *kwds) { @@ -183,19 +191,21 @@ static PyObject *Interface1D_points_begin(BPy_Interface1D *self, PyObject *args, return BPy_Interface0DIterator_from_Interface0DIterator(if0D_it, false); } -PyDoc_STRVAR(Interface1D_points_end_doc, - ".. method:: points_end(t=0.0)\n" - "\n" - " Returns an iterator over the Interface1D points, pointing after the\n" - " last point. The difference with vertices_end() is that here we can\n" - " iterate over points of the 1D element at a given sampling. Indeed,\n" - " for each iteration, a virtual point is created.\n" - "\n" - " :arg t: A sampling with which we want to iterate over points of\n" - " this 1D element.\n" - " :type t: float\n" - " :return: An Interface0DIterator pointing after the last point.\n" - " :rtype: :class:`Interface0DIterator`"); +PyDoc_STRVAR( + /* Wrap. */ + Interface1D_points_end_doc, + ".. method:: points_end(t=0.0)\n" + "\n" + " Returns an iterator over the Interface1D points, pointing after the\n" + " last point. The difference with vertices_end() is that here we can\n" + " iterate over points of the 1D element at a given sampling. Indeed,\n" + " for each iteration, a virtual point is created.\n" + "\n" + " :arg t: A sampling with which we want to iterate over points of\n" + " this 1D element.\n" + " :type t: float\n" + " :return: An Interface0DIterator pointing after the last point.\n" + " :rtype: :class:`Interface0DIterator`"); static PyObject *Interface1D_points_end(BPy_Interface1D *self, PyObject *args, PyObject *kwds) { @@ -231,20 +241,24 @@ static PyMethodDef BPy_Interface1D_methods[] = { /*----------------------Interface1D get/setters ----------------------------*/ -PyDoc_STRVAR(Interface1D_name_doc, - "The string of the name of the 1D element.\n" - "\n" - ":type: str"); +PyDoc_STRVAR( + /* Wrap. */ + Interface1D_name_doc, + "The string of the name of the 1D element.\n" + "\n" + ":type: str"); static PyObject *Interface1D_name_get(BPy_Interface1D *self, void * /*closure*/) { return PyUnicode_FromString(Py_TYPE(self)->tp_name); } -PyDoc_STRVAR(Interface1D_id_doc, - "The Id of this Interface1D.\n" - "\n" - ":type: :class:`Id`"); +PyDoc_STRVAR( + /* Wrap. */ + Interface1D_id_doc, + "The Id of this Interface1D.\n" + "\n" + ":type: :class:`Id`"); static PyObject *Interface1D_id_get(BPy_Interface1D *self, void * /*closure*/) { @@ -255,10 +269,12 @@ static PyObject *Interface1D_id_get(BPy_Interface1D *self, void * /*closure*/) return BPy_Id_from_Id(id); // return a copy } -PyDoc_STRVAR(Interface1D_nature_doc, - "The nature of this Interface1D.\n" - "\n" - ":type: :class:`Nature`"); +PyDoc_STRVAR( + /* Wrap. */ + Interface1D_nature_doc, + "The nature of this Interface1D.\n" + "\n" + ":type: :class:`Nature`"); static PyObject *Interface1D_nature_get(BPy_Interface1D *self, void * /*closure*/) { @@ -269,10 +285,12 @@ static PyObject *Interface1D_nature_get(BPy_Interface1D *self, void * /*closure* return BPy_Nature_from_Nature(nature); } -PyDoc_STRVAR(Interface1D_length_2d_doc, - "The 2D length of this Interface1D.\n" - "\n" - ":type: float"); +PyDoc_STRVAR( + /* Wrap. */ + Interface1D_length_2d_doc, + "The 2D length of this Interface1D.\n" + "\n" + ":type: float"); static PyObject *Interface1D_length_2d_get(BPy_Interface1D *self, void * /*closure*/) { @@ -283,10 +301,12 @@ static PyObject *Interface1D_length_2d_get(BPy_Interface1D *self, void * /*closu return PyFloat_FromDouble(double(length)); } -PyDoc_STRVAR(Interface1D_time_stamp_doc, - "The time stamp of the 1D element, mainly used for selection.\n" - "\n" - ":type: int"); +PyDoc_STRVAR( + /* Wrap. */ + Interface1D_time_stamp_doc, + "The time stamp of the 1D element, mainly used for selection.\n" + "\n" + ":type: int"); static PyObject *Interface1D_time_stamp_get(BPy_Interface1D *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/BPy_Iterator.cpp b/source/blender/freestyle/intern/python/BPy_Iterator.cpp index 1cc742aab47..80f83662c6a 100644 --- a/source/blender/freestyle/intern/python/BPy_Iterator.cpp +++ b/source/blender/freestyle/intern/python/BPy_Iterator.cpp @@ -107,12 +107,14 @@ int Iterator_Init(PyObject *module) //------------------------INSTANCE METHODS ---------------------------------- -PyDoc_STRVAR(Iterator_doc, - "Base class to define iterators.\n" - "\n" - ".. method:: __init__()\n" - "\n" - " Default constructor."); +PyDoc_STRVAR( + /* Wrap. */ + Iterator_doc, + "Base class to define iterators.\n" + "\n" + ".. method:: __init__()\n" + "\n" + " Default constructor."); static int Iterator_init(BPy_Iterator *self, PyObject *args, PyObject *kwds) { @@ -136,10 +138,12 @@ static PyObject *Iterator_repr(BPy_Iterator *self) return PyUnicode_FromFormat("type: %s - address: %p", Py_TYPE(self)->tp_name, self->it); } -PyDoc_STRVAR(Iterator_increment_doc, - ".. method:: increment()\n" - "\n" - " Makes the iterator point the next element."); +PyDoc_STRVAR( + /* Wrap. */ + Iterator_increment_doc, + ".. method:: increment()\n" + "\n" + " Makes the iterator point the next element."); static PyObject *Iterator_increment(BPy_Iterator *self) { @@ -151,10 +155,12 @@ static PyObject *Iterator_increment(BPy_Iterator *self) Py_RETURN_NONE; } -PyDoc_STRVAR(Iterator_decrement_doc, - ".. method:: decrement()\n" - "\n" - " Makes the iterator point the previous element."); +PyDoc_STRVAR( + /* Wrap. */ + Iterator_decrement_doc, + ".. method:: decrement()\n" + "\n" + " Makes the iterator point the previous element."); static PyObject *Iterator_decrement(BPy_Iterator *self) { @@ -174,30 +180,36 @@ static PyMethodDef BPy_Iterator_methods[] = { /*----------------------Iterator get/setters ----------------------------*/ -PyDoc_STRVAR(Iterator_name_doc, - "The string of the name of this iterator.\n" - "\n" - ":type: str"); +PyDoc_STRVAR( + /* Wrap. */ + Iterator_name_doc, + "The string of the name of this iterator.\n" + "\n" + ":type: str"); static PyObject *Iterator_name_get(BPy_Iterator *self, void * /*closure*/) { return PyUnicode_FromString(Py_TYPE(self)->tp_name); } -PyDoc_STRVAR(Iterator_is_begin_doc, - "True if the iterator points to the first element.\n" - "\n" - ":type: bool"); +PyDoc_STRVAR( + /* Wrap. */ + Iterator_is_begin_doc, + "True if the iterator points to the first element.\n" + "\n" + ":type: bool"); static PyObject *Iterator_is_begin_get(BPy_Iterator *self, void * /*closure*/) { return PyBool_from_bool(self->it->isBegin()); } -PyDoc_STRVAR(Iterator_is_end_doc, - "True if the iterator points to the last element.\n" - "\n" - ":type: bool"); +PyDoc_STRVAR( + /* Wrap. */ + Iterator_is_end_doc, + "True if the iterator points to the last element.\n" + "\n" + ":type: bool"); static PyObject *Iterator_is_end_get(BPy_Iterator *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/BPy_MediumType.cpp b/source/blender/freestyle/intern/python/BPy_MediumType.cpp index 61917d2257d..576698d1912 100644 --- a/source/blender/freestyle/intern/python/BPy_MediumType.cpp +++ b/source/blender/freestyle/intern/python/BPy_MediumType.cpp @@ -20,15 +20,17 @@ using namespace Freestyle; /*-----------------------BPy_MediumType type definition ------------------------------*/ -PyDoc_STRVAR(MediumType_doc, - "Class hierarchy: int > :class:`MediumType`\n" - "\n" - "The different blending modes available to simulate the interaction\n" - "media-medium:\n" - "\n" - "* Stroke.DRY_MEDIUM: To simulate a dry medium such as Pencil or Charcoal.\n" - "* Stroke.HUMID_MEDIUM: To simulate ink painting (color subtraction blending).\n" - "* Stroke.OPAQUE_MEDIUM: To simulate an opaque medium (oil, spray...)."); +PyDoc_STRVAR( + /* Wrap. */ + MediumType_doc, + "Class hierarchy: int > :class:`MediumType`\n" + "\n" + "The different blending modes available to simulate the interaction\n" + "media-medium:\n" + "\n" + "* Stroke.DRY_MEDIUM: To simulate a dry medium such as Pencil or Charcoal.\n" + "* Stroke.HUMID_MEDIUM: To simulate ink painting (color subtraction blending).\n" + "* Stroke.OPAQUE_MEDIUM: To simulate an opaque medium (oil, spray...)."); PyTypeObject MediumType_Type = { /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0) diff --git a/source/blender/freestyle/intern/python/BPy_Nature.cpp b/source/blender/freestyle/intern/python/BPy_Nature.cpp index f218f1f16c9..95c65b2880f 100644 --- a/source/blender/freestyle/intern/python/BPy_Nature.cpp +++ b/source/blender/freestyle/intern/python/BPy_Nature.cpp @@ -65,32 +65,34 @@ static PyNumberMethods nature_as_number = { /*-----------------------BPy_Nature doc-string -----------------------------------*/ -PyDoc_STRVAR(Nature_doc, - "Class hierarchy: int > :class:`Nature`\n" - "\n" - "Different possible natures of 0D and 1D elements of the ViewMap.\n" - "\n" - "Vertex natures:\n" - "\n" - "* Nature.POINT: True for any 0D element.\n" - "* Nature.S_VERTEX: True for SVertex.\n" - "* Nature.VIEW_VERTEX: True for ViewVertex.\n" - "* Nature.NON_T_VERTEX: True for NonTVertex.\n" - "* Nature.T_VERTEX: True for TVertex.\n" - "* Nature.CUSP: True for CUSP.\n" - "\n" - "Edge natures:\n" - "\n" - "* Nature.NO_FEATURE: True for non feature edges (always false for 1D\n" - " elements of the ViewMap).\n" - "* Nature.SILHOUETTE: True for silhouettes.\n" - "* Nature.BORDER: True for borders.\n" - "* Nature.CREASE: True for creases.\n" - "* Nature.RIDGE: True for ridges.\n" - "* Nature.VALLEY: True for valleys.\n" - "* Nature.SUGGESTIVE_CONTOUR: True for suggestive contours.\n" - "* Nature.MATERIAL_BOUNDARY: True for edges at material boundaries.\n" - "* Nature.EDGE_MARK: True for edges having user-defined edge marks."); +PyDoc_STRVAR( + /* Wrap. */ + Nature_doc, + "Class hierarchy: int > :class:`Nature`\n" + "\n" + "Different possible natures of 0D and 1D elements of the ViewMap.\n" + "\n" + "Vertex natures:\n" + "\n" + "* Nature.POINT: True for any 0D element.\n" + "* Nature.S_VERTEX: True for SVertex.\n" + "* Nature.VIEW_VERTEX: True for ViewVertex.\n" + "* Nature.NON_T_VERTEX: True for NonTVertex.\n" + "* Nature.T_VERTEX: True for TVertex.\n" + "* Nature.CUSP: True for CUSP.\n" + "\n" + "Edge natures:\n" + "\n" + "* Nature.NO_FEATURE: True for non feature edges (always false for 1D\n" + " elements of the ViewMap).\n" + "* Nature.SILHOUETTE: True for silhouettes.\n" + "* Nature.BORDER: True for borders.\n" + "* Nature.CREASE: True for creases.\n" + "* Nature.RIDGE: True for ridges.\n" + "* Nature.VALLEY: True for valleys.\n" + "* Nature.SUGGESTIVE_CONTOUR: True for suggestive contours.\n" + "* Nature.MATERIAL_BOUNDARY: True for edges at material boundaries.\n" + "* Nature.EDGE_MARK: True for edges having user-defined edge marks."); /*-----------------------BPy_Nature type definition ------------------------------*/ diff --git a/source/blender/freestyle/intern/python/BPy_Operators.cpp b/source/blender/freestyle/intern/python/BPy_Operators.cpp index 41f9354dc91..6981298092a 100644 --- a/source/blender/freestyle/intern/python/BPy_Operators.cpp +++ b/source/blender/freestyle/intern/python/BPy_Operators.cpp @@ -48,25 +48,29 @@ int Operators_Init(PyObject *module) //------------------------INSTANCE METHODS ---------------------------------- -PyDoc_STRVAR(Operators_doc, - "Class defining the operators used in a style module. There are five\n" - "types of operators: Selection, chaining, splitting, sorting and\n" - "creation. All these operators are user controlled through functors,\n" - "predicates and shaders that are taken as arguments."); +PyDoc_STRVAR( + /* Wrap. */ + Operators_doc, + "Class defining the operators used in a style module. There are five\n" + "types of operators: Selection, chaining, splitting, sorting and\n" + "creation. All these operators are user controlled through functors,\n" + "predicates and shaders that are taken as arguments."); static void Operators_dealloc(BPy_Operators *self) { Py_TYPE(self)->tp_free((PyObject *)self); } -PyDoc_STRVAR(Operators_select_doc, - ".. staticmethod:: select(pred)\n" - "\n" - " Selects the ViewEdges of the ViewMap verifying a specified\n" - " condition.\n" - "\n" - " :arg pred: The predicate expressing this condition.\n" - " :type pred: :class:`UnaryPredicate1D`"); +PyDoc_STRVAR( + /* Wrap. */ + Operators_select_doc, + ".. staticmethod:: select(pred)\n" + "\n" + " Selects the ViewEdges of the ViewMap verifying a specified\n" + " condition.\n" + "\n" + " :arg pred: The predicate expressing this condition.\n" + " :type pred: :class:`UnaryPredicate1D`"); static PyObject *Operators_select(BPy_Operators * /*self*/, PyObject *args, PyObject *kwds) { @@ -92,27 +96,29 @@ static PyObject *Operators_select(BPy_Operators * /*self*/, PyObject *args, PyOb Py_RETURN_NONE; } -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" - " 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.\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`\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 modifier).\n" - " If this argument is not given, the time stamp is automatically managed.\n" - " :type modifier: :class:`UnaryFunction1DVoid`\n"); +PyDoc_STRVAR( + /* Wrap. */ + 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" + " 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.\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`\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 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) { @@ -171,29 +177,31 @@ static PyObject *Operators_chain(BPy_Operators * /*self*/, PyObject *args, PyObj Py_RETURN_NONE; } -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" - " chaining operator then iterates over the ViewEdges of the ViewMap\n" - " using the user specified iterator. This operator iterates both using\n" - " the increment and decrement operators and is therefore bidirectional.\n" - " This operator works with a ChainingIterator which contains the\n" - " chaining rules. It is this last one which can be told to chain only\n" - " edges that belong to the selection or not to process twice a ViewEdge\n" - " during the chaining. Each time a ViewEdge is added to a chain, its\n" - " chaining time stamp is incremented. This allows you to keep track of\n" - " 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`\n" - " :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"); +PyDoc_STRVAR( + /* Wrap. */ + 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" + " chaining operator then iterates over the ViewEdges of the ViewMap\n" + " using the user specified iterator. This operator iterates both using\n" + " the increment and decrement operators and is therefore bidirectional.\n" + " This operator works with a ChainingIterator which contains the\n" + " chaining rules. It is this last one which can be told to chain only\n" + " edges that belong to the selection or not to process twice a ViewEdge\n" + " during the chaining. Each time a ViewEdge is added to a chain, its\n" + " chaining time stamp is incremented. This allows you to keep track of\n" + " 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`\n" + " :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, @@ -246,36 +254,38 @@ static PyObject *Operators_bidirectional_chain(BPy_Operators * /*self*/, Py_RETURN_NONE; } -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. 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 specifying a starting and stopping predicate allows\n" - " the chains to overlap rather than chains partitioning.\n" - "\n" - " :arg starting_pred: The predicate on a point that expresses the\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. 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"); +PyDoc_STRVAR( + /* Wrap. */ + 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. 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 specifying a starting and stopping predicate allows\n" + " the chains to overlap rather than chains partitioning.\n" + "\n" + " :arg starting_pred: The predicate on a point that expresses the\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. 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"); static PyObject *Operators_sequential_split(BPy_Operators * /*self*/, PyObject *args, @@ -344,6 +354,7 @@ static PyObject *Operators_sequential_split(BPy_Operators * /*self*/, } PyDoc_STRVAR( + /* Wrap. */ 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" @@ -470,14 +481,16 @@ static PyObject *Operators_recursive_split(BPy_Operators * /*self*/, Py_RETURN_NONE; } -PyDoc_STRVAR(Operators_sort_doc, - ".. staticmethod:: sort(pred)\n" - "\n" - " Sorts the current set of chains (or viewedges) according to the\n" - " comparison predicate given as argument.\n" - "\n" - " :arg pred: The binary predicate used for the comparison.\n" - " :type pred: :class:`BinaryPredicate1D`"); +PyDoc_STRVAR( + /* Wrap. */ + Operators_sort_doc, + ".. staticmethod:: sort(pred)\n" + "\n" + " Sorts the current set of chains (or viewedges) according to the\n" + " comparison predicate given as argument.\n" + "\n" + " :arg pred: The binary predicate used for the comparison.\n" + " :type pred: :class:`BinaryPredicate1D`"); static PyObject *Operators_sort(BPy_Operators * /*self*/, PyObject *args, PyObject *kwds) { @@ -503,17 +516,19 @@ static PyObject *Operators_sort(BPy_Operators * /*self*/, PyObject *args, PyObje Py_RETURN_NONE; } -PyDoc_STRVAR(Operators_create_doc, - ".. staticmethod:: create(pred, shaders)\n" - "\n" - " Creates and shades the strokes from the current set of chains. A\n" - " predicate can be specified to make a selection pass on the chains.\n" - "\n" - " :arg pred: The predicate that a chain must verify in order to be\n" - " transform as a stroke.\n" - " :type pred: :class:`UnaryPredicate1D`\n" - " :arg shaders: The list of shaders used to shade the strokes.\n" - " :type shaders: list of :class:`StrokeShader` objects"); +PyDoc_STRVAR( + /* Wrap. */ + Operators_create_doc, + ".. staticmethod:: create(pred, shaders)\n" + "\n" + " Creates and shades the strokes from the current set of chains. A\n" + " predicate can be specified to make a selection pass on the chains.\n" + "\n" + " :arg pred: The predicate that a chain must verify in order to be\n" + " transform as a stroke.\n" + " :type pred: :class:`UnaryPredicate1D`\n" + " :arg shaders: The list of shaders used to shade the strokes.\n" + " :type shaders: list of :class:`StrokeShader` objects"); static PyObject *Operators_create(BPy_Operators * /*self*/, PyObject *args, PyObject *kwds) { @@ -559,14 +574,16 @@ static PyObject *Operators_create(BPy_Operators * /*self*/, PyObject *args, PyOb Py_RETURN_NONE; } -PyDoc_STRVAR(Operators_reset_doc, - ".. staticmethod:: reset(delete_strokes=True)\n" - "\n" - " Resets the line stylization process to the initial state. The results of\n" - " stroke creation are accumulated if **delete_strokes** is set to False.\n" - "\n" - " :arg delete_strokes: Delete the strokes that are currently stored.\n" - " :type delete_strokes: bool\n"); +PyDoc_STRVAR( + /* Wrap. */ + Operators_reset_doc, + ".. staticmethod:: reset(delete_strokes=True)\n" + "\n" + " Resets the line stylization process to the initial state. The results of\n" + " stroke creation are accumulated if **delete_strokes** is set to False.\n" + "\n" + " :arg delete_strokes: Delete the strokes that are currently stored.\n" + " :type delete_strokes: bool\n"); static PyObject *Operators_reset(BPy_Operators * /*self*/, PyObject *args, PyObject *kwds) { @@ -583,15 +600,17 @@ static PyObject *Operators_reset(BPy_Operators * /*self*/, PyObject *args, PyObj Py_RETURN_NONE; } -PyDoc_STRVAR(Operators_get_viewedge_from_index_doc, - ".. staticmethod:: get_viewedge_from_index(i)\n" - "\n" - " Returns the ViewEdge at the index in the current set of ViewEdges.\n" - "\n" - " :arg i: index (0 <= i < Operators.get_view_edges_size()).\n" - " :type i: int\n" - " :return: The ViewEdge object.\n" - " :rtype: :class:`ViewEdge`"); +PyDoc_STRVAR( + /* Wrap. */ + Operators_get_viewedge_from_index_doc, + ".. staticmethod:: get_viewedge_from_index(i)\n" + "\n" + " Returns the ViewEdge at the index in the current set of ViewEdges.\n" + "\n" + " :arg i: index (0 <= i < Operators.get_view_edges_size()).\n" + " :type i: int\n" + " :return: The ViewEdge object.\n" + " :rtype: :class:`ViewEdge`"); static PyObject *Operators_get_viewedge_from_index(BPy_Operators * /*self*/, PyObject *args, @@ -610,15 +629,17 @@ static PyObject *Operators_get_viewedge_from_index(BPy_Operators * /*self*/, return BPy_ViewEdge_from_ViewEdge(*(Operators::getViewEdgeFromIndex(i))); } -PyDoc_STRVAR(Operators_get_chain_from_index_doc, - ".. staticmethod:: get_chain_from_index(i)\n" - "\n" - " Returns the Chain at the index in the current set of Chains.\n" - "\n" - " :arg i: index (0 <= i < Operators.get_chains_size()).\n" - " :type i: int\n" - " :return: The Chain object.\n" - " :rtype: :class:`Chain`"); +PyDoc_STRVAR( + /* Wrap. */ + Operators_get_chain_from_index_doc, + ".. staticmethod:: get_chain_from_index(i)\n" + "\n" + " Returns the Chain at the index in the current set of Chains.\n" + "\n" + " :arg i: index (0 <= i < Operators.get_chains_size()).\n" + " :type i: int\n" + " :return: The Chain object.\n" + " :rtype: :class:`Chain`"); static PyObject *Operators_get_chain_from_index(BPy_Operators * /*self*/, PyObject *args, @@ -637,15 +658,17 @@ static PyObject *Operators_get_chain_from_index(BPy_Operators * /*self*/, return BPy_Chain_from_Chain(*(Operators::getChainFromIndex(i))); } -PyDoc_STRVAR(Operators_get_stroke_from_index_doc, - ".. staticmethod:: get_stroke_from_index(i)\n" - "\n" - " Returns the Stroke at the index in the current set of Strokes.\n" - "\n" - " :arg i: index (0 <= i < Operators.get_strokes_size()).\n" - " :type i: int\n" - " :return: The Stroke object.\n" - " :rtype: :class:`Stroke`"); +PyDoc_STRVAR( + /* Wrap. */ + Operators_get_stroke_from_index_doc, + ".. staticmethod:: get_stroke_from_index(i)\n" + "\n" + " Returns the Stroke at the index in the current set of Strokes.\n" + "\n" + " :arg i: index (0 <= i < Operators.get_strokes_size()).\n" + " :type i: int\n" + " :return: The Stroke object.\n" + " :rtype: :class:`Stroke`"); static PyObject *Operators_get_stroke_from_index(BPy_Operators * /*self*/, PyObject *args, @@ -664,39 +687,45 @@ static PyObject *Operators_get_stroke_from_index(BPy_Operators * /*self*/, return BPy_Stroke_from_Stroke(*(Operators::getStrokeFromIndex(i))); } -PyDoc_STRVAR(Operators_get_view_edges_size_doc, - ".. staticmethod:: get_view_edges_size()\n" - "\n" - " Returns the number of ViewEdges.\n" - "\n" - " :return: The number of ViewEdges.\n" - " :rtype: int"); +PyDoc_STRVAR( + /* Wrap. */ + Operators_get_view_edges_size_doc, + ".. staticmethod:: get_view_edges_size()\n" + "\n" + " Returns the number of ViewEdges.\n" + "\n" + " :return: The number of ViewEdges.\n" + " :rtype: int"); static PyObject *Operators_get_view_edges_size(BPy_Operators * /*self*/) { return PyLong_FromLong(Operators::getViewEdgesSize()); } -PyDoc_STRVAR(Operators_get_chains_size_doc, - ".. staticmethod:: get_chains_size()\n" - "\n" - " Returns the number of Chains.\n" - "\n" - " :return: The number of Chains.\n" - " :rtype: int"); +PyDoc_STRVAR( + /* Wrap. */ + Operators_get_chains_size_doc, + ".. staticmethod:: get_chains_size()\n" + "\n" + " Returns the number of Chains.\n" + "\n" + " :return: The number of Chains.\n" + " :rtype: int"); static PyObject *Operators_get_chains_size(BPy_Operators * /*self*/) { return PyLong_FromLong(Operators::getChainsSize()); } -PyDoc_STRVAR(Operators_get_strokes_size_doc, - ".. staticmethod:: get_strokes_size()\n" - "\n" - " Returns the number of Strokes.\n" - "\n" - " :return: The number of Strokes.\n" - " :rtype: int"); +PyDoc_STRVAR( + /* Wrap. */ + Operators_get_strokes_size_doc, + ".. staticmethod:: get_strokes_size()\n" + "\n" + " Returns the number of Strokes.\n" + "\n" + " :return: The number of Strokes.\n" + " :rtype: int"); static PyObject *Operators_get_strokes_size(BPy_Operators * /*self*/) { diff --git a/source/blender/freestyle/intern/python/BPy_SShape.cpp b/source/blender/freestyle/intern/python/BPy_SShape.cpp index 45a6f3719b8..447ab8656c5 100644 --- a/source/blender/freestyle/intern/python/BPy_SShape.cpp +++ b/source/blender/freestyle/intern/python/BPy_SShape.cpp @@ -43,6 +43,7 @@ int SShape_Init(PyObject *module) /*----------------------SShape methods ----------------------------*/ PyDoc_STRVAR( + /* Wrap. */ SShape_doc, "Class to define a feature shape. It is the gathering of feature\n" "elements from an identified input shape.\n" @@ -106,14 +107,16 @@ static PyObject *SShape_add_edge(BPy_SShape *self, PyObject *args, PyObject *kwd Py_RETURN_NONE; } -PyDoc_STRVAR(SShape_add_vertex_doc, - ".. method:: add_vertex(vertex)\n" - "\n" - " Adds an SVertex to the list of SVertex of this Shape. The SShape\n" - " attribute of the SVertex is also set to this SShape.\n" - "\n" - " :arg vertex: An SVertex object.\n" - " :type vertex: :class:`SVertex`"); +PyDoc_STRVAR( + /* Wrap. */ + SShape_add_vertex_doc, + ".. method:: add_vertex(vertex)\n" + "\n" + " Adds an SVertex to the list of SVertex of this Shape. The SShape\n" + " attribute of the SVertex is also set to this SShape.\n" + "\n" + " :arg vertex: An SVertex object.\n" + " :type vertex: :class:`SVertex`"); static PyObject *SShape_add_vertex(BPy_SShape *self, PyObject *args, PyObject *kwds) { @@ -127,10 +130,12 @@ static PyObject *SShape_add_vertex(BPy_SShape *self, PyObject *args, PyObject *k Py_RETURN_NONE; } -PyDoc_STRVAR(SShape_compute_bbox_doc, - ".. method:: compute_bbox()\n" - "\n" - " Compute the bbox of the SShape."); +PyDoc_STRVAR( + /* Wrap. */ + SShape_compute_bbox_doc, + ".. method:: compute_bbox()\n" + "\n" + " Compute the bbox of the SShape."); static PyObject *SShape_compute_bbox(BPy_SShape *self) { @@ -154,10 +159,12 @@ static PyMethodDef BPy_SShape_methods[] = { /*----------------------SShape get/setters ----------------------------*/ -PyDoc_STRVAR(SShape_id_doc, - "The Id of this SShape.\n" - "\n" - ":type: :class:`Id`"); +PyDoc_STRVAR( + /* Wrap. */ + SShape_id_doc, + "The Id of this SShape.\n" + "\n" + ":type: :class:`Id`"); static PyObject *SShape_id_get(BPy_SShape *self, void * /*closure*/) { @@ -175,10 +182,12 @@ static int SShape_id_set(BPy_SShape *self, PyObject *value, void * /*closure*/) return 0; } -PyDoc_STRVAR(SShape_name_doc, - "The name of the SShape.\n" - "\n" - ":type: str"); +PyDoc_STRVAR( + /* Wrap. */ + SShape_name_doc, + "The name of the SShape.\n" + "\n" + ":type: str"); static PyObject *SShape_name_get(BPy_SShape *self, void * /*closure*/) { @@ -196,10 +205,12 @@ static int SShape_name_set(BPy_SShape *self, PyObject *value, void * /*closure*/ return 0; } -PyDoc_STRVAR(SShape_bbox_doc, - "The bounding box of the SShape.\n" - "\n" - ":type: :class:`BBox`"); +PyDoc_STRVAR( + /* Wrap. */ + SShape_bbox_doc, + "The bounding box of the SShape.\n" + "\n" + ":type: :class:`BBox`"); static PyObject *SShape_bbox_get(BPy_SShape *self, void * /*closure*/) { @@ -217,10 +228,12 @@ static int SShape_bbox_set(BPy_SShape *self, PyObject *value, void * /*closure*/ return 0; } -PyDoc_STRVAR(SShape_vertices_doc, - "The list of vertices constituting this SShape.\n" - "\n" - ":type: List of :class:`SVertex` objects"); +PyDoc_STRVAR( + /* Wrap. */ + SShape_vertices_doc, + "The list of vertices constituting this SShape.\n" + "\n" + ":type: List of :class:`SVertex` objects"); static PyObject *SShape_vertices_get(BPy_SShape *self, void * /*closure*/) { @@ -237,10 +250,12 @@ static PyObject *SShape_vertices_get(BPy_SShape *self, void * /*closure*/) return py_vertices; } -PyDoc_STRVAR(SShape_edges_doc, - "The list of edges constituting this SShape.\n" - "\n" - ":type: List of :class:`FEdge` objects"); +PyDoc_STRVAR( + /* Wrap. */ + SShape_edges_doc, + "The list of edges constituting this SShape.\n" + "\n" + ":type: List of :class:`FEdge` objects"); static PyObject *SShape_edges_get(BPy_SShape *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp index cef8d7f89de..8eb2ee2df18 100644 --- a/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp +++ b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp @@ -37,40 +37,42 @@ int StrokeAttribute_Init(PyObject *module) //------------------------INSTANCE METHODS ---------------------------------- -PyDoc_STRVAR(StrokeAttribute_doc, - "Class to define a set of attributes associated with a :class:`StrokeVertex`.\n" - "The attribute set stores the color, alpha and thickness values for a Stroke\n" - "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" - " 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" - " :arg brother: A StrokeAttribute object to be used as a copy constructor.\n" - " :type brother: :class:`StrokeAttribute`\n" - " :arg red: Red component of a stroke color.\n" - " :type red: float\n" - " :arg green: Green component of a stroke color.\n" - " :type green: float\n" - " :arg blue: Blue component of a stroke color.\n" - " :type blue: float\n" - " :arg alpha: Alpha component of a stroke color.\n" - " :type alpha: float\n" - " :arg thickness_right: Stroke thickness on the right.\n" - " :type thickness_right: float\n" - " :arg thickness_left: Stroke thickness on the left.\n" - " :type thickness_left: float\n" - " :arg attribute1: The first StrokeAttribute object.\n" - " :type attribute1: :class:`StrokeAttribute`\n" - " :arg attribute2: The second StrokeAttribute object.\n" - " :type attribute2: :class:`StrokeAttribute`\n" - " :arg t: The interpolation parameter (0 <= t <= 1).\n" - " :type t: float\n"); +PyDoc_STRVAR( + /* Wrap. */ + StrokeAttribute_doc, + "Class to define a set of attributes associated with a :class:`StrokeVertex`.\n" + "The attribute set stores the color, alpha and thickness values for a Stroke\n" + "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" + " 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" + " :arg brother: A StrokeAttribute object to be used as a copy constructor.\n" + " :type brother: :class:`StrokeAttribute`\n" + " :arg red: Red component of a stroke color.\n" + " :type red: float\n" + " :arg green: Green component of a stroke color.\n" + " :type green: float\n" + " :arg blue: Blue component of a stroke color.\n" + " :type blue: float\n" + " :arg alpha: Alpha component of a stroke color.\n" + " :type alpha: float\n" + " :arg thickness_right: Stroke thickness on the right.\n" + " :type thickness_right: float\n" + " :arg thickness_left: Stroke thickness on the left.\n" + " :type thickness_left: float\n" + " :arg attribute1: The first StrokeAttribute object.\n" + " :type attribute1: :class:`StrokeAttribute`\n" + " :arg attribute2: The second StrokeAttribute object.\n" + " :type attribute2: :class:`StrokeAttribute`\n" + " :arg t: The interpolation parameter (0 <= t <= 1).\n" + " :type t: float\n"); static int StrokeAttribute_init(BPy_StrokeAttribute *self, PyObject *args, PyObject *kwds) { @@ -145,15 +147,17 @@ static PyObject *StrokeAttribute_repr(BPy_StrokeAttribute *self) return PyUnicode_FromString(repr.str().c_str()); } -PyDoc_STRVAR(StrokeAttribute_get_attribute_real_doc, - ".. method:: get_attribute_real(name)\n" - "\n" - " Returns an attribute of float type.\n" - "\n" - " :arg name: The name of the attribute.\n" - " :type name: str\n" - " :return: The attribute value.\n" - " :rtype: float\n"); +PyDoc_STRVAR( + /* Wrap. */ + StrokeAttribute_get_attribute_real_doc, + ".. method:: get_attribute_real(name)\n" + "\n" + " Returns an attribute of float type.\n" + "\n" + " :arg name: The name of the attribute.\n" + " :type name: str\n" + " :return: The attribute value.\n" + " :rtype: float\n"); static PyObject *StrokeAttribute_get_attribute_real(BPy_StrokeAttribute *self, PyObject *args, @@ -169,15 +173,17 @@ static PyObject *StrokeAttribute_get_attribute_real(BPy_StrokeAttribute *self, return PyFloat_FromDouble(a); } -PyDoc_STRVAR(StrokeAttribute_get_attribute_vec2_doc, - ".. method:: get_attribute_vec2(name)\n" - "\n" - " Returns an attribute of two-dimensional vector type.\n" - "\n" - " :arg name: The name of the attribute.\n" - " :type name: str\n" - " :return: The attribute value.\n" - " :rtype: :class:`mathutils.Vector`\n"); +PyDoc_STRVAR( + /* Wrap. */ + StrokeAttribute_get_attribute_vec2_doc, + ".. method:: get_attribute_vec2(name)\n" + "\n" + " Returns an attribute of two-dimensional vector type.\n" + "\n" + " :arg name: The name of the attribute.\n" + " :type name: str\n" + " :return: The attribute value.\n" + " :rtype: :class:`mathutils.Vector`\n"); static PyObject *StrokeAttribute_get_attribute_vec2(BPy_StrokeAttribute *self, PyObject *args, @@ -193,15 +199,17 @@ static PyObject *StrokeAttribute_get_attribute_vec2(BPy_StrokeAttribute *self, return Vector_from_Vec2f(a); } -PyDoc_STRVAR(StrokeAttribute_get_attribute_vec3_doc, - ".. method:: get_attribute_vec3(name)\n" - "\n" - " Returns an attribute of three-dimensional vector type.\n" - "\n" - " :arg name: The name of the attribute.\n" - " :type name: str\n" - " :return: The attribute value.\n" - " :rtype: :class:`mathutils.Vector`\n"); +PyDoc_STRVAR( + /* Wrap. */ + StrokeAttribute_get_attribute_vec3_doc, + ".. method:: get_attribute_vec3(name)\n" + "\n" + " Returns an attribute of three-dimensional vector type.\n" + "\n" + " :arg name: The name of the attribute.\n" + " :type name: str\n" + " :return: The attribute value.\n" + " :rtype: :class:`mathutils.Vector`\n"); static PyObject *StrokeAttribute_get_attribute_vec3(BPy_StrokeAttribute *self, PyObject *args, @@ -217,15 +225,17 @@ static PyObject *StrokeAttribute_get_attribute_vec3(BPy_StrokeAttribute *self, return Vector_from_Vec3f(a); } -PyDoc_STRVAR(StrokeAttribute_has_attribute_real_doc, - ".. method:: has_attribute_real(name)\n" - "\n" - " Checks whether the attribute name of float type is available.\n" - "\n" - " :arg name: The name of the attribute.\n" - " :type name: str\n" - " :return: True if the attribute is available.\n" - " :rtype: bool\n"); +PyDoc_STRVAR( + /* Wrap. */ + StrokeAttribute_has_attribute_real_doc, + ".. method:: has_attribute_real(name)\n" + "\n" + " Checks whether the attribute name of float type is available.\n" + "\n" + " :arg name: The name of the attribute.\n" + " :type name: str\n" + " :return: True if the attribute is available.\n" + " :rtype: bool\n"); static PyObject *StrokeAttribute_has_attribute_real(BPy_StrokeAttribute *self, PyObject *args, @@ -240,16 +250,18 @@ static PyObject *StrokeAttribute_has_attribute_real(BPy_StrokeAttribute *self, return PyBool_from_bool(self->sa->isAttributeAvailableReal(attr)); } -PyDoc_STRVAR(StrokeAttribute_has_attribute_vec2_doc, - ".. method:: has_attribute_vec2(name)\n" - "\n" - " Checks whether the attribute name of two-dimensional vector type\n" - " is available.\n" - "\n" - " :arg name: The name of the attribute.\n" - " :type name: str\n" - " :return: True if the attribute is available.\n" - " :rtype: bool\n"); +PyDoc_STRVAR( + /* Wrap. */ + StrokeAttribute_has_attribute_vec2_doc, + ".. method:: has_attribute_vec2(name)\n" + "\n" + " Checks whether the attribute name of two-dimensional vector type\n" + " is available.\n" + "\n" + " :arg name: The name of the attribute.\n" + " :type name: str\n" + " :return: True if the attribute is available.\n" + " :rtype: bool\n"); static PyObject *StrokeAttribute_has_attribute_vec2(BPy_StrokeAttribute *self, PyObject *args, @@ -264,16 +276,18 @@ static PyObject *StrokeAttribute_has_attribute_vec2(BPy_StrokeAttribute *self, return PyBool_from_bool(self->sa->isAttributeAvailableVec2f(attr)); } -PyDoc_STRVAR(StrokeAttribute_has_attribute_vec3_doc, - ".. method:: has_attribute_vec3(name)\n" - "\n" - " Checks whether the attribute name of three-dimensional vector\n" - " type is available.\n" - "\n" - " :arg name: The name of the attribute.\n" - " :type name: str\n" - " :return: True if the attribute is available.\n" - " :rtype: bool\n"); +PyDoc_STRVAR( + /* Wrap. */ + StrokeAttribute_has_attribute_vec3_doc, + ".. method:: has_attribute_vec3(name)\n" + "\n" + " Checks whether the attribute name of three-dimensional vector\n" + " type is available.\n" + "\n" + " :arg name: The name of the attribute.\n" + " :type name: str\n" + " :return: True if the attribute is available.\n" + " :rtype: bool\n"); static PyObject *StrokeAttribute_has_attribute_vec3(BPy_StrokeAttribute *self, PyObject *args, @@ -288,17 +302,19 @@ static PyObject *StrokeAttribute_has_attribute_vec3(BPy_StrokeAttribute *self, return PyBool_from_bool(self->sa->isAttributeAvailableVec3f(attr)); } -PyDoc_STRVAR(StrokeAttribute_set_attribute_real_doc, - ".. method:: set_attribute_real(name, value)\n" - "\n" - " Adds a user-defined attribute of float type. If there is no\n" - " attribute of the given name, it is added. Otherwise, the new value\n" - " replaces the old one.\n" - "\n" - " :arg name: The name of the attribute.\n" - " :type name: str\n" - " :arg value: The attribute value.\n" - " :type value: float\n"); +PyDoc_STRVAR( + /* Wrap. */ + StrokeAttribute_set_attribute_real_doc, + ".. method:: set_attribute_real(name, value)\n" + "\n" + " Adds a user-defined attribute of float type. If there is no\n" + " attribute of the given name, it is added. Otherwise, the new value\n" + " replaces the old one.\n" + "\n" + " :arg name: The name of the attribute.\n" + " :type name: str\n" + " :arg value: The attribute value.\n" + " :type value: float\n"); static PyObject *StrokeAttribute_set_attribute_real(BPy_StrokeAttribute *self, PyObject *args, @@ -315,17 +331,19 @@ static PyObject *StrokeAttribute_set_attribute_real(BPy_StrokeAttribute *self, Py_RETURN_NONE; } -PyDoc_STRVAR(StrokeAttribute_set_attribute_vec2_doc, - ".. method:: set_attribute_vec2(name, value)\n" - "\n" - " Adds a user-defined attribute of two-dimensional vector type. If\n" - " there is no attribute of the given name, it is added. Otherwise,\n" - " the new value replaces the old one.\n" - "\n" - " :arg name: The name of the attribute.\n" - " :type name: str\n" - " :arg value: The attribute value.\n" - " :type value: :class:`mathutils.Vector`, list or tuple of 2 real numbers\n"); +PyDoc_STRVAR( + /* Wrap. */ + StrokeAttribute_set_attribute_vec2_doc, + ".. method:: set_attribute_vec2(name, value)\n" + "\n" + " Adds a user-defined attribute of two-dimensional vector type. If\n" + " there is no attribute of the given name, it is added. Otherwise,\n" + " the new value replaces the old one.\n" + "\n" + " :arg name: The name of the attribute.\n" + " :type name: str\n" + " :arg value: The attribute value.\n" + " :type value: :class:`mathutils.Vector`, list or tuple of 2 real numbers\n"); static PyObject *StrokeAttribute_set_attribute_vec2(BPy_StrokeAttribute *self, PyObject *args, @@ -348,17 +366,19 @@ static PyObject *StrokeAttribute_set_attribute_vec2(BPy_StrokeAttribute *self, Py_RETURN_NONE; } -PyDoc_STRVAR(StrokeAttribute_set_attribute_vec3_doc, - ".. method:: set_attribute_vec3(name, value)\n" - "\n" - " Adds a user-defined attribute of three-dimensional vector type.\n" - " If there is no attribute of the given name, it is added.\n" - " Otherwise, the new value replaces the old one.\n" - "\n" - " :arg name: The name of the attribute.\n" - " :type name: str\n" - " :arg value: The attribute value.\n" - " :type value: :class:`mathutils.Vector`, list or tuple of 3 real numbers\n"); +PyDoc_STRVAR( + /* Wrap. */ + StrokeAttribute_set_attribute_vec3_doc, + ".. method:: set_attribute_vec3(name, value)\n" + "\n" + " Adds a user-defined attribute of three-dimensional vector type.\n" + " If there is no attribute of the given name, it is added.\n" + " Otherwise, the new value replaces the old one.\n" + "\n" + " :arg name: The name of the attribute.\n" + " :type name: str\n" + " :arg value: The attribute value.\n" + " :type value: :class:`mathutils.Vector`, list or tuple of 3 real numbers\n"); static PyObject *StrokeAttribute_set_attribute_vec3(BPy_StrokeAttribute *self, PyObject *args, @@ -547,10 +567,12 @@ void StrokeAttribute_mathutils_register_callback() /*----------------------StrokeAttribute get/setters ----------------------------*/ -PyDoc_STRVAR(StrokeAttribute_alpha_doc, - "Alpha component of the stroke color.\n" - "\n" - ":type: float"); +PyDoc_STRVAR( + /* Wrap. */ + StrokeAttribute_alpha_doc, + "Alpha component of the stroke color.\n" + "\n" + ":type: float"); static PyObject *StrokeAttribute_alpha_get(BPy_StrokeAttribute *self, void * /*closure*/) { @@ -571,10 +593,12 @@ static int StrokeAttribute_alpha_set(BPy_StrokeAttribute *self, return 0; } -PyDoc_STRVAR(StrokeAttribute_color_doc, - "RGB components of the stroke color.\n" - "\n" - ":type: :class:`mathutils.Color`"); +PyDoc_STRVAR( + /* Wrap. */ + StrokeAttribute_color_doc, + "RGB components of the stroke color.\n" + "\n" + ":type: :class:`mathutils.Color`"); static PyObject *StrokeAttribute_color_get(BPy_StrokeAttribute *self, void * /*closure*/) { @@ -594,12 +618,14 @@ static int StrokeAttribute_color_set(BPy_StrokeAttribute *self, return 0; } -PyDoc_STRVAR(StrokeAttribute_thickness_doc, - "Right and left components of the stroke thickness.\n" - "The right (left) component is the thickness on the right (left) of the vertex\n" - "when following the stroke.\n" - "\n" - ":type: :class:`mathutils.Vector`"); +PyDoc_STRVAR( + /* Wrap. */ + StrokeAttribute_thickness_doc, + "Right and left components of the stroke thickness.\n" + "The right (left) component is the thickness on the right (left) of the vertex\n" + "when following the stroke.\n" + "\n" + ":type: :class:`mathutils.Vector`"); static PyObject *StrokeAttribute_thickness_get(BPy_StrokeAttribute *self, void * /*closure*/) { @@ -619,10 +645,12 @@ static int StrokeAttribute_thickness_set(BPy_StrokeAttribute *self, return 0; } -PyDoc_STRVAR(StrokeAttribute_visible_doc, - "The visibility flag. True if the StrokeVertex is visible.\n" - "\n" - ":type: bool"); +PyDoc_STRVAR( + /* Wrap. */ + StrokeAttribute_visible_doc, + "The visibility flag. True if the StrokeVertex is visible.\n" + "\n" + ":type: bool"); static PyObject *StrokeAttribute_visible_get(BPy_StrokeAttribute *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp b/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp index 36ff38a7e83..f6489b7d99f 100644 --- a/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp +++ b/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp @@ -167,7 +167,9 @@ int StrokeShader_Init(PyObject *module) //------------------------INSTANCE METHODS ---------------------------------- -static char StrokeShader___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + StrokeShader___doc__, "Base class for stroke shaders. Any stroke shader must inherit from\n" "this class and overload the shade() method. A StrokeShader is\n" "designed to modify stroke attributes such as thickness, color,\n" @@ -184,7 +186,7 @@ static char StrokeShader___doc__[] = "\n" ".. method:: __init__()\n" "\n" - " Default constructor.\n"; + " Default constructor.\n"); static int StrokeShader___init__(BPy_StrokeShader *self, PyObject *args, PyObject *kwds) { @@ -209,13 +211,15 @@ static PyObject *StrokeShader___repr__(BPy_StrokeShader *self) return PyUnicode_FromFormat("type: %s - address: %p", Py_TYPE(self)->tp_name, self->ss); } -static char StrokeShader_shade___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + StrokeShader_shade___doc__, ".. method:: shade(stroke)\n" "\n" " The shading method. Must be overloaded by inherited classes.\n" "\n" " :arg stroke: A Stroke object.\n" - " :type stroke: :class:`Stroke`\n"; + " :type stroke: :class:`Stroke`\n"); static PyObject *StrokeShader_shade(BPy_StrokeShader *self, PyObject *args, PyObject *kwds) { @@ -250,10 +254,12 @@ static PyMethodDef BPy_StrokeShader_methods[] = { /*----------------------StrokeShader get/setters ----------------------------*/ -PyDoc_STRVAR(StrokeShader_name_doc, - "The name of the stroke shader.\n" - "\n" - ":type: str"); +PyDoc_STRVAR( + /* Wrap. */ + StrokeShader_name_doc, + "The name of the stroke shader.\n" + "\n" + ":type: str"); static PyObject *StrokeShader_name_get(BPy_StrokeShader *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp index b0478d562ca..03454f883d4 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp @@ -56,7 +56,9 @@ int UnaryFunction0D_Init(PyObject *module) //------------------------INSTANCE METHODS ---------------------------------- -static char UnaryFunction0D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + UnaryFunction0D___doc__, "Base class for Unary Functions (functors) working on\n" ":class:`Interface0DIterator`. A unary function will be used by\n" "invoking __call__() on an Interface0DIterator. In Python, several\n" @@ -74,7 +76,7 @@ static char UnaryFunction0D___doc__[] = "* :class:`UnaryFunction0DVec2f`\n" "* :class:`UnaryFunction0DVec3f`\n" "* :class:`UnaryFunction0DVectorViewShape`\n" - "* :class:`UnaryFunction0DViewShape`\n"; + "* :class:`UnaryFunction0DViewShape`\n"); static void UnaryFunction0D___dealloc__(BPy_UnaryFunction0D *self) { @@ -88,10 +90,12 @@ static PyObject *UnaryFunction0D___repr__(BPy_UnaryFunction0D * /*self*/) /*----------------------UnaryFunction0D get/setters ----------------------------*/ -PyDoc_STRVAR(UnaryFunction0D_name_doc, - "The name of the unary 0D function.\n" - "\n" - ":type: str"); +PyDoc_STRVAR( + /* Wrap. */ + UnaryFunction0D_name_doc, + "The name of the unary 0D function.\n" + "\n" + ":type: str"); static PyObject *UnaryFunction0D_name_get(BPy_UnaryFunction0D *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp index d056a525242..ea68f8dc037 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp @@ -52,7 +52,9 @@ int UnaryFunction1D_Init(PyObject *module) //------------------------INSTANCE METHODS ---------------------------------- -static char UnaryFunction1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + UnaryFunction1D___doc__, "Base class for Unary Functions (functors) working on\n" ":class:`Interface1D`. A unary function will be used by invoking\n" "__call__() on an Interface1D. In Python, several different subclasses\n" @@ -68,7 +70,7 @@ static char UnaryFunction1D___doc__[] = "* :class:`UnaryFunction1DVec2f`\n" "* :class:`UnaryFunction1DVec3f`\n" "* :class:`UnaryFunction1DVectorViewShape`\n" - "* :class:`UnaryFunction1DVoid`\n"; + "* :class:`UnaryFunction1DVoid`\n"); static void UnaryFunction1D___dealloc__(BPy_UnaryFunction1D *self) { @@ -82,10 +84,12 @@ static PyObject *UnaryFunction1D___repr__(BPy_UnaryFunction1D * /*self*/) /*----------------------UnaryFunction1D get/setters ----------------------------*/ -PyDoc_STRVAR(UnaryFunction1D_name_doc, - "The name of the unary 1D function.\n" - "\n" - ":type: str"); +PyDoc_STRVAR( + /* Wrap. */ + UnaryFunction1D_name_doc, + "The name of the unary 1D function.\n" + "\n" + ":type: str"); static PyObject *UnaryFunction1D_name_get(BPy_UnaryFunction1D *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp index dd68c22955f..b935c1aa7a7 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp @@ -51,7 +51,9 @@ int UnaryPredicate0D_Init(PyObject *module) //------------------------INSTANCE METHODS ---------------------------------- -static char UnaryPredicate0D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + UnaryPredicate0D___doc__, "Base class for unary predicates that work on\n" ":class:`Interface0DIterator`. A UnaryPredicate0D is a functor that\n" "evaluates a condition on an Interface0DIterator and returns true or\n" @@ -71,7 +73,7 @@ static char UnaryPredicate0D___doc__[] = " which we wish to evaluate the predicate.\n" " :type it: :class:`Interface0DIterator`\n" " :return: True if the condition is satisfied, false otherwise.\n" - " :rtype: bool\n"; + " :rtype: bool\n"); static int UnaryPredicate0D___init__(BPy_UnaryPredicate0D *self, PyObject *args, PyObject *kwds) { @@ -132,10 +134,12 @@ static PyObject *UnaryPredicate0D___call__(BPy_UnaryPredicate0D *self, /*----------------------UnaryPredicate0D get/setters ----------------------------*/ -PyDoc_STRVAR(UnaryPredicate0D_name_doc, - "The name of the unary 0D predicate.\n" - "\n" - ":type: str"); +PyDoc_STRVAR( + /* Wrap. */ + UnaryPredicate0D_name_doc, + "The name of the unary 0D predicate.\n" + "\n" + ":type: str"); static PyObject *UnaryPredicate0D_name_get(BPy_UnaryPredicate0D *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp index 530d6503569..d3298457cd1 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp @@ -110,7 +110,9 @@ int UnaryPredicate1D_Init(PyObject *module) //------------------------INSTANCE METHODS ---------------------------------- -static char UnaryPredicate1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + UnaryPredicate1D___doc__, "Base class for unary predicates that work on :class:`Interface1D`. A\n" "UnaryPredicate1D is a functor that evaluates a condition on a\n" "Interface1D and returns true or false depending on whether this\n" @@ -129,7 +131,7 @@ static char UnaryPredicate1D___doc__[] = " :arg inter: The Interface1D on which we wish to evaluate the predicate.\n" " :type inter: :class:`Interface1D`\n" " :return: True if the condition is satisfied, false otherwise.\n" - " :rtype: bool\n"; + " :rtype: bool\n"); static int UnaryPredicate1D___init__(BPy_UnaryPredicate1D *self, PyObject *args, PyObject *kwds) { @@ -189,10 +191,12 @@ static PyObject *UnaryPredicate1D___call__(BPy_UnaryPredicate1D *self, /*----------------------UnaryPredicate1D get/setters ----------------------------*/ -PyDoc_STRVAR(UnaryPredicate1D_name_doc, - "The name of the unary 1D predicate.\n" - "\n" - ":type: str"); +PyDoc_STRVAR( + /* Wrap. */ + UnaryPredicate1D_name_doc, + "The name of the unary 1D predicate.\n" + "\n" + ":type: str"); static PyObject *UnaryPredicate1D_name_get(BPy_UnaryPredicate1D *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/BPy_ViewMap.cpp b/source/blender/freestyle/intern/python/BPy_ViewMap.cpp index 4411cf4dda2..f31f9aec7b8 100644 --- a/source/blender/freestyle/intern/python/BPy_ViewMap.cpp +++ b/source/blender/freestyle/intern/python/BPy_ViewMap.cpp @@ -39,12 +39,14 @@ int ViewMap_Init(PyObject *module) /*----------------------ViewMap methods----------------------------*/ -PyDoc_STRVAR(ViewMap_doc, - "Class defining the ViewMap.\n" - "\n" - ".. method:: __init__()\n" - "\n" - " Default constructor."); +PyDoc_STRVAR( + /* Wrap. */ + ViewMap_doc, + "Class defining the ViewMap.\n" + "\n" + ".. method:: __init__()\n" + "\n" + " Default constructor."); static int ViewMap_init(BPy_ViewMap *self, PyObject *args, PyObject *kwds) { @@ -68,17 +70,19 @@ static PyObject *ViewMap_repr(BPy_ViewMap *self) return PyUnicode_FromFormat("ViewMap - address: %p", self->vm); } -PyDoc_STRVAR(ViewMap_get_closest_viewedge_doc, - ".. method:: get_closest_viewedge(x, y)\n" - "\n" - " Gets the ViewEdge nearest to the 2D point specified as arguments.\n" - "\n" - " :arg x: X coordinate of a 2D point.\n" - " :type x: float\n" - " :arg y: Y coordinate of a 2D point.\n" - " :type y: float\n" - " :return: The ViewEdge nearest to the specified 2D point.\n" - " :rtype: :class:`ViewEdge`"); +PyDoc_STRVAR( + /* Wrap. */ + ViewMap_get_closest_viewedge_doc, + ".. method:: get_closest_viewedge(x, y)\n" + "\n" + " Gets the ViewEdge nearest to the 2D point specified as arguments.\n" + "\n" + " :arg x: X coordinate of a 2D point.\n" + " :type x: float\n" + " :arg y: Y coordinate of a 2D point.\n" + " :type y: float\n" + " :return: The ViewEdge nearest to the specified 2D point.\n" + " :rtype: :class:`ViewEdge`"); static PyObject *ViewMap_get_closest_viewedge(BPy_ViewMap *self, PyObject *args, PyObject *kwds) { @@ -95,17 +99,19 @@ static PyObject *ViewMap_get_closest_viewedge(BPy_ViewMap *self, PyObject *args, Py_RETURN_NONE; } -PyDoc_STRVAR(ViewMap_get_closest_fedge_doc, - ".. method:: get_closest_fedge(x, y)\n" - "\n" - " Gets the FEdge nearest to the 2D point specified as arguments.\n" - "\n" - " :arg x: X coordinate of a 2D point.\n" - " :type x: float\n" - " :arg y: Y coordinate of a 2D point.\n" - " :type y: float\n" - " :return: The FEdge nearest to the specified 2D point.\n" - " :rtype: :class:`FEdge`"); +PyDoc_STRVAR( + /* Wrap. */ + ViewMap_get_closest_fedge_doc, + ".. method:: get_closest_fedge(x, y)\n" + "\n" + " Gets the FEdge nearest to the 2D point specified as arguments.\n" + "\n" + " :arg x: X coordinate of a 2D point.\n" + " :type x: float\n" + " :arg y: Y coordinate of a 2D point.\n" + " :type y: float\n" + " :return: The FEdge nearest to the specified 2D point.\n" + " :rtype: :class:`FEdge`"); static PyObject *ViewMap_get_closest_fedge(BPy_ViewMap *self, PyObject *args, PyObject *kwds) { @@ -138,10 +144,12 @@ static PyMethodDef BPy_ViewMap_methods[] = { /*----------------------ViewMap get/setters ----------------------------*/ -PyDoc_STRVAR(ViewMap_scene_bbox_doc, - "The 3D bounding box of the scene.\n" - "\n" - ":type: :class:`BBox`"); +PyDoc_STRVAR( + /* Wrap. */ + ViewMap_scene_bbox_doc, + "The 3D bounding box of the scene.\n" + "\n" + ":type: :class:`BBox`"); static PyObject *ViewMap_scene_bbox_get(BPy_ViewMap *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/BPy_ViewShape.cpp b/source/blender/freestyle/intern/python/BPy_ViewShape.cpp index dbd7c34405d..82eb7aa8851 100644 --- a/source/blender/freestyle/intern/python/BPy_ViewShape.cpp +++ b/source/blender/freestyle/intern/python/BPy_ViewShape.cpp @@ -42,21 +42,23 @@ int ViewShape_Init(PyObject *module) /*----------------------ViewShape methods ----------------------------*/ -PyDoc_STRVAR(ViewShape_doc, - "Class gathering the elements of the ViewMap (i.e., :class:`ViewVertex`\n" - "and :class:`ViewEdge`) that are issued from the same input shape.\n" - "\n" - ".. method:: __init__()\n" - " __init__(brother)\n" - " __init__(sshape)\n" - "\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" - " :arg sshape: An SShape object.\n" - " :type sshape: :class:`SShape`"); +PyDoc_STRVAR( + /* Wrap. */ + ViewShape_doc, + "Class gathering the elements of the ViewMap (i.e., :class:`ViewVertex`\n" + "and :class:`ViewEdge`) that are issued from the same input shape.\n" + "\n" + ".. method:: __init__()\n" + " __init__(brother)\n" + " __init__(sshape)\n" + "\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" + " :arg sshape: An SShape object.\n" + " :type sshape: :class:`SShape`"); static int ViewShape_init(BPy_ViewShape *self, PyObject *args, PyObject *kwds) { @@ -107,13 +109,15 @@ static PyObject *ViewShape_repr(BPy_ViewShape *self) return PyUnicode_FromFormat("ViewShape - address: %p", self->vs); } -PyDoc_STRVAR(ViewShape_add_edge_doc, - ".. method:: add_edge(edge)\n" - "\n" - " Adds a ViewEdge to the list of ViewEdge objects.\n" - "\n" - " :arg edge: A ViewEdge object.\n" - " :type edge: :class:`ViewEdge`\n"); +PyDoc_STRVAR( + /* Wrap. */ + ViewShape_add_edge_doc, + ".. method:: add_edge(edge)\n" + "\n" + " Adds a ViewEdge to the list of ViewEdge objects.\n" + "\n" + " :arg edge: A ViewEdge object.\n" + " :type edge: :class:`ViewEdge`\n"); static PyObject *ViewShape_add_edge(BPy_ViewShape *self, PyObject *args, PyObject *kwds) { @@ -127,13 +131,15 @@ static PyObject *ViewShape_add_edge(BPy_ViewShape *self, PyObject *args, PyObjec Py_RETURN_NONE; } -PyDoc_STRVAR(ViewShape_add_vertex_doc, - ".. method:: add_vertex(vertex)\n" - "\n" - " Adds a ViewVertex to the list of the ViewVertex objects.\n" - "\n" - " :arg vertex: A ViewVertex object.\n" - " :type vertex: :class:`ViewVertex`"); +PyDoc_STRVAR( + /* Wrap. */ + ViewShape_add_vertex_doc, + ".. method:: add_vertex(vertex)\n" + "\n" + " Adds a ViewVertex to the list of the ViewVertex objects.\n" + "\n" + " :arg vertex: A ViewVertex object.\n" + " :type vertex: :class:`ViewVertex`"); static PyObject *ViewShape_add_vertex(BPy_ViewShape *self, PyObject *args, PyObject *kwds) { @@ -163,10 +169,12 @@ static PyMethodDef BPy_ViewShape_methods[] = { /*----------------------ViewShape get/setters ----------------------------*/ -PyDoc_STRVAR(ViewShape_sshape_doc, - "The SShape on top of which this ViewShape is built.\n" - "\n" - ":type: :class:`SShape`"); +PyDoc_STRVAR( + /* Wrap. */ + ViewShape_sshape_doc, + "The SShape on top of which this ViewShape is built.\n" + "\n" + ":type: :class:`SShape`"); static PyObject *ViewShape_sshape_get(BPy_ViewShape *self, void * /*closure*/) { @@ -195,10 +203,12 @@ static int ViewShape_sshape_set(BPy_ViewShape *self, PyObject *value, void * /*c return 0; } -PyDoc_STRVAR(ViewShape_vertices_doc, - "The list of ViewVertex objects contained in this ViewShape.\n" - "\n" - ":type: List of :class:`ViewVertex` objects"); +PyDoc_STRVAR( + /* Wrap. */ + ViewShape_vertices_doc, + "The list of ViewVertex objects contained in this ViewShape.\n" + "\n" + ":type: List of :class:`ViewVertex` objects"); static PyObject *ViewShape_vertices_get(BPy_ViewShape *self, void * /*closure*/) { @@ -238,10 +248,12 @@ static int ViewShape_vertices_set(BPy_ViewShape *self, PyObject *value, void * / return 0; } -PyDoc_STRVAR(ViewShape_edges_doc, - "The list of ViewEdge objects contained in this ViewShape.\n" - "\n" - ":type: List of :class:`ViewEdge` objects"); +PyDoc_STRVAR( + /* Wrap. */ + ViewShape_edges_doc, + "The list of ViewEdge objects contained in this ViewShape.\n" + "\n" + ":type: List of :class:`ViewEdge` objects"); static PyObject *ViewShape_edges_get(BPy_ViewShape *self, void * /*closure*/) { @@ -281,30 +293,36 @@ static int ViewShape_edges_set(BPy_ViewShape *self, PyObject *value, void * /*cl return 0; } -PyDoc_STRVAR(ViewShape_name_doc, - "The name of the ViewShape.\n" - "\n" - ":type: str"); +PyDoc_STRVAR( + /* Wrap. */ + ViewShape_name_doc, + "The name of the ViewShape.\n" + "\n" + ":type: str"); static PyObject *ViewShape_name_get(BPy_ViewShape *self, void * /*closure*/) { return PyUnicode_FromString(self->vs->getName().c_str()); } -PyDoc_STRVAR(ViewShape_library_path_doc, - "The library path of the ViewShape.\n" - "\n" - ":type: str, or None if the ViewShape is not part of a library"); +PyDoc_STRVAR( + /* Wrap. */ + ViewShape_library_path_doc, + "The library path of the ViewShape.\n" + "\n" + ":type: str, or None if the ViewShape is not part of a library"); static PyObject *ViewShape_library_path_get(BPy_ViewShape *self, void * /*closure*/) { return PyUnicode_FromString(self->vs->getLibraryPath().c_str()); } -PyDoc_STRVAR(ViewShape_id_doc, - "The Id of this ViewShape.\n" - "\n" - ":type: :class:`Id`"); +PyDoc_STRVAR( + /* Wrap. */ + ViewShape_id_doc, + "The Id of this ViewShape.\n" + "\n" + ":type: :class:`Id`"); static PyObject *ViewShape_id_get(BPy_ViewShape *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp index 84d71d64d81..045682e1dbc 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp @@ -18,7 +18,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char FalseBP1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + FalseBP1D___doc__, "Class hierarchy: :class:`freestyle.types.BinaryPredicate1D` > :class:`FalseBP1D`\n" "\n" ".. method:: __call__(inter1, inter2)\n" @@ -30,7 +32,7 @@ static char FalseBP1D___doc__[] = " :arg inter2: The second Interface1D object.\n" " :type inter2: :class:`freestyle.types.Interface1D`\n" " :return: False.\n" - " :rtype: bool\n"; + " :rtype: bool\n"); static int FalseBP1D___init__(BPy_FalseBP1D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp index cbb249dbf89..f4e25ebff86 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp @@ -18,7 +18,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char Length2DBP1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + Length2DBP1D___doc__, "Class hierarchy: :class:`freestyle.types.BinaryPredicate1D` > :class:`Length2DBP1D`\n" "\n" ".. method:: __call__(inter1, inter2)\n" @@ -31,7 +33,7 @@ static char Length2DBP1D___doc__[] = " :arg inter2: The second Interface1D object.\n" " :type inter2: :class:`freestyle.types.Interface1D`\n" " :return: True or false.\n" - " :rtype: bool\n"; + " :rtype: bool\n"); static int Length2DBP1D___init__(BPy_Length2DBP1D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp index 09398bfbd42..54cef71333e 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp @@ -18,7 +18,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char SameShapeIdBP1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + SameShapeIdBP1D___doc__, "Class hierarchy: :class:`freestyle.types.BinaryPredicate1D` > :class:`SameShapeIdBP1D`\n" "\n" ".. method:: __call__(inter1, inter2)\n" @@ -30,7 +32,7 @@ static char SameShapeIdBP1D___doc__[] = " :arg inter2: The second Interface1D object.\n" " :type inter2: :class:`freestyle.types.Interface1D`\n" " :return: True or false.\n" - " :rtype: bool\n"; + " :rtype: bool\n"); static int SameShapeIdBP1D___init__(BPy_SameShapeIdBP1D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp index b6d30bc3e9f..a068f16b1f3 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp @@ -18,7 +18,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char TrueBP1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + TrueBP1D___doc__, "Class hierarchy: :class:`freestyle.types.BinaryPredicate1D` > :class:`TrueBP1D`\n" "\n" ".. method:: __call__(inter1, inter2)\n" @@ -30,7 +32,7 @@ static char TrueBP1D___doc__[] = " :arg inter2: The second Interface1D object.\n" " :type inter2: :class:`freestyle.types.Interface1D`\n" " :return: True.\n" - " :rtype: bool\n"; + " :rtype: bool\n"); static int TrueBP1D___init__(BPy_TrueBP1D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp index bed715dd13d..820229a0551 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp @@ -23,7 +23,9 @@ using namespace Freestyle; // ViewMapGradientNormBP1D(int level, IntegrationType iType=MEAN, float sampling=2.0) -static char ViewMapGradientNormBP1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + ViewMapGradientNormBP1D___doc__, "Class hierarchy: :class:`freestyle.types.BinaryPredicate1D` > " ":class:`ViewMapGradientNormBP1D`\n" "\n" @@ -53,7 +55,7 @@ static char ViewMapGradientNormBP1D___doc__[] = " :arg inter2: The second Interface1D object.\n" " :type inter2: :class:`freestyle.types.Interface1D`\n" " :return: True or false.\n" - " :rtype: bool\n"; + " :rtype: bool\n"); static int ViewMapGradientNormBP1D___init__(BPy_ViewMapGradientNormBP1D *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp index 68800e4e67b..0120035bc96 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp @@ -21,41 +21,43 @@ using namespace Freestyle; /*----------------------CurvePoint methods----------------------------*/ -PyDoc_STRVAR(CurvePoint_doc, - "Class hierarchy: :class:`Interface0D` > :class:`CurvePoint`\n" - "\n" - "Class to represent a point of a curve. A CurvePoint can be any point\n" - "of a 1D curve (it doesn't have to be a vertex of the curve). Any\n" - ":class:`Interface1D` is built upon ViewEdges, themselves built upon\n" - "FEdges. Therefore, a curve is basically a polyline made of a list of\n" - ":class:`SVertex` objects. Thus, a CurvePoint is built by linearly\n" - "interpolating two :class:`SVertex` instances. CurvePoint can be used\n" - "as virtual points while querying 0D information along a curve at a\n" - "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" - " 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" - " :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 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: 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"); +PyDoc_STRVAR( + /* Wrap. */ + CurvePoint_doc, + "Class hierarchy: :class:`Interface0D` > :class:`CurvePoint`\n" + "\n" + "Class to represent a point of a curve. A CurvePoint can be any point\n" + "of a 1D curve (it doesn't have to be a vertex of the curve). Any\n" + ":class:`Interface1D` is built upon ViewEdges, themselves built upon\n" + "FEdges. Therefore, a curve is basically a polyline made of a list of\n" + ":class:`SVertex` objects. Thus, a CurvePoint is built by linearly\n" + "interpolating two :class:`SVertex` instances. CurvePoint can be used\n" + "as virtual points while querying 0D information along a curve at a\n" + "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" + " 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" + " :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 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: 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) { @@ -122,10 +124,12 @@ static int CurvePoint_init(BPy_CurvePoint *self, PyObject *args, PyObject *kwds) /*----------------------CurvePoint get/setters ----------------------------*/ -PyDoc_STRVAR(CurvePoint_first_svertex_doc, - "The first SVertex upon which the CurvePoint is built.\n" - "\n" - ":type: :class:`SVertex`"); +PyDoc_STRVAR( + /* Wrap. */ + CurvePoint_first_svertex_doc, + "The first SVertex upon which the CurvePoint is built.\n" + "\n" + ":type: :class:`SVertex`"); static PyObject *CurvePoint_first_svertex_get(BPy_CurvePoint *self, void * /*closure*/) { @@ -146,10 +150,12 @@ static int CurvePoint_first_svertex_set(BPy_CurvePoint *self, PyObject *value, v return 0; } -PyDoc_STRVAR(CurvePoint_second_svertex_doc, - "The second SVertex upon which the CurvePoint is built.\n" - "\n" - ":type: :class:`SVertex`"); +PyDoc_STRVAR( + /* Wrap. */ + CurvePoint_second_svertex_doc, + "The second SVertex upon which the CurvePoint is built.\n" + "\n" + ":type: :class:`SVertex`"); static PyObject *CurvePoint_second_svertex_get(BPy_CurvePoint *self, void * /*closure*/) { @@ -170,11 +176,13 @@ static int CurvePoint_second_svertex_set(BPy_CurvePoint *self, PyObject *value, return 0; } -PyDoc_STRVAR(CurvePoint_fedge_doc, - "Gets the FEdge for the two SVertices that given CurvePoints consists out of.\n" - "A shortcut for CurvePoint.first_svertex.get_fedge(CurvePoint.second_svertex).\n" - "\n" - ":type: :class:`FEdge`"); +PyDoc_STRVAR( + /* Wrap. */ + CurvePoint_fedge_doc, + "Gets the FEdge for the two SVertices that given CurvePoints consists out of.\n" + "A shortcut for CurvePoint.first_svertex.get_fedge(CurvePoint.second_svertex).\n" + "\n" + ":type: :class:`FEdge`"); static PyObject *CurvePoint_fedge_get(BPy_CurvePoint *self, void * /*closure*/) { @@ -187,10 +195,12 @@ static PyObject *CurvePoint_fedge_get(BPy_CurvePoint *self, void * /*closure*/) Py_RETURN_NONE; } -PyDoc_STRVAR(CurvePoint_t2d_doc, - "The 2D interpolation parameter.\n" - "\n" - ":type: float"); +PyDoc_STRVAR( + /* Wrap. */ + CurvePoint_t2d_doc, + "The 2D interpolation parameter.\n" + "\n" + ":type: float"); static PyObject *CurvePoint_t2d_get(BPy_CurvePoint *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp index 082309ae054..6ce43e2e6be 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp @@ -24,25 +24,27 @@ using namespace Freestyle; /*----------------------SVertex methods ----------------------------*/ -PyDoc_STRVAR(SVertex_doc, - "Class hierarchy: :class:`Interface0D` > :class:`SVertex`\n" - "\n" - "Class to define a vertex of the embedding.\n" - "\n" - ".. method:: __init__()\n" - " __init__(brother)\n" - " __init__(point_3d, id)\n" - "\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" - " :arg point_3d: A three-dimensional vector.\n" - " :type point_3d: :class:`mathutils.Vector`\n" - " :arg id: An Id object.\n" - " :type id: :class:`Id`"); +PyDoc_STRVAR( + /* Wrap. */ + SVertex_doc, + "Class hierarchy: :class:`Interface0D` > :class:`SVertex`\n" + "\n" + "Class to define a vertex of the embedding.\n" + "\n" + ".. method:: __init__()\n" + " __init__(brother)\n" + " __init__(point_3d, id)\n" + "\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" + " :arg point_3d: A three-dimensional vector.\n" + " :type point_3d: :class:`mathutils.Vector`\n" + " :arg id: An Id object.\n" + " :type id: :class:`Id`"); static int SVertex_init(BPy_SVertex *self, PyObject *args, PyObject *kwds) { @@ -75,14 +77,16 @@ static int SVertex_init(BPy_SVertex *self, PyObject *args, PyObject *kwds) return 0; } -PyDoc_STRVAR(SVertex_add_normal_doc, - ".. method:: add_normal(normal)\n" - "\n" - " Adds a normal to the SVertex's set of normals. If the same normal\n" - " is already in the set, nothing changes.\n" - "\n" - " :arg normal: A three-dimensional vector.\n" - " :type normal: :class:`mathutils.Vector`, list or tuple of 3 real numbers"); +PyDoc_STRVAR( + /* Wrap. */ + SVertex_add_normal_doc, + ".. method:: add_normal(normal)\n" + "\n" + " Adds a normal to the SVertex's set of normals. If the same normal\n" + " is already in the set, nothing changes.\n" + "\n" + " :arg normal: A three-dimensional vector.\n" + " :type normal: :class:`mathutils.Vector`, list or tuple of 3 real numbers"); static PyObject *SVertex_add_normal(BPy_SVertex *self, PyObject *args, PyObject *kwds) { @@ -102,13 +106,15 @@ static PyObject *SVertex_add_normal(BPy_SVertex *self, PyObject *args, PyObject Py_RETURN_NONE; } -PyDoc_STRVAR(SVertex_add_fedge_doc, - ".. method:: add_fedge(fedge)\n" - "\n" - " Add an FEdge to the list of edges emanating from this SVertex.\n" - "\n" - " :arg fedge: An FEdge.\n" - " :type fedge: :class:`FEdge`"); +PyDoc_STRVAR( + /* Wrap. */ + SVertex_add_fedge_doc, + ".. method:: add_fedge(fedge)\n" + "\n" + " Add an FEdge to the list of edges emanating from this SVertex.\n" + "\n" + " :arg fedge: An FEdge.\n" + " :type fedge: :class:`FEdge`"); static PyObject *SVertex_add_fedge(BPy_SVertex *self, PyObject *args, PyObject *kwds) { @@ -269,10 +275,12 @@ void SVertex_mathutils_register_callback() /*----------------------SVertex get/setters ----------------------------*/ -PyDoc_STRVAR(SVertex_point_3d_doc, - "The 3D coordinates of the SVertex.\n" - "\n" - ":type: :class:`mathutils.Vector`"); +PyDoc_STRVAR( + /* Wrap. */ + SVertex_point_3d_doc, + "The 3D coordinates of the SVertex.\n" + "\n" + ":type: :class:`mathutils.Vector`"); static PyObject *SVertex_point_3d_get(BPy_SVertex *self, void * /*closure*/) { @@ -291,10 +299,12 @@ static int SVertex_point_3d_set(BPy_SVertex *self, PyObject *value, void * /*clo return 0; } -PyDoc_STRVAR(SVertex_point_2d_doc, - "The projected 3D coordinates of the SVertex.\n" - "\n" - ":type: :class:`mathutils.Vector`"); +PyDoc_STRVAR( + /* Wrap. */ + SVertex_point_2d_doc, + "The projected 3D coordinates of the SVertex.\n" + "\n" + ":type: :class:`mathutils.Vector`"); static PyObject *SVertex_point_2d_get(BPy_SVertex *self, void * /*closure*/) { @@ -313,10 +323,12 @@ static int SVertex_point_2d_set(BPy_SVertex *self, PyObject *value, void * /*clo return 0; } -PyDoc_STRVAR(SVertex_id_doc, - "The Id of this SVertex.\n" - "\n" - ":type: :class:`Id`"); +PyDoc_STRVAR( + /* Wrap. */ + SVertex_id_doc, + "The Id of this SVertex.\n" + "\n" + ":type: :class:`Id`"); static PyObject *SVertex_id_get(BPy_SVertex *self, void * /*closure*/) { @@ -334,12 +346,14 @@ static int SVertex_id_set(BPy_SVertex *self, PyObject *value, void * /*closure*/ return 0; } -PyDoc_STRVAR(SVertex_normals_doc, - "The normals for this Vertex as a list. In a sharp surface, an SVertex\n" - "has exactly one normal. In a smooth surface, an SVertex can have any\n" - "number of normals.\n" - "\n" - ":type: list of :class:`mathutils.Vector` objects"); +PyDoc_STRVAR( + /* Wrap. */ + SVertex_normals_doc, + "The normals for this Vertex as a list. In a sharp surface, an SVertex\n" + "has exactly one normal. In a smooth surface, an SVertex can have any\n" + "number of normals.\n" + "\n" + ":type: list of :class:`mathutils.Vector` objects"); static PyObject *SVertex_normals_get(BPy_SVertex *self, void * /*closure*/) { @@ -356,21 +370,25 @@ static PyObject *SVertex_normals_get(BPy_SVertex *self, void * /*closure*/) return py_normals; } -PyDoc_STRVAR(SVertex_normals_size_doc, - "The number of different normals for this SVertex.\n" - "\n" - ":type: int"); +PyDoc_STRVAR( + /* Wrap. */ + SVertex_normals_size_doc, + "The number of different normals for this SVertex.\n" + "\n" + ":type: int"); static PyObject *SVertex_normals_size_get(BPy_SVertex *self, void * /*closure*/) { return PyLong_FromLong(self->sv->normalsSize()); } -PyDoc_STRVAR(SVertex_viewvertex_doc, - "If this SVertex is also a ViewVertex, this property refers to the\n" - "ViewVertex, and None otherwise.\n" - "\n" - ":type: :class:`ViewVertex`"); +PyDoc_STRVAR( + /* Wrap. */ + SVertex_viewvertex_doc, + "If this SVertex is also a ViewVertex, this property refers to the\n" + "ViewVertex, and None otherwise.\n" + "\n" + ":type: :class:`ViewVertex`"); static PyObject *SVertex_viewvertex_get(BPy_SVertex *self, void * /*closure*/) { @@ -381,18 +399,20 @@ static PyObject *SVertex_viewvertex_get(BPy_SVertex *self, void * /*closure*/) Py_RETURN_NONE; } -PyDoc_STRVAR(SVertex_curvatures_doc, - "Curvature information expressed in the form of a seven-element tuple\n" - "(K1, e1, K2, e2, Kr, er, dKr), where K1 and K2 are scalar values\n" - "representing the first (maximum) and second (minimum) principal\n" - "curvatures at this SVertex, respectively; e1 and e2 are\n" - "three-dimensional vectors representing the first and second principal\n" - "directions, i.e. the directions of the normal plane where the\n" - "curvature takes its maximum and minimum values, respectively; and Kr,\n" - "er and dKr are the radial curvature, radial direction, and the\n" - "derivative of the radial curvature at this SVertex, respectively.\n" - "\n" - ":type: tuple"); +PyDoc_STRVAR( + /* Wrap. */ + SVertex_curvatures_doc, + "Curvature information expressed in the form of a seven-element tuple\n" + "(K1, e1, K2, e2, Kr, er, dKr), where K1 and K2 are scalar values\n" + "representing the first (maximum) and second (minimum) principal\n" + "curvatures at this SVertex, respectively; e1 and e2 are\n" + "three-dimensional vectors representing the first and second principal\n" + "directions, i.e. the directions of the normal plane where the\n" + "curvature takes its maximum and minimum values, respectively; and Kr,\n" + "er and dKr are the radial curvature, radial direction, and the\n" + "derivative of the radial curvature at this SVertex, respectively.\n" + "\n" + ":type: tuple"); static PyObject *SVertex_curvatures_get(BPy_SVertex *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp index f1c7f3a93c1..9c0c380fd94 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp @@ -22,18 +22,20 @@ using namespace Freestyle; /*----------------------ViewVertex methods----------------------------*/ -PyDoc_STRVAR(ViewVertex_doc, - "Class hierarchy: :class:`Interface0D` > :class:`ViewVertex`\n" - "\n" - "Class to define a view vertex. A view vertex is a feature vertex\n" - "corresponding to a point of the image graph, where the characteristics\n" - "of an edge (e.g., nature and visibility) might change. A\n" - ":class:`ViewVertex` can be of two kinds: A :class:`TVertex` when it\n" - "corresponds to the intersection between two ViewEdges or a\n" - ":class:`NonTVertex` when it corresponds to a vertex of the initial\n" - "input mesh (it is the case for vertices such as corners for example).\n" - "Thus, this class can be specialized into two classes, the\n" - ":class:`TVertex` class and the :class:`NonTVertex` class."); +PyDoc_STRVAR( + /* Wrap. */ + ViewVertex_doc, + "Class hierarchy: :class:`Interface0D` > :class:`ViewVertex`\n" + "\n" + "Class to define a view vertex. A view vertex is a feature vertex\n" + "corresponding to a point of the image graph, where the characteristics\n" + "of an edge (e.g., nature and visibility) might change. A\n" + ":class:`ViewVertex` can be of two kinds: A :class:`TVertex` when it\n" + "corresponds to the intersection between two ViewEdges or a\n" + ":class:`NonTVertex` when it corresponds to a vertex of the initial\n" + "input mesh (it is the case for vertices such as corners for example).\n" + "Thus, this class can be specialized into two classes, the\n" + ":class:`TVertex` class and the :class:`NonTVertex` class."); static int ViewVertex_init(BPy_ViewVertex * /*self*/, PyObject * /*args*/, PyObject * /*kwds*/) { @@ -41,17 +43,19 @@ static int ViewVertex_init(BPy_ViewVertex * /*self*/, PyObject * /*args*/, PyObj return -1; } -PyDoc_STRVAR(ViewVertex_edges_begin_doc, - ".. method:: edges_begin()\n" - "\n" - " Returns an iterator over the ViewEdges that goes to or comes from\n" - " this ViewVertex pointing to the first ViewEdge of the list. The\n" - " orientedViewEdgeIterator allows to iterate in CCW order over these\n" - " ViewEdges and to get the orientation for each ViewEdge\n" - " (incoming/outgoing).\n" - "\n" - " :return: An orientedViewEdgeIterator pointing to the first ViewEdge.\n" - " :rtype: :class:`orientedViewEdgeIterator`"); +PyDoc_STRVAR( + /* Wrap. */ + ViewVertex_edges_begin_doc, + ".. method:: edges_begin()\n" + "\n" + " Returns an iterator over the ViewEdges that goes to or comes from\n" + " this ViewVertex pointing to the first ViewEdge of the list. The\n" + " orientedViewEdgeIterator allows to iterate in CCW order over these\n" + " ViewEdges and to get the orientation for each ViewEdge\n" + " (incoming/outgoing).\n" + "\n" + " :return: An orientedViewEdgeIterator pointing to the first ViewEdge.\n" + " :rtype: :class:`orientedViewEdgeIterator`"); static PyObject *ViewVertex_edges_begin(BPy_ViewVertex *self) { @@ -59,14 +63,16 @@ static PyObject *ViewVertex_edges_begin(BPy_ViewVertex *self) return BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator(ove_it, false); } -PyDoc_STRVAR(ViewVertex_edges_end_doc, - ".. method:: edges_end()\n" - "\n" - " Returns an orientedViewEdgeIterator over the ViewEdges around this\n" - " ViewVertex, pointing after the last ViewEdge.\n" - "\n" - " :return: An orientedViewEdgeIterator pointing after the last ViewEdge.\n" - " :rtype: :class:`orientedViewEdgeIterator`"); +PyDoc_STRVAR( + /* Wrap. */ + ViewVertex_edges_end_doc, + ".. method:: edges_end()\n" + "\n" + " Returns an orientedViewEdgeIterator over the ViewEdges around this\n" + " ViewVertex, pointing after the last ViewEdge.\n" + "\n" + " :return: An orientedViewEdgeIterator pointing after the last ViewEdge.\n" + " :rtype: :class:`orientedViewEdgeIterator`"); static PyObject *ViewVertex_edges_end(BPy_ViewVertex * /*self*/) { @@ -79,16 +85,18 @@ static PyObject *ViewVertex_edges_end(BPy_ViewVertex * /*self*/) #endif } -PyDoc_STRVAR(ViewVertex_edges_iterator_doc, - ".. method:: edges_iterator(edge)\n" - "\n" - " Returns an orientedViewEdgeIterator pointing to the ViewEdge given\n" - " as argument.\n" - "\n" - " :arg edge: A ViewEdge object.\n" - " :type edge: :class:`ViewEdge`\n" - " :return: An orientedViewEdgeIterator pointing to the given ViewEdge.\n" - " :rtype: :class:`orientedViewEdgeIterator`"); +PyDoc_STRVAR( + /* Wrap. */ + ViewVertex_edges_iterator_doc, + ".. method:: edges_iterator(edge)\n" + "\n" + " Returns an orientedViewEdgeIterator pointing to the ViewEdge given\n" + " as argument.\n" + "\n" + " :arg edge: A ViewEdge object.\n" + " :type edge: :class:`ViewEdge`\n" + " :return: An orientedViewEdgeIterator pointing to the given ViewEdge.\n" + " :rtype: :class:`orientedViewEdgeIterator`"); static PyObject *ViewVertex_edges_iterator(BPy_ViewVertex *self, PyObject *args, PyObject *kwds) { @@ -115,10 +123,12 @@ static PyMethodDef BPy_ViewVertex_methods[] = { /*----------------------ViewVertex get/setters ----------------------------*/ -PyDoc_STRVAR(ViewVertex_nature_doc, - "The nature of this ViewVertex.\n" - "\n" - ":type: :class:`Nature`"); +PyDoc_STRVAR( + /* Wrap. */ + ViewVertex_nature_doc, + "The nature of this ViewVertex.\n" + "\n" + ":type: :class:`Nature`"); static PyObject *ViewVertex_nature_get(BPy_ViewVertex *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp index 0be747e1c0d..13925a4ba2d 100644 --- a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp @@ -24,6 +24,7 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- PyDoc_STRVAR( + /* Wrap. */ StrokeVertex_doc, "Class hierarchy: :class:`Interface0D` > :class:`CurvePoint` > :class:`StrokeVertex`\n" "\n" @@ -220,10 +221,12 @@ void StrokeVertex_mathutils_register_callback() /*----------------------StrokeVertex get/setters ----------------------------*/ -PyDoc_STRVAR(StrokeVertex_attribute_doc, - "StrokeAttribute for this StrokeVertex.\n" - "\n" - ":type: :class:`StrokeAttribute`"); +PyDoc_STRVAR( + /* Wrap. */ + StrokeVertex_attribute_doc, + "StrokeAttribute for this StrokeVertex.\n" + "\n" + ":type: :class:`StrokeAttribute`"); static PyObject *StrokeVertex_attribute_get(BPy_StrokeVertex *self, void * /*closure*/) { @@ -240,10 +243,12 @@ static int StrokeVertex_attribute_set(BPy_StrokeVertex *self, PyObject *value, v return 0; } -PyDoc_STRVAR(StrokeVertex_curvilinear_abscissa_doc, - "Curvilinear abscissa of this StrokeVertex in the Stroke.\n" - "\n" - ":type: float"); +PyDoc_STRVAR( + /* Wrap. */ + StrokeVertex_curvilinear_abscissa_doc, + "Curvilinear abscissa of this StrokeVertex in the Stroke.\n" + "\n" + ":type: float"); static PyObject *StrokeVertex_curvilinear_abscissa_get(BPy_StrokeVertex *self, void * /*closure*/) { @@ -264,10 +269,12 @@ static int StrokeVertex_curvilinear_abscissa_set(BPy_StrokeVertex *self, return 0; } -PyDoc_STRVAR(StrokeVertex_point_doc, - "2D point coordinates.\n" - "\n" - ":type: :class:`mathutils.Vector`"); +PyDoc_STRVAR( + /* Wrap. */ + StrokeVertex_point_doc, + "2D point coordinates.\n" + "\n" + ":type: :class:`mathutils.Vector`"); static PyObject *StrokeVertex_point_get(BPy_StrokeVertex *self, void * /*closure*/) { @@ -285,11 +292,13 @@ static int StrokeVertex_point_set(BPy_StrokeVertex *self, PyObject *value, void return 0; } -PyDoc_STRVAR(StrokeVertex_stroke_length_doc, - "Stroke length (it is only a value retained by the StrokeVertex,\n" - "and it won't change the real stroke length).\n" - "\n" - ":type: float"); +PyDoc_STRVAR( + /* Wrap. */ + StrokeVertex_stroke_length_doc, + "Stroke length (it is only a value retained by the StrokeVertex,\n" + "and it won't change the real stroke length).\n" + "\n" + ":type: float"); static PyObject *StrokeVertex_stroke_length_get(BPy_StrokeVertex *self, void * /*closure*/) { @@ -310,10 +319,12 @@ static int StrokeVertex_stroke_length_set(BPy_StrokeVertex *self, return 0; } -PyDoc_STRVAR(StrokeVertex_u_doc, - "Curvilinear abscissa of this StrokeVertex in the Stroke.\n" - "\n" - ":type: float"); +PyDoc_STRVAR( + /* Wrap. */ + StrokeVertex_u_doc, + "Curvilinear abscissa of this StrokeVertex in the Stroke.\n" + "\n" + ":type: float"); static PyObject *StrokeVertex_u_get(BPy_StrokeVertex *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp index 4d1b7132cc1..2d7ede57cc5 100644 --- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp @@ -22,6 +22,7 @@ using namespace Freestyle; /*----------------------NonTVertex methods ----------------------------*/ PyDoc_STRVAR( + /* Wrap. */ NonTVertex_doc, "Class hierarchy: :class:`Interface0D` > :class:`ViewVertex` > :class:`NonTVertex`\n" "\n" @@ -60,10 +61,12 @@ static int NonTVertex_init(BPy_NonTVertex *self, PyObject *args, PyObject *kwds) /*----------------------NonTVertex get/setters ----------------------------*/ -PyDoc_STRVAR(NonTVertex_svertex_doc, - "The SVertex on top of which this NonTVertex is built.\n" - "\n" - ":type: :class:`SVertex`"); +PyDoc_STRVAR( + /* Wrap. */ + NonTVertex_svertex_doc, + "The SVertex on top of which this NonTVertex is built.\n" + "\n" + ":type: :class:`SVertex`"); static PyObject *NonTVertex_svertex_get(BPy_NonTVertex *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp index 191a2fd42ca..f15f5a62c32 100644 --- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp @@ -24,18 +24,20 @@ using namespace Freestyle; /*----------------------TVertex methods ----------------------------*/ -PyDoc_STRVAR(TVertex_doc, - "Class hierarchy: :class:`Interface0D` > :class:`ViewVertex` > :class:`TVertex`\n" - "\n" - "Class to define a T vertex, i.e. an intersection between two edges.\n" - "It points towards two SVertex and four ViewEdges. Among the\n" - "ViewEdges, two are front and the other two are back. Basically a\n" - "front edge hides part of a back edge. So, among the back edges, one\n" - "is of invisibility N and the other of invisibility N+1.\n" - "\n" - ".. method:: __init__()\n" - "\n" - " Default constructor."); +PyDoc_STRVAR( + /* Wrap. */ + TVertex_doc, + "Class hierarchy: :class:`Interface0D` > :class:`ViewVertex` > :class:`TVertex`\n" + "\n" + "Class to define a T vertex, i.e. an intersection between two edges.\n" + "It points towards two SVertex and four ViewEdges. Among the\n" + "ViewEdges, two are front and the other two are back. Basically a\n" + "front edge hides part of a back edge. So, among the back edges, one\n" + "is of invisibility N and the other of invisibility N+1.\n" + "\n" + ".. method:: __init__()\n" + "\n" + " Default constructor."); /* NOTE: No copy constructor in Python because the C++ copy constructor is 'protected'. */ @@ -53,15 +55,17 @@ static int TVertex_init(BPy_TVertex *self, PyObject *args, PyObject *kwds) return 0; } -PyDoc_STRVAR(TVertex_get_svertex_doc, - ".. method:: get_svertex(fedge)\n" - "\n" - " Returns the SVertex (among the 2) belonging to the given FEdge.\n" - "\n" - " :arg fedge: An FEdge object.\n" - " :type fedge: :class:`FEdge`\n" - " :return: The SVertex belonging to the given FEdge.\n" - " :rtype: :class:`SVertex`"); +PyDoc_STRVAR( + /* Wrap. */ + TVertex_get_svertex_doc, + ".. method:: get_svertex(fedge)\n" + "\n" + " Returns the SVertex (among the 2) belonging to the given FEdge.\n" + "\n" + " :arg fedge: An FEdge object.\n" + " :type fedge: :class:`FEdge`\n" + " :return: The SVertex belonging to the given FEdge.\n" + " :rtype: :class:`SVertex`"); static PyObject *TVertex_get_svertex(BPy_TVertex *self, PyObject *args, PyObject *kwds) { @@ -78,17 +82,19 @@ static PyObject *TVertex_get_svertex(BPy_TVertex *self, PyObject *args, PyObject Py_RETURN_NONE; } -PyDoc_STRVAR(TVertex_get_mate_doc, - ".. method:: get_mate(viewedge)\n" - "\n" - " Returns the mate edge of the ViewEdge given as argument. If the\n" - " ViewEdge is frontEdgeA, frontEdgeB is returned. If the ViewEdge is\n" - " frontEdgeB, frontEdgeA is returned. Same for back edges.\n" - "\n" - " :arg viewedge: A ViewEdge object.\n" - " :type viewedge: :class:`ViewEdge`\n" - " :return: The mate edge of the given ViewEdge.\n" - " :rtype: :class:`ViewEdge`"); +PyDoc_STRVAR( + /* Wrap. */ + TVertex_get_mate_doc, + ".. method:: get_mate(viewedge)\n" + "\n" + " Returns the mate edge of the ViewEdge given as argument. If the\n" + " ViewEdge is frontEdgeA, frontEdgeB is returned. If the ViewEdge is\n" + " frontEdgeB, frontEdgeA is returned. Same for back edges.\n" + "\n" + " :arg viewedge: A ViewEdge object.\n" + " :type viewedge: :class:`ViewEdge`\n" + " :return: The mate edge of the given ViewEdge.\n" + " :rtype: :class:`ViewEdge`"); static PyObject *TVertex_get_mate(BPy_TVertex *self, PyObject *args, PyObject *kwds) { @@ -119,10 +125,12 @@ static PyMethodDef BPy_TVertex_methods[] = { /*----------------------TVertex get/setters ----------------------------*/ -PyDoc_STRVAR(TVertex_front_svertex_doc, - "The SVertex that is closer to the viewpoint.\n" - "\n" - ":type: :class:`SVertex`"); +PyDoc_STRVAR( + /* Wrap. */ + TVertex_front_svertex_doc, + "The SVertex that is closer to the viewpoint.\n" + "\n" + ":type: :class:`SVertex`"); static PyObject *TVertex_front_svertex_get(BPy_TVertex *self, void * /*closure*/) { @@ -143,10 +151,12 @@ static int TVertex_front_svertex_set(BPy_TVertex *self, PyObject *value, void * return 0; } -PyDoc_STRVAR(TVertex_back_svertex_doc, - "The SVertex that is further away from the viewpoint.\n" - "\n" - ":type: :class:`SVertex`"); +PyDoc_STRVAR( + /* Wrap. */ + TVertex_back_svertex_doc, + "The SVertex that is further away from the viewpoint.\n" + "\n" + ":type: :class:`SVertex`"); static PyObject *TVertex_back_svertex_get(BPy_TVertex *self, void * /*closure*/) { @@ -167,10 +177,12 @@ static int TVertex_back_svertex_set(BPy_TVertex *self, PyObject *value, void * / return 0; } -PyDoc_STRVAR(TVertex_id_doc, - "The Id of this TVertex.\n" - "\n" - ":type: :class:`Id`"); +PyDoc_STRVAR( + /* Wrap. */ + TVertex_id_doc, + "The Id of this TVertex.\n" + "\n" + ":type: :class:`Id`"); static PyObject *TVertex_id_get(BPy_TVertex *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp index dc9f9f46306..a75d323958d 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp @@ -24,31 +24,33 @@ using namespace Freestyle; /*----------------------FEdge methods ----------------------------*/ -PyDoc_STRVAR(FEdge_doc, - "Class hierarchy: :class:`Interface1D` > :class:`FEdge`\n" - "\n" - "Base Class for feature edges. This FEdge can represent a silhouette,\n" - "a crease, a ridge/valley, a border or a suggestive contour. For\n" - "silhouettes, the FEdge is oriented so that the visible face lies on\n" - "the left of the edge. For borders, the FEdge is oriented so that the\n" - "face lies on the left of the edge. An FEdge can represent an initial\n" - "edge of the mesh or runs across a face of the initial mesh depending\n" - "on the smoothness or sharpness of the mesh. This class is specialized\n" - "into a smooth and a sharp version since their properties slightly vary\n" - "from one to the other.\n" - "\n" - ".. method:: FEdge()\n" - " FEdge(brother)\n" - "\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" - " :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`"); +PyDoc_STRVAR( + /* Wrap. */ + FEdge_doc, + "Class hierarchy: :class:`Interface1D` > :class:`FEdge`\n" + "\n" + "Base Class for feature edges. This FEdge can represent a silhouette,\n" + "a crease, a ridge/valley, a border or a suggestive contour. For\n" + "silhouettes, the FEdge is oriented so that the visible face lies on\n" + "the left of the edge. For borders, the FEdge is oriented so that the\n" + "face lies on the left of the edge. An FEdge can represent an initial\n" + "edge of the mesh or runs across a face of the initial mesh depending\n" + "on the smoothness or sharpness of the mesh. This class is specialized\n" + "into a smooth and a sharp version since their properties slightly vary\n" + "from one to the other.\n" + "\n" + ".. method:: FEdge()\n" + " FEdge(brother)\n" + "\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" + " :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`"); static int FEdge_init(BPy_FEdge *self, PyObject *args, PyObject *kwds) { @@ -117,10 +119,12 @@ static PySequenceMethods BPy_FEdge_as_sequence = { /*----------------------FEdge get/setters ----------------------------*/ -PyDoc_STRVAR(FEdge_first_svertex_doc, - "The first SVertex constituting this FEdge.\n" - "\n" - ":type: :class:`SVertex`"); +PyDoc_STRVAR( + /* Wrap. */ + FEdge_first_svertex_doc, + "The first SVertex constituting this FEdge.\n" + "\n" + ":type: :class:`SVertex`"); static PyObject *FEdge_first_svertex_get(BPy_FEdge *self, void * /*closure*/) { @@ -141,10 +145,12 @@ static int FEdge_first_svertex_set(BPy_FEdge *self, PyObject *value, void * /*cl return 0; } -PyDoc_STRVAR(FEdge_second_svertex_doc, - "The second SVertex constituting this FEdge.\n" - "\n" - ":type: :class:`SVertex`"); +PyDoc_STRVAR( + /* Wrap. */ + FEdge_second_svertex_doc, + "The second SVertex constituting this FEdge.\n" + "\n" + ":type: :class:`SVertex`"); static PyObject *FEdge_second_svertex_get(BPy_FEdge *self, void * /*closure*/) { @@ -165,11 +171,13 @@ static int FEdge_second_svertex_set(BPy_FEdge *self, PyObject *value, void * /*c return 0; } -PyDoc_STRVAR(FEdge_next_fedge_doc, - "The FEdge following this one in the ViewEdge. The value is None if\n" - "this FEdge is the last of the ViewEdge.\n" - "\n" - ":type: :class:`FEdge`"); +PyDoc_STRVAR( + /* Wrap. */ + FEdge_next_fedge_doc, + "The FEdge following this one in the ViewEdge. The value is None if\n" + "this FEdge is the last of the ViewEdge.\n" + "\n" + ":type: :class:`FEdge`"); static PyObject *FEdge_next_fedge_get(BPy_FEdge *self, void * /*closure*/) { @@ -190,11 +198,13 @@ static int FEdge_next_fedge_set(BPy_FEdge *self, PyObject *value, void * /*closu return 0; } -PyDoc_STRVAR(FEdge_previous_fedge_doc, - "The FEdge preceding this one in the ViewEdge. The value is None if\n" - "this FEdge is the first one of the ViewEdge.\n" - "\n" - ":type: :class:`FEdge`"); +PyDoc_STRVAR( + /* Wrap. */ + FEdge_previous_fedge_doc, + "The FEdge preceding this one in the ViewEdge. The value is None if\n" + "this FEdge is the first one of the ViewEdge.\n" + "\n" + ":type: :class:`FEdge`"); static PyObject *FEdge_previous_fedge_get(BPy_FEdge *self, void * /*closure*/) { @@ -215,10 +225,12 @@ static int FEdge_previous_fedge_set(BPy_FEdge *self, PyObject *value, void * /*c return 0; } -PyDoc_STRVAR(FEdge_viewedge_doc, - "The ViewEdge to which this FEdge belongs to.\n" - "\n" - ":type: :class:`ViewEdge`"); +PyDoc_STRVAR( + /* Wrap. */ + FEdge_viewedge_doc, + "The ViewEdge to which this FEdge belongs to.\n" + "\n" + ":type: :class:`ViewEdge`"); static PyObject *FEdge_viewedge_get(BPy_FEdge *self, void * /*closure*/) { @@ -239,10 +251,12 @@ static int FEdge_viewedge_set(BPy_FEdge *self, PyObject *value, void * /*closure return 0; } -PyDoc_STRVAR(FEdge_is_smooth_doc, - "True if this FEdge is a smooth FEdge.\n" - "\n" - ":type: bool"); +PyDoc_STRVAR( + /* Wrap. */ + FEdge_is_smooth_doc, + "True if this FEdge is a smooth FEdge.\n" + "\n" + ":type: bool"); static PyObject *FEdge_is_smooth_get(BPy_FEdge *self, void * /*closure*/) { @@ -259,10 +273,12 @@ static int FEdge_is_smooth_set(BPy_FEdge *self, PyObject *value, void * /*closur return 0; } -PyDoc_STRVAR(FEdge_id_doc, - "The Id of this FEdge.\n" - "\n" - ":type: :class:`Id`"); +PyDoc_STRVAR( + /* Wrap. */ + FEdge_id_doc, + "The Id of this FEdge.\n" + "\n" + ":type: :class:`Id`"); static PyObject *FEdge_id_get(BPy_FEdge *self, void * /*closure*/) { @@ -280,10 +296,12 @@ static int FEdge_id_set(BPy_FEdge *self, PyObject *value, void * /*closure*/) return 0; } -PyDoc_STRVAR(FEdge_nature_doc, - "The nature of this FEdge.\n" - "\n" - ":type: :class:`Nature`"); +PyDoc_STRVAR( + /* Wrap. */ + FEdge_nature_doc, + "The nature of this FEdge.\n" + "\n" + ":type: :class:`Nature`"); static PyObject *FEdge_nature_get(BPy_FEdge *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp index 13feaa8b85b..bec5f24548b 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp @@ -23,24 +23,26 @@ using namespace Freestyle; /*----------------------CurvePoint methods ----------------------------*/ -PyDoc_STRVAR(FrsCurve_doc, - "Class hierarchy: :class:`Interface1D` > :class:`Curve`\n" - "\n" - "Base class for curves made of CurvePoints. :class:`SVertex` is the\n" - "type of the initial curve vertices. A :class:`Chain` is a\n" - "specialization of a Curve.\n" - "\n" - ".. method:: __init__()\n" - " __init__(brother)\n" - " __init__(id)\n" - "\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" - " :arg id: An Id object.\n" - " :type id: :class:`Id`"); +PyDoc_STRVAR( + /* Wrap. */ + FrsCurve_doc, + "Class hierarchy: :class:`Interface1D` > :class:`Curve`\n" + "\n" + "Base class for curves made of CurvePoints. :class:`SVertex` is the\n" + "type of the initial curve vertices. A :class:`Chain` is a\n" + "specialization of a Curve.\n" + "\n" + ".. method:: __init__()\n" + " __init__(brother)\n" + " __init__(id)\n" + "\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" + " :arg id: An Id object.\n" + " :type id: :class:`Id`"); static int FrsCurve_init(BPy_FrsCurve *self, PyObject *args, PyObject *kwds) { @@ -70,13 +72,15 @@ static int FrsCurve_init(BPy_FrsCurve *self, PyObject *args, PyObject *kwds) return 0; } -PyDoc_STRVAR(FrsCurve_push_vertex_back_doc, - ".. method:: push_vertex_back(vertex)\n" - "\n" - " Adds a single vertex at the end of the Curve.\n" - "\n" - " :arg vertex: A vertex object.\n" - " :type vertex: :class:`SVertex` or :class:`CurvePoint`"); +PyDoc_STRVAR( + /* Wrap. */ + FrsCurve_push_vertex_back_doc, + ".. method:: push_vertex_back(vertex)\n" + "\n" + " Adds a single vertex at the end of the Curve.\n" + "\n" + " :arg vertex: A vertex object.\n" + " :type vertex: :class:`SVertex` or :class:`CurvePoint`"); static PyObject *FrsCurve_push_vertex_back(BPy_FrsCurve *self, PyObject *args, PyObject *kwds) { @@ -100,13 +104,15 @@ static PyObject *FrsCurve_push_vertex_back(BPy_FrsCurve *self, PyObject *args, P Py_RETURN_NONE; } -PyDoc_STRVAR(FrsCurve_push_vertex_front_doc, - ".. method:: push_vertex_front(vertex)\n" - "\n" - " Adds a single vertex at the front of the Curve.\n" - "\n" - " :arg vertex: A vertex object.\n" - " :type vertex: :class:`SVertex` or :class:`CurvePoint`"); +PyDoc_STRVAR( + /* Wrap. */ + FrsCurve_push_vertex_front_doc, + ".. method:: push_vertex_front(vertex)\n" + "\n" + " Adds a single vertex at the front of the Curve.\n" + "\n" + " :arg vertex: A vertex object.\n" + " :type vertex: :class:`SVertex` or :class:`CurvePoint`"); static PyObject *FrsCurve_push_vertex_front(BPy_FrsCurve *self, PyObject *args, PyObject *kwds) { @@ -144,20 +150,24 @@ static PyMethodDef BPy_FrsCurve_methods[] = { /*----------------------CurvePoint get/setters ----------------------------*/ -PyDoc_STRVAR(FrsCurve_is_empty_doc, - "True if the Curve doesn't have any Vertex yet.\n" - "\n" - ":type: bool"); +PyDoc_STRVAR( + /* Wrap. */ + FrsCurve_is_empty_doc, + "True if the Curve doesn't have any Vertex yet.\n" + "\n" + ":type: bool"); static PyObject *FrsCurve_is_empty_get(BPy_FrsCurve *self, void * /*closure*/) { return PyBool_from_bool(self->c->empty()); } -PyDoc_STRVAR(FrsCurve_segments_size_doc, - "The number of segments in the polyline constituting the Curve.\n" - "\n" - ":type: int"); +PyDoc_STRVAR( + /* Wrap. */ + FrsCurve_segments_size_doc, + "The number of segments in the polyline constituting the Curve.\n" + "\n" + ":type: int"); static PyObject *FrsCurve_segments_size_get(BPy_FrsCurve *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp index 521ee70805e..a62da45ab23 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp @@ -33,18 +33,20 @@ using namespace Freestyle; // pb: - need to be able to switch representation: InputVertexIterator <=> position // - is it even used ? not even in SWIG version -PyDoc_STRVAR(Stroke_doc, - "Class hierarchy: :class:`Interface1D` > :class:`Stroke`\n" - "\n" - "Class to define a stroke. A stroke is made of a set of 2D vertices\n" - "(:class:`StrokeVertex`), regularly spaced out. This set of vertices\n" - "defines the stroke's backbone geometry. Each of these stroke vertices\n" - "defines the stroke's shape and appearance at this vertex position.\n" - "\n" - ".. method:: Stroke()\n" - " Stroke(brother)\n" - "\n" - " Creates a :class:`Stroke` using the default constructor or copy constructor\n"); +PyDoc_STRVAR( + /* Wrap. */ + Stroke_doc, + "Class hierarchy: :class:`Interface1D` > :class:`Stroke`\n" + "\n" + "Class to define a stroke. A stroke is made of a set of 2D vertices\n" + "(:class:`StrokeVertex`), regularly spaced out. This set of vertices\n" + "defines the stroke's backbone geometry. Each of these stroke vertices\n" + "defines the stroke's shape and appearance at this vertex position.\n" + "\n" + ".. method:: Stroke()\n" + " Stroke(brother)\n" + "\n" + " Creates a :class:`Stroke` using the default constructor or copy constructor\n"); static int Stroke_init(BPy_Stroke *self, PyObject *args, PyObject *kwds) { @@ -88,20 +90,22 @@ static PyObject *Stroke_sq_item(BPy_Stroke *self, Py_ssize_t keynum) return BPy_StrokeVertex_from_StrokeVertex(self->s->strokeVerticeAt(keynum)); } -PyDoc_STRVAR(Stroke_compute_sampling_doc, - ".. method:: compute_sampling(n)\n" - "\n" - " Compute the sampling needed to get N vertices. If the\n" - " specified number of vertices is less than the actual number of\n" - " vertices, the actual sampling value is returned. (To remove Vertices,\n" - " use the RemoveVertex() method of this class.)\n" - "\n" - " :arg n: The number of stroke vertices we eventually want\n" - " in our Stroke.\n" - " :type n: int\n" - " :return: The sampling that must be used in the Resample(float)\n" - " method.\n" - " :rtype: float"); +PyDoc_STRVAR( + /* Wrap. */ + Stroke_compute_sampling_doc, + ".. method:: compute_sampling(n)\n" + "\n" + " Compute the sampling needed to get N vertices. If the\n" + " specified number of vertices is less than the actual number of\n" + " vertices, the actual sampling value is returned. (To remove Vertices,\n" + " use the RemoveVertex() method of this class.)\n" + "\n" + " :arg n: The number of stroke vertices we eventually want\n" + " in our Stroke.\n" + " :type n: int\n" + " :return: The sampling that must be used in the Resample(float)\n" + " method.\n" + " :rtype: float"); static PyObject *Stroke_compute_sampling(BPy_Stroke *self, PyObject *args, PyObject *kwds) { @@ -114,21 +118,23 @@ static PyObject *Stroke_compute_sampling(BPy_Stroke *self, PyObject *args, PyObj return PyFloat_FromDouble(self->s->ComputeSampling(i)); } -PyDoc_STRVAR(Stroke_resample_doc, - ".. method:: resample(n)\n" - " resample(sampling)\n" - "\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" - " :type n: int\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"); +PyDoc_STRVAR( + /* Wrap. */ + Stroke_resample_doc, + ".. method:: resample(n)\n" + " resample(sampling)\n" + "\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" + " :type n: int\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) { @@ -158,18 +164,20 @@ static PyObject *Stroke_resample(BPy_Stroke *self, PyObject *args, PyObject *kwd Py_RETURN_NONE; } -PyDoc_STRVAR(Stroke_insert_vertex_doc, - ".. method:: insert_vertex(vertex, next)\n" - "\n" - " Inserts the StrokeVertex given as argument into the Stroke before the\n" - " point specified by next. The length and curvilinear abscissa are\n" - " updated consequently.\n" - "\n" - " :arg vertex: The StrokeVertex to insert in the Stroke.\n" - " :type vertex: :class:`StrokeVertex`\n" - " :arg next: A StrokeVertexIterator pointing to the StrokeVertex\n" - " before which vertex must be inserted.\n" - " :type next: :class:`StrokeVertexIterator`"); +PyDoc_STRVAR( + /* Wrap. */ + Stroke_insert_vertex_doc, + ".. method:: insert_vertex(vertex, next)\n" + "\n" + " Inserts the StrokeVertex given as argument into the Stroke before the\n" + " point specified by next. The length and curvilinear abscissa are\n" + " updated consequently.\n" + "\n" + " :arg vertex: The StrokeVertex to insert in the Stroke.\n" + " :type vertex: :class:`StrokeVertex`\n" + " :arg next: A StrokeVertexIterator pointing to the StrokeVertex\n" + " before which vertex must be inserted.\n" + " :type next: :class:`StrokeVertexIterator`"); static PyObject *Stroke_insert_vertex(BPy_Stroke *self, PyObject *args, PyObject *kwds) { @@ -197,14 +205,16 @@ static PyObject *Stroke_insert_vertex(BPy_Stroke *self, PyObject *args, PyObject Py_RETURN_NONE; } -PyDoc_STRVAR(Stroke_remove_vertex_doc, - ".. method:: remove_vertex(vertex)\n" - "\n" - " Removes the StrokeVertex given as argument from the Stroke. The length\n" - " and curvilinear abscissa are updated consequently.\n" - "\n" - " :arg vertex: the StrokeVertex to remove from the Stroke.\n" - " :type vertex: :class:`StrokeVertex`"); +PyDoc_STRVAR( + /* Wrap. */ + Stroke_remove_vertex_doc, + ".. method:: remove_vertex(vertex)\n" + "\n" + " Removes the StrokeVertex given as argument from the Stroke. The length\n" + " and curvilinear abscissa are updated consequently.\n" + "\n" + " :arg vertex: the StrokeVertex to remove from the Stroke.\n" + " :type vertex: :class:`StrokeVertex`"); static PyObject *Stroke_remove_vertex(BPy_Stroke *self, PyObject *args, PyObject *kwds) { @@ -225,10 +235,12 @@ static PyObject *Stroke_remove_vertex(BPy_Stroke *self, PyObject *args, PyObject Py_RETURN_NONE; } -PyDoc_STRVAR(Stroke_remove_all_vertices_doc, - ".. method:: remove_all_vertices()\n" - "\n" - " Removes all vertices from the Stroke."); +PyDoc_STRVAR( + /* Wrap. */ + Stroke_remove_all_vertices_doc, + ".. method:: remove_all_vertices()\n" + "\n" + " Removes all vertices from the Stroke."); static PyObject *Stroke_remove_all_vertices(BPy_Stroke *self) { @@ -236,10 +248,12 @@ static PyObject *Stroke_remove_all_vertices(BPy_Stroke *self) Py_RETURN_NONE; } -PyDoc_STRVAR(Stroke_update_length_doc, - ".. method:: update_length()\n" - "\n" - " Updates the 2D length of the Stroke."); +PyDoc_STRVAR( + /* Wrap. */ + Stroke_update_length_doc, + ".. method:: update_length()\n" + "\n" + " Updates the 2D length of the Stroke."); static PyObject *Stroke_update_length(BPy_Stroke *self) { @@ -247,18 +261,20 @@ static PyObject *Stroke_update_length(BPy_Stroke *self) Py_RETURN_NONE; } -PyDoc_STRVAR(Stroke_stroke_vertices_begin_doc, - ".. method:: stroke_vertices_begin(t=0.0)\n" - "\n" - " Returns a StrokeVertexIterator pointing on the first StrokeVertex of\n" - " the Stroke. One can specify a sampling value to re-sample the Stroke\n" - " on the fly if needed.\n" - "\n" - " :arg t: The resampling value with which we want our Stroke to be\n" - " resampled. If 0 is specified, no resampling is done.\n" - " :type t: float\n" - " :return: A StrokeVertexIterator pointing on the first StrokeVertex.\n" - " :rtype: :class:`StrokeVertexIterator`"); +PyDoc_STRVAR( + /* Wrap. */ + Stroke_stroke_vertices_begin_doc, + ".. method:: stroke_vertices_begin(t=0.0)\n" + "\n" + " Returns a StrokeVertexIterator pointing on the first StrokeVertex of\n" + " the Stroke. One can specify a sampling value to re-sample the Stroke\n" + " on the fly if needed.\n" + "\n" + " :arg t: The resampling value with which we want our Stroke to be\n" + " resampled. If 0 is specified, no resampling is done.\n" + " :type t: float\n" + " :return: A StrokeVertexIterator pointing on the first StrokeVertex.\n" + " :rtype: :class:`StrokeVertexIterator`"); static PyObject *Stroke_stroke_vertices_begin(BPy_Stroke *self, PyObject *args, PyObject *kwds) { @@ -272,14 +288,16 @@ static PyObject *Stroke_stroke_vertices_begin(BPy_Stroke *self, PyObject *args, return BPy_StrokeVertexIterator_from_StrokeVertexIterator(sv_it, false); } -PyDoc_STRVAR(Stroke_stroke_vertices_end_doc, - ".. method:: stroke_vertices_end()\n" - "\n" - " Returns a StrokeVertexIterator pointing after the last StrokeVertex\n" - " of the Stroke.\n" - "\n" - " :return: A StrokeVertexIterator pointing after the last StrokeVertex.\n" - " :rtype: :class:`StrokeVertexIterator`"); +PyDoc_STRVAR( + /* Wrap. */ + Stroke_stroke_vertices_end_doc, + ".. method:: stroke_vertices_end()\n" + "\n" + " Returns a StrokeVertexIterator pointing after the last StrokeVertex\n" + " of the Stroke.\n" + "\n" + " :return: A StrokeVertexIterator pointing after the last StrokeVertex.\n" + " :rtype: :class:`StrokeVertexIterator`"); static PyObject *Stroke_stroke_vertices_end(BPy_Stroke *self) { @@ -287,14 +305,16 @@ static PyObject *Stroke_stroke_vertices_end(BPy_Stroke *self) return BPy_StrokeVertexIterator_from_StrokeVertexIterator(sv_it, true); } -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`"); +PyDoc_STRVAR( + /* Wrap. */ + 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`"); static PyObject *Stroke_reversed(BPy_Stroke *self) { @@ -302,13 +322,15 @@ static PyObject *Stroke_reversed(BPy_Stroke *self) return BPy_StrokeVertexIterator_from_StrokeVertexIterator(sv_it, true); } -PyDoc_STRVAR(Stroke_stroke_vertices_size_doc, - ".. method:: stroke_vertices_size()\n" - "\n" - " Returns the number of StrokeVertex constituting the Stroke.\n" - "\n" - " :return: The number of stroke vertices.\n" - " :rtype: int"); +PyDoc_STRVAR( + /* Wrap. */ + Stroke_stroke_vertices_size_doc, + ".. method:: stroke_vertices_size()\n" + "\n" + " Returns the number of StrokeVertex constituting the Stroke.\n" + "\n" + " :return: The number of stroke vertices.\n" + " :rtype: int"); static PyObject *Stroke_stroke_vertices_size(BPy_Stroke *self) { @@ -352,10 +374,12 @@ static PyMethodDef BPy_Stroke_methods[] = { /*----------------------Stroke get/setters ----------------------------*/ -PyDoc_STRVAR(Stroke_medium_type_doc, - "The MediumType used for this Stroke.\n" - "\n" - ":type: :class:`MediumType`"); +PyDoc_STRVAR( + /* Wrap. */ + Stroke_medium_type_doc, + "The MediumType used for this Stroke.\n" + "\n" + ":type: :class:`MediumType`"); static PyObject *Stroke_medium_type_get(BPy_Stroke *self, void * /*closure*/) { @@ -372,10 +396,12 @@ static int Stroke_medium_type_set(BPy_Stroke *self, PyObject *value, void * /*cl return 0; } -PyDoc_STRVAR(Stroke_texture_id_doc, - "The ID of the texture used to simulate th marks system for this Stroke.\n" - "\n" - ":type: int"); +PyDoc_STRVAR( + /* Wrap. */ + Stroke_texture_id_doc, + "The ID of the texture used to simulate th marks system for this Stroke.\n" + "\n" + ":type: int"); static PyObject *Stroke_texture_id_get(BPy_Stroke *self, void * /*closure*/) { @@ -392,10 +418,12 @@ static int Stroke_texture_id_set(BPy_Stroke *self, PyObject *value, void * /*clo return 0; } -PyDoc_STRVAR(Stroke_tips_doc, - "True if this Stroke uses a texture with tips, and false otherwise.\n" - "\n" - ":type: bool"); +PyDoc_STRVAR( + /* Wrap. */ + Stroke_tips_doc, + "True if this Stroke uses a texture with tips, and false otherwise.\n" + "\n" + ":type: bool"); static PyObject *Stroke_tips_get(BPy_Stroke *self, void * /*closure*/) { @@ -411,10 +439,12 @@ static int Stroke_tips_set(BPy_Stroke *self, PyObject *value, void * /*closure*/ return 0; } -PyDoc_STRVAR(Stroke_length_2d_doc, - "The 2D length of the Stroke.\n" - "\n" - ":type: float"); +PyDoc_STRVAR( + /* Wrap. */ + Stroke_length_2d_doc, + "The 2D length of the Stroke.\n" + "\n" + ":type: float"); static PyObject *Stroke_length_2d_get(BPy_Stroke *self, void * /*closure*/) { @@ -433,10 +463,12 @@ static int Stroke_length_2d_set(BPy_Stroke *self, PyObject *value, void * /*clos return 0; } -PyDoc_STRVAR(Stroke_id_doc, - "The Id of this Stroke.\n" - "\n" - ":type: :class:`Id`"); +PyDoc_STRVAR( + /* Wrap. */ + Stroke_id_doc, + "The Id of this Stroke.\n" + "\n" + ":type: :class:`Id`"); static PyObject *Stroke_id_get(BPy_Stroke *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp index 5bdf4f8a873..8bc2f934f1a 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp @@ -27,6 +27,7 @@ using namespace Freestyle; /*----------------------ViewEdge methods ----------------------------*/ PyDoc_STRVAR( + /* Wrap. */ ViewEdge_doc, "Class hierarchy: :class:`Interface1D` > :class:`ViewEdge`\n" "\n" @@ -61,10 +62,12 @@ static int ViewEdge_init(BPy_ViewEdge *self, PyObject *args, PyObject *kwds) return 0; } -PyDoc_STRVAR(ViewEdge_update_fedges_doc, - ".. method:: update_fedges()\n" - "\n" - " Sets Viewedge to this for all embedded fedges.\n"); +PyDoc_STRVAR( + /* Wrap. */ + ViewEdge_update_fedges_doc, + ".. method:: update_fedges()\n" + "\n" + " Sets Viewedge to this for all embedded fedges.\n"); static PyObject *ViewEdge_update_fedges(BPy_ViewEdge *self) { @@ -82,10 +85,12 @@ static PyMethodDef BPy_ViewEdge_methods[] = { /*----------------------ViewEdge get/setters ----------------------------*/ -PyDoc_STRVAR(ViewEdge_first_viewvertex_doc, - "The first ViewVertex.\n" - "\n" - ":type: :class:`ViewVertex`"); +PyDoc_STRVAR( + /* Wrap. */ + ViewEdge_first_viewvertex_doc, + "The first ViewVertex.\n" + "\n" + ":type: :class:`ViewVertex`"); static PyObject *ViewEdge_first_viewvertex_get(BPy_ViewEdge *self, void * /*closure*/) { @@ -105,10 +110,12 @@ static int ViewEdge_first_viewvertex_set(BPy_ViewEdge *self, PyObject *value, vo return 0; } -PyDoc_STRVAR(ViewEdge_last_viewvertex_doc, - "The second ViewVertex.\n" - "\n" - ":type: :class:`ViewVertex`"); +PyDoc_STRVAR( + /* Wrap. */ + ViewEdge_last_viewvertex_doc, + "The second ViewVertex.\n" + "\n" + ":type: :class:`ViewVertex`"); static PyObject *ViewEdge_last_viewvertex_get(BPy_ViewEdge *self, void * /*closure*/) { @@ -128,10 +135,12 @@ static int ViewEdge_last_viewvertex_set(BPy_ViewEdge *self, PyObject *value, voi return 0; } -PyDoc_STRVAR(ViewEdge_first_fedge_doc, - "The first FEdge that constitutes this ViewEdge.\n" - "\n" - ":type: :class:`FEdge`"); +PyDoc_STRVAR( + /* Wrap. */ + ViewEdge_first_fedge_doc, + "The first FEdge that constitutes this ViewEdge.\n" + "\n" + ":type: :class:`FEdge`"); static PyObject *ViewEdge_first_fedge_get(BPy_ViewEdge *self, void * /*closure*/) { @@ -151,10 +160,12 @@ static int ViewEdge_first_fedge_set(BPy_ViewEdge *self, PyObject *value, void * return 0; } -PyDoc_STRVAR(ViewEdge_last_fedge_doc, - "The last FEdge that constitutes this ViewEdge.\n" - "\n" - ":type: :class:`FEdge`"); +PyDoc_STRVAR( + /* Wrap. */ + ViewEdge_last_fedge_doc, + "The last FEdge that constitutes this ViewEdge.\n" + "\n" + ":type: :class:`FEdge`"); static PyObject *ViewEdge_last_fedge_get(BPy_ViewEdge *self, void * /*closure*/) { @@ -174,10 +185,12 @@ static int ViewEdge_last_fedge_set(BPy_ViewEdge *self, PyObject *value, void * / return 0; } -PyDoc_STRVAR(ViewEdge_viewshape_doc, - "The ViewShape to which this ViewEdge belongs to.\n" - "\n" - ":type: :class:`ViewShape`"); +PyDoc_STRVAR( + /* Wrap. */ + ViewEdge_viewshape_doc, + "The ViewShape to which this ViewEdge belongs to.\n" + "\n" + ":type: :class:`ViewShape`"); static PyObject *ViewEdge_viewshape_get(BPy_ViewEdge *self, void * /*closure*/) { @@ -197,11 +210,13 @@ static int ViewEdge_viewshape_set(BPy_ViewEdge *self, PyObject *value, void * /* return 0; } -PyDoc_STRVAR(ViewEdge_occludee_doc, - "The shape that is occluded by the ViewShape to which this ViewEdge\n" - "belongs to. If no object is occluded, this property is set to None.\n" - "\n" - ":type: :class:`ViewShape`"); +PyDoc_STRVAR( + /* Wrap. */ + ViewEdge_occludee_doc, + "The shape that is occluded by the ViewShape to which this ViewEdge\n" + "belongs to. If no object is occluded, this property is set to None.\n" + "\n" + ":type: :class:`ViewShape`"); static PyObject *ViewEdge_occludee_get(BPy_ViewEdge *self, void * /*closure*/) { @@ -221,20 +236,24 @@ static int ViewEdge_occludee_set(BPy_ViewEdge *self, PyObject *value, void * /*c return 0; } -PyDoc_STRVAR(ViewEdge_is_closed_doc, - "True if this ViewEdge forms a closed loop.\n" - "\n" - ":type: bool"); +PyDoc_STRVAR( + /* Wrap. */ + ViewEdge_is_closed_doc, + "True if this ViewEdge forms a closed loop.\n" + "\n" + ":type: bool"); static PyObject *ViewEdge_is_closed_get(BPy_ViewEdge *self, void * /*closure*/) { return PyBool_from_bool(self->ve->isClosed()); } -PyDoc_STRVAR(ViewEdge_id_doc, - "The Id of this ViewEdge.\n" - "\n" - ":type: :class:`Id`"); +PyDoc_STRVAR( + /* Wrap. */ + ViewEdge_id_doc, + "The Id of this ViewEdge.\n" + "\n" + ":type: :class:`Id`"); static PyObject *ViewEdge_id_get(BPy_ViewEdge *self, void * /*closure*/) { @@ -252,10 +271,12 @@ static int ViewEdge_id_set(BPy_ViewEdge *self, PyObject *value, void * /*closure return 0; } -PyDoc_STRVAR(ViewEdge_nature_doc, - "The nature of this ViewEdge.\n" - "\n" - ":type: :class:`Nature`"); +PyDoc_STRVAR( + /* Wrap. */ + ViewEdge_nature_doc, + "The nature of this ViewEdge.\n" + "\n" + ":type: :class:`Nature`"); static PyObject *ViewEdge_nature_get(BPy_ViewEdge *self, void * /*closure*/) { @@ -272,10 +293,12 @@ static int ViewEdge_nature_set(BPy_ViewEdge *self, PyObject *value, void * /*clo return 0; } -PyDoc_STRVAR(ViewEdge_qi_doc, - "The quantitative invisibility.\n" - "\n" - ":type: int"); +PyDoc_STRVAR( + /* Wrap. */ + ViewEdge_qi_doc, + "The quantitative invisibility.\n" + "\n" + ":type: int"); static PyObject *ViewEdge_qi_get(BPy_ViewEdge *self, void * /*closure*/) { @@ -293,10 +316,12 @@ static int ViewEdge_qi_set(BPy_ViewEdge *self, PyObject *value, void * /*closure return 0; } -PyDoc_STRVAR(ViewEdge_chaining_time_stamp_doc, - "The time stamp of this ViewEdge.\n" - "\n" - ":type: int"); +PyDoc_STRVAR( + /* Wrap. */ + ViewEdge_chaining_time_stamp_doc, + "The time stamp of this ViewEdge.\n" + "\n" + ":type: int"); static PyObject *ViewEdge_chaining_time_stamp_get(BPy_ViewEdge *self, void * /*closure*/) { 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 ca4d5f94521..52a107955c1 100644 --- a/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp @@ -22,24 +22,26 @@ using namespace Freestyle; /*----------------------Chain methods ----------------------------*/ -PyDoc_STRVAR(Chain_doc, - "Class hierarchy: :class:`Interface1D` > :class:`Curve` > :class:`Chain`\n" - "\n" - "Class to represent a 1D elements issued from the chaining process. A\n" - "Chain is the last step before the :class:`Stroke` and is used in the\n" - "Splitting and Creation processes.\n" - "\n" - ".. method:: __init__()\n" - " __init__(brother)\n" - " __init__(id)\n" - "\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" - " :arg id: An Id object.\n" - " :type id: :class:`Id`"); +PyDoc_STRVAR( + /* Wrap. */ + Chain_doc, + "Class hierarchy: :class:`Interface1D` > :class:`Curve` > :class:`Chain`\n" + "\n" + "Class to represent a 1D elements issued from the chaining process. A\n" + "Chain is the last step before the :class:`Stroke` and is used in the\n" + "Splitting and Creation processes.\n" + "\n" + ".. method:: __init__()\n" + " __init__(brother)\n" + " __init__(id)\n" + "\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" + " :arg id: An Id object.\n" + " :type id: :class:`Id`"); static int Chain_init(BPy_Chain *self, PyObject *args, PyObject *kwds) { @@ -70,16 +72,18 @@ static int Chain_init(BPy_Chain *self, PyObject *args, PyObject *kwds) return 0; } -PyDoc_STRVAR(Chain_push_viewedge_back_doc, - ".. method:: push_viewedge_back(viewedge, orientation)\n" - "\n" - " Adds a ViewEdge at the end of the Chain.\n" - "\n" - " :arg viewedge: The ViewEdge that must be added.\n" - " :type viewedge: :class:`ViewEdge`\n" - " :arg orientation: The orientation with which the ViewEdge must be\n" - " processed.\n" - " :type orientation: bool"); +PyDoc_STRVAR( + /* Wrap. */ + Chain_push_viewedge_back_doc, + ".. method:: push_viewedge_back(viewedge, orientation)\n" + "\n" + " Adds a ViewEdge at the end of the Chain.\n" + "\n" + " :arg viewedge: The ViewEdge that must be added.\n" + " :type viewedge: :class:`ViewEdge`\n" + " :arg orientation: The orientation with which the ViewEdge must be\n" + " processed.\n" + " :type orientation: bool"); static PyObject *Chain_push_viewedge_back(BPy_Chain *self, PyObject *args, PyObject *kwds) { @@ -97,16 +101,18 @@ static PyObject *Chain_push_viewedge_back(BPy_Chain *self, PyObject *args, PyObj Py_RETURN_NONE; } -PyDoc_STRVAR(Chain_push_viewedge_front_doc, - ".. method:: push_viewedge_front(viewedge, orientation)\n" - "\n" - " Adds a ViewEdge at the beginning of the Chain.\n" - "\n" - " :arg viewedge: The ViewEdge that must be added.\n" - " :type viewedge: :class:`ViewEdge`\n" - " :arg orientation: The orientation with which the ViewEdge must be\n" - " processed.\n" - " :type orientation: bool"); +PyDoc_STRVAR( + /* Wrap. */ + Chain_push_viewedge_front_doc, + ".. method:: push_viewedge_front(viewedge, orientation)\n" + "\n" + " Adds a ViewEdge at the beginning of the Chain.\n" + "\n" + " :arg viewedge: The ViewEdge that must be added.\n" + " :type viewedge: :class:`ViewEdge`\n" + " :arg orientation: The orientation with which the ViewEdge must be\n" + " processed.\n" + " :type orientation: bool"); static PyObject *Chain_push_viewedge_front(BPy_Chain *self, PyObject *args, PyObject *kwds) { 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 045d1e660ee..2d4e7da2314 100644 --- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp @@ -23,29 +23,31 @@ using namespace Freestyle; /*----------------------FEdgeSharp methods ----------------------------*/ -PyDoc_STRVAR(FEdgeSharp_doc, - "Class hierarchy: :class:`Interface1D` > :class:`FEdge` > :class:`FEdgeSharp`\n" - "\n" - "Class defining a sharp FEdge. A Sharp FEdge corresponds to an initial\n" - "edge of the input mesh. It can be a silhouette, a crease or a border.\n" - "If it is a crease edge, then it is bordered by two faces of the mesh.\n" - "Face a lies on its right whereas Face b lies on its left. If it is a\n" - "border edge, then it doesn't have any face on its right, and thus Face\n" - "a is None.\n" - "\n" - ".. method:: __init__()\n" - " __init__(brother)\n" - " __init__(first_vertex, second_vertex)\n" - "\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" - " :arg first_vertex: The first SVertex object.\n" - " :type first_vertex: :class:`SVertex`\n" - " :arg second_vertex: The second SVertex object.\n" - " :type second_vertex: :class:`SVertex`"); +PyDoc_STRVAR( + /* Wrap. */ + FEdgeSharp_doc, + "Class hierarchy: :class:`Interface1D` > :class:`FEdge` > :class:`FEdgeSharp`\n" + "\n" + "Class defining a sharp FEdge. A Sharp FEdge corresponds to an initial\n" + "edge of the input mesh. It can be a silhouette, a crease or a border.\n" + "If it is a crease edge, then it is bordered by two faces of the mesh.\n" + "Face a lies on its right whereas Face b lies on its left. If it is a\n" + "border edge, then it doesn't have any face on its right, and thus Face\n" + "a is None.\n" + "\n" + ".. method:: __init__()\n" + " __init__(brother)\n" + " __init__(first_vertex, second_vertex)\n" + "\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" + " :arg first_vertex: The first SVertex object.\n" + " :type first_vertex: :class:`SVertex`\n" + " :arg second_vertex: The second SVertex object.\n" + " :type second_vertex: :class:`SVertex`"); static int FEdgeSharp_init(BPy_FEdgeSharp *self, PyObject *args, PyObject *kwds) { @@ -194,11 +196,13 @@ void FEdgeSharp_mathutils_register_callback() /*----------------------FEdgeSharp get/setters ----------------------------*/ -PyDoc_STRVAR(FEdgeSharp_normal_right_doc, - "The normal to the face lying on the right of the FEdge. If this FEdge\n" - "is a border, it has no Face on its right and therefore no normal.\n" - "\n" - ":type: :class:`mathutils.Vector`"); +PyDoc_STRVAR( + /* Wrap. */ + FEdgeSharp_normal_right_doc, + "The normal to the face lying on the right of the FEdge. If this FEdge\n" + "is a border, it has no Face on its right and therefore no normal.\n" + "\n" + ":type: :class:`mathutils.Vector`"); static PyObject *FEdgeSharp_normal_right_get(BPy_FEdgeSharp *self, void * /*closure*/) { @@ -217,10 +221,12 @@ static int FEdgeSharp_normal_right_set(BPy_FEdgeSharp *self, PyObject *value, vo return 0; } -PyDoc_STRVAR(FEdgeSharp_normal_left_doc, - "The normal to the face lying on the left of the FEdge.\n" - "\n" - ":type: :class:`mathutils.Vector`"); +PyDoc_STRVAR( + /* Wrap. */ + FEdgeSharp_normal_left_doc, + "The normal to the face lying on the left of the FEdge.\n" + "\n" + ":type: :class:`mathutils.Vector`"); static PyObject *FEdgeSharp_normal_left_get(BPy_FEdgeSharp *self, void * /*closure*/) { @@ -239,12 +245,14 @@ static int FEdgeSharp_normal_left_set(BPy_FEdgeSharp *self, PyObject *value, voi return 0; } -PyDoc_STRVAR(FEdgeSharp_material_index_right_doc, - "The index of the material of the face lying on the right of the FEdge.\n" - "If this FEdge is a border, it has no Face on its right and therefore\n" - "no material.\n" - "\n" - ":type: int"); +PyDoc_STRVAR( + /* Wrap. */ + FEdgeSharp_material_index_right_doc, + "The index of the material of the face lying on the right of the FEdge.\n" + "If this FEdge is a border, it has no Face on its right and therefore\n" + "no material.\n" + "\n" + ":type: int"); static PyObject *FEdgeSharp_material_index_right_get(BPy_FEdgeSharp *self, void * /*closure*/) { @@ -263,10 +271,12 @@ static int FEdgeSharp_material_index_right_set(BPy_FEdgeSharp *self, return 0; } -PyDoc_STRVAR(FEdgeSharp_material_index_left_doc, - "The index of the material of the face lying on the left of the FEdge.\n" - "\n" - ":type: int"); +PyDoc_STRVAR( + /* Wrap. */ + FEdgeSharp_material_index_left_doc, + "The index of the material of the face lying on the left of the FEdge.\n" + "\n" + ":type: int"); static PyObject *FEdgeSharp_material_index_left_get(BPy_FEdgeSharp *self, void * /*closure*/) { @@ -285,33 +295,39 @@ static int FEdgeSharp_material_index_left_set(BPy_FEdgeSharp *self, return 0; } -PyDoc_STRVAR(FEdgeSharp_material_right_doc, - "The material of the face lying on the right of the FEdge. If this FEdge\n" - "is a border, it has no Face on its right and therefore no material.\n" - "\n" - ":type: :class:`Material`"); +PyDoc_STRVAR( + /* Wrap. */ + FEdgeSharp_material_right_doc, + "The material of the face lying on the right of the FEdge. If this FEdge\n" + "is a border, it has no Face on its right and therefore no material.\n" + "\n" + ":type: :class:`Material`"); static PyObject *FEdgeSharp_material_right_get(BPy_FEdgeSharp *self, void * /*closure*/) { return BPy_FrsMaterial_from_FrsMaterial(self->fes->aFrsMaterial()); } -PyDoc_STRVAR(FEdgeSharp_material_left_doc, - "The material of the face lying on the left of the FEdge.\n" - "\n" - ":type: :class:`Material`"); +PyDoc_STRVAR( + /* Wrap. */ + FEdgeSharp_material_left_doc, + "The material of the face lying on the left of the FEdge.\n" + "\n" + ":type: :class:`Material`"); static PyObject *FEdgeSharp_material_left_get(BPy_FEdgeSharp *self, void * /*closure*/) { return BPy_FrsMaterial_from_FrsMaterial(self->fes->bFrsMaterial()); } -PyDoc_STRVAR(FEdgeSharp_face_mark_right_doc, - "The face mark of the face lying on the right of the FEdge. If this FEdge\n" - "is a border, it has no face on the right and thus this property is set to\n" - "false.\n" - "\n" - ":type: bool"); +PyDoc_STRVAR( + /* Wrap. */ + FEdgeSharp_face_mark_right_doc, + "The face mark of the face lying on the right of the FEdge. If this FEdge\n" + "is a border, it has no face on the right and thus this property is set to\n" + "false.\n" + "\n" + ":type: bool"); static PyObject *FEdgeSharp_face_mark_right_get(BPy_FEdgeSharp *self, void * /*closure*/) { @@ -329,10 +345,12 @@ static int FEdgeSharp_face_mark_right_set(BPy_FEdgeSharp *self, return 0; } -PyDoc_STRVAR(FEdgeSharp_face_mark_left_doc, - "The face mark of the face lying on the left of the FEdge.\n" - "\n" - ":type: bool"); +PyDoc_STRVAR( + /* Wrap. */ + FEdgeSharp_face_mark_left_doc, + "The face mark of the face lying on the left of the FEdge.\n" + "\n" + ":type: bool"); static PyObject *FEdgeSharp_face_mark_left_get(BPy_FEdgeSharp *self, void * /*closure*/) { 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 370a734ef13..6d39fe27ee1 100644 --- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp @@ -23,26 +23,28 @@ using namespace Freestyle; /*----------------------FEdgeSmooth methods ----------------------------*/ -PyDoc_STRVAR(FEdgeSmooth_doc, - "Class hierarchy: :class:`Interface1D` > :class:`FEdge` > :class:`FEdgeSmooth`\n" - "\n" - "Class defining a smooth edge. This kind of edge typically runs across\n" - "a face of the input mesh. It can be a silhouette, a ridge or valley,\n" - "a suggestive contour.\n" - "\n" - ".. method:: __init__()\n" - " __init__(brother)\n" - " __init__(first_vertex, second_vertex)\n" - "\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" - " :arg first_vertex: The first SVertex object.\n" - " :type first_vertex: :class:`SVertex`\n" - " :arg second_vertex: The second SVertex object.\n" - " :type second_vertex: :class:`SVertex`"); +PyDoc_STRVAR( + /* Wrap. */ + FEdgeSmooth_doc, + "Class hierarchy: :class:`Interface1D` > :class:`FEdge` > :class:`FEdgeSmooth`\n" + "\n" + "Class defining a smooth edge. This kind of edge typically runs across\n" + "a face of the input mesh. It can be a silhouette, a ridge or valley,\n" + "a suggestive contour.\n" + "\n" + ".. method:: __init__()\n" + " __init__(brother)\n" + " __init__(first_vertex, second_vertex)\n" + "\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" + " :arg first_vertex: The first SVertex object.\n" + " :type first_vertex: :class:`SVertex`\n" + " :arg second_vertex: The second SVertex object.\n" + " :type second_vertex: :class:`SVertex`"); static int FEdgeSmooth_init(BPy_FEdgeSmooth *self, PyObject *args, PyObject *kwds) { @@ -137,10 +139,12 @@ void FEdgeSmooth_mathutils_register_callback() /*----------------------FEdgeSmooth get/setters ----------------------------*/ -PyDoc_STRVAR(FEdgeSmooth_normal_doc, - "The normal of the face that this FEdge is running across.\n" - "\n" - ":type: :class:`mathutils.Vector`"); +PyDoc_STRVAR( + /* Wrap. */ + FEdgeSmooth_normal_doc, + "The normal of the face that this FEdge is running across.\n" + "\n" + ":type: :class:`mathutils.Vector`"); static PyObject *FEdgeSmooth_normal_get(BPy_FEdgeSmooth *self, void * /*closure*/) { @@ -158,10 +162,12 @@ static int FEdgeSmooth_normal_set(BPy_FEdgeSmooth *self, PyObject *value, void * return 0; } -PyDoc_STRVAR(FEdgeSmooth_material_index_doc, - "The index of the material of the face that this FEdge is running across.\n" - "\n" - ":type: int"); +PyDoc_STRVAR( + /* Wrap. */ + FEdgeSmooth_material_index_doc, + "The index of the material of the face that this FEdge is running across.\n" + "\n" + ":type: int"); static PyObject *FEdgeSmooth_material_index_get(BPy_FEdgeSmooth *self, void * /*closure*/) { @@ -180,20 +186,24 @@ static int FEdgeSmooth_material_index_set(BPy_FEdgeSmooth *self, return 0; } -PyDoc_STRVAR(FEdgeSmooth_material_doc, - "The material of the face that this FEdge is running across.\n" - "\n" - ":type: :class:`Material`"); +PyDoc_STRVAR( + /* Wrap. */ + FEdgeSmooth_material_doc, + "The material of the face that this FEdge is running across.\n" + "\n" + ":type: :class:`Material`"); static PyObject *FEdgeSmooth_material_get(BPy_FEdgeSmooth *self, void * /*closure*/) { return BPy_FrsMaterial_from_FrsMaterial(self->fes->frs_material()); } -PyDoc_STRVAR(FEdgeSmooth_face_mark_doc, - "The face mark of the face that this FEdge is running across.\n" - "\n" - ":type: bool"); +PyDoc_STRVAR( + /* Wrap. */ + FEdgeSmooth_face_mark_doc, + "The face mark of the face that this FEdge is running across.\n" + "\n" + ":type: bool"); static PyObject *FEdgeSmooth_face_mark_get(BPy_FEdgeSmooth *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp index e289a0b28a5..313946d5151 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp @@ -22,6 +22,7 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- PyDoc_STRVAR( + /* Wrap. */ AdjacencyIterator_doc, "Class hierarchy: :class:`Iterator` > :class:`AdjacencyIterator`\n" "\n" @@ -123,10 +124,12 @@ static PyObject *AdjacencyIterator_iternext(BPy_AdjacencyIterator *self) /*----------------------AdjacencyIterator get/setters ----------------------------*/ -PyDoc_STRVAR(AdjacencyIterator_object_doc, - "The ViewEdge object currently pointed to by this iterator.\n" - "\n" - ":type: :class:`ViewEdge`"); +PyDoc_STRVAR( + /* Wrap. */ + AdjacencyIterator_object_doc, + "The ViewEdge object currently pointed to by this iterator.\n" + "\n" + ":type: :class:`ViewEdge`"); static PyObject *AdjacencyIterator_object_get(BPy_AdjacencyIterator *self, void * /*closure*/) { @@ -141,11 +144,15 @@ static PyObject *AdjacencyIterator_object_get(BPy_AdjacencyIterator *self, void Py_RETURN_NONE; } -PyDoc_STRVAR(AdjacencyIterator_is_incoming_doc, - "True if the current ViewEdge is coming towards the iteration vertex, and\n" - "False otherwise.\n" - "\n" - ":type: bool"); +PyDoc_STRVAR( + /* Wrap. */ + A + /* Wrap. */ + djacencyIterator_is_incoming_doc, + "True if the current ViewEdge is coming towards the iteration vertex, and\n" + "False otherwise.\n" + "\n" + ":type: bool"); static PyObject *AdjacencyIterator_is_incoming_get(BPy_AdjacencyIterator *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp index de134d65545..53bb9f2cbe6 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp @@ -24,6 +24,7 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- PyDoc_STRVAR( + /* Wrap. */ ChainPredicateIterator_doc, "Class hierarchy: :class:`freestyle.types.Iterator` >\n" diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp index 1188af685a7..2943b174a97 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp @@ -24,37 +24,39 @@ using namespace Freestyle; // ChainSilhouetteIterator (bool restrict_to_selection=true, ViewEdge *begin=nullptr, bool // orientation=true) ChainSilhouetteIterator (const ChainSilhouetteIterator &brother) -PyDoc_STRVAR(ChainSilhouetteIterator_doc, - "Class hierarchy: :class:`freestyle.types.Iterator` >\n" - ":class:`freestyle.types.ViewEdgeIterator` >\n" - ":class:`freestyle.types.ChainingIterator` >\n" - ":class:`ChainSilhouetteIterator`\n" - "\n" - "A ViewEdge Iterator used to follow ViewEdges the most naturally. For\n" - "example, it will follow visible ViewEdges of same nature. As soon, as\n" - "the nature or the visibility changes, the iteration stops (by setting\n" - "the pointed ViewEdge to 0). In the case of an iteration over a set of\n" - "ViewEdge that are both Silhouette and Crease, there will be a\n" - "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 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" - " :type restrict_to_selection: bool\n" - " :arg begin: The ViewEdge from where to start the iteration.\n" - " :type begin: :class:`freestyle.types.ViewEdge` or None\n" - " :arg orientation: If true, we'll look for the next ViewEdge among\n" - " the ViewEdges that surround the ending ViewVertex of begin. If\n" - " false, we'll search over the ViewEdges surrounding the ending\n" - " ViewVertex of begin.\n" - " :type orientation: bool\n" - " :arg brother: A ChainSilhouetteIterator object.\n" - " :type brother: :class:`ChainSilhouetteIterator`"); +PyDoc_STRVAR( + /* Wrap. */ + ChainSilhouetteIterator_doc, + "Class hierarchy: :class:`freestyle.types.Iterator` >\n" + ":class:`freestyle.types.ViewEdgeIterator` >\n" + ":class:`freestyle.types.ChainingIterator` >\n" + ":class:`ChainSilhouetteIterator`\n" + "\n" + "A ViewEdge Iterator used to follow ViewEdges the most naturally. For\n" + "example, it will follow visible ViewEdges of same nature. As soon, as\n" + "the nature or the visibility changes, the iteration stops (by setting\n" + "the pointed ViewEdge to 0). In the case of an iteration over a set of\n" + "ViewEdge that are both Silhouette and Crease, there will be a\n" + "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 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" + " :type restrict_to_selection: bool\n" + " :arg begin: The ViewEdge from where to start the iteration.\n" + " :type begin: :class:`freestyle.types.ViewEdge` or None\n" + " :arg orientation: If true, we'll look for the next ViewEdge among\n" + " the ViewEdges that surround the ending ViewVertex of begin. If\n" + " false, we'll search over the ViewEdges surrounding the ending\n" + " ViewVertex of begin.\n" + " :type orientation: bool\n" + " :arg brother: A ChainSilhouetteIterator object.\n" + " :type brother: :class:`ChainSilhouetteIterator`"); static int check_begin(PyObject *obj, void *v) { diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp index 8286125a0a2..f99c7f3f74b 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp @@ -24,6 +24,7 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- PyDoc_STRVAR( + /* Wrap. */ ChainingIterator_doc, "Class hierarchy: :class:`Iterator` > :class:`ViewEdgeIterator` > :class:`ChainingIterator`\n" "\n" @@ -112,12 +113,14 @@ static int ChainingIterator___init__(BPy_ChainingIterator *self, PyObject *args, return 0; } -PyDoc_STRVAR(ChainingIterator_init_doc, - ".. method:: init()\n" - "\n" - " Initializes the iterator context. This method is called each\n" - " time a new chain is started. It can be used to reset some\n" - " history information that you might want to keep."); +PyDoc_STRVAR( + /* Wrap. */ + ChainingIterator_init_doc, + ".. method:: init()\n" + "\n" + " Initializes the iterator context. This method is called each\n" + " time a new chain is started. It can be used to reset some\n" + " history information that you might want to keep."); static PyObject *ChainingIterator_init(BPy_ChainingIterator *self) { @@ -129,19 +132,21 @@ static PyObject *ChainingIterator_init(BPy_ChainingIterator *self) Py_RETURN_NONE; } -PyDoc_STRVAR(ChainingIterator_traverse_doc, - ".. method:: traverse(it)\n" - "\n" - " This method iterates over the potential next ViewEdges and returns\n" - " the one that will be followed next. Returns the next ViewEdge to\n" - " follow or None when the end of the chain is reached.\n" - "\n" - " :arg it: The iterator over the ViewEdges adjacent to the end vertex\n" - " of the current ViewEdge. The adjacency iterator reflects the\n" - " restriction rules by only iterating over the valid ViewEdges.\n" - " :type it: :class:`AdjacencyIterator`\n" - " :return: Returns the next ViewEdge to follow, or None if chaining ends.\n" - " :rtype: :class:`ViewEdge` or None"); +PyDoc_STRVAR( + /* Wrap. */ + ChainingIterator_traverse_doc, + ".. method:: traverse(it)\n" + "\n" + " This method iterates over the potential next ViewEdges and returns\n" + " the one that will be followed next. Returns the next ViewEdge to\n" + " follow or None when the end of the chain is reached.\n" + "\n" + " :arg it: The iterator over the ViewEdges adjacent to the end vertex\n" + " of the current ViewEdge. The adjacency iterator reflects the\n" + " restriction rules by only iterating over the valid ViewEdges.\n" + " :type it: :class:`AdjacencyIterator`\n" + " :return: Returns the next ViewEdge to follow, or None if chaining ends.\n" + " :rtype: :class:`ViewEdge` or None"); static PyObject *ChainingIterator_traverse(BPy_ChainingIterator *self, PyObject *args, @@ -176,10 +181,12 @@ static PyMethodDef BPy_ChainingIterator_methods[] = { /*----------------------ChainingIterator get/setters ----------------------------*/ -PyDoc_STRVAR(ChainingIterator_object_doc, - "The ViewEdge object currently pointed by this iterator.\n" - "\n" - ":type: :class:`ViewEdge`"); +PyDoc_STRVAR( + /* Wrap. */ + ChainingIterator_object_doc, + "The ViewEdge object currently pointed by this iterator.\n" + "\n" + ":type: :class:`ViewEdge`"); static PyObject *ChainingIterator_object_get(BPy_ChainingIterator *self, void * /*closure*/) { @@ -195,10 +202,12 @@ static PyObject *ChainingIterator_object_get(BPy_ChainingIterator *self, void * Py_RETURN_NONE; } -PyDoc_STRVAR(ChainingIterator_next_vertex_doc, - "The ViewVertex that is the next crossing.\n" - "\n" - ":type: :class:`ViewVertex`"); +PyDoc_STRVAR( + /* Wrap. */ + ChainingIterator_next_vertex_doc, + "The ViewVertex that is the next crossing.\n" + "\n" + ":type: :class:`ViewVertex`"); static PyObject *ChainingIterator_next_vertex_get(BPy_ChainingIterator *self, void * /*closure*/) { @@ -210,10 +219,12 @@ static PyObject *ChainingIterator_next_vertex_get(BPy_ChainingIterator *self, vo Py_RETURN_NONE; } -PyDoc_STRVAR(ChainingIterator_is_incrementing_doc, - "True if the current iteration is an incrementation.\n" - "\n" - ":type: bool"); +PyDoc_STRVAR( + /* Wrap. */ + ChainingIterator_is_incrementing_doc, + "True if the current iteration is an incrementation.\n" + "\n" + ":type: bool"); static PyObject *ChainingIterator_is_incrementing_get(BPy_ChainingIterator *self, void * /*closure*/) diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp index c787fe7e5a1..5929a2f710f 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp @@ -21,26 +21,28 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -PyDoc_STRVAR(CurvePointIterator_doc, - "Class hierarchy: :class:`Iterator` > :class:`CurvePointIterator`\n" - "\n" - "Class representing an iterator on a curve. Allows an iterating\n" - "outside initial vertices. A CurvePoint is instantiated and returned\n" - "through the .object attribute.\n" - "\n" - ".. method:: __init__()\n" - " __init__(brother)\n" - " __init__(step=0.0)\n" - "\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" - " :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" - " :type step: float"); +PyDoc_STRVAR( + /* Wrap. */ + CurvePointIterator_doc, + "Class hierarchy: :class:`Iterator` > :class:`CurvePointIterator`\n" + "\n" + "Class representing an iterator on a curve. Allows an iterating\n" + "outside initial vertices. A CurvePoint is instantiated and returned\n" + "through the .object attribute.\n" + "\n" + ".. method:: __init__()\n" + " __init__(brother)\n" + " __init__(step=0.0)\n" + "\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" + " :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" + " :type step: float"); static int CurvePointIterator_init(BPy_CurvePointIterator *self, PyObject *args, PyObject *kwds) { @@ -75,10 +77,12 @@ static int CurvePointIterator_init(BPy_CurvePointIterator *self, PyObject *args, /*----------------------CurvePointIterator get/setters ----------------------------*/ -PyDoc_STRVAR(CurvePointIterator_object_doc, - "The CurvePoint object currently pointed by this iterator.\n" - "\n" - ":type: :class:`CurvePoint`"); +PyDoc_STRVAR( + /* Wrap. */ + CurvePointIterator_object_doc, + "The CurvePoint object currently pointed by this iterator.\n" + "\n" + ":type: :class:`CurvePoint`"); static PyObject *CurvePointIterator_object_get(BPy_CurvePointIterator *self, void * /*closure*/) { @@ -89,20 +93,24 @@ static PyObject *CurvePointIterator_object_get(BPy_CurvePointIterator *self, voi return BPy_CurvePoint_from_CurvePoint(self->cp_it->operator*()); } -PyDoc_STRVAR(CurvePointIterator_t_doc, - "The curvilinear abscissa of the current point.\n" - "\n" - ":type: float"); +PyDoc_STRVAR( + /* Wrap. */ + CurvePointIterator_t_doc, + "The curvilinear abscissa of the current point.\n" + "\n" + ":type: float"); static PyObject *CurvePointIterator_t_get(BPy_CurvePointIterator *self, void * /*closure*/) { return PyFloat_FromDouble(self->cp_it->t()); } -PyDoc_STRVAR(CurvePointIterator_u_doc, - "The point parameter at the current point in the stroke (0 <= u <= 1).\n" - "\n" - ":type: float"); +PyDoc_STRVAR( + /* Wrap. */ + CurvePointIterator_u_doc, + "The point parameter at the current point in the stroke (0 <= u <= 1).\n" + "\n" + ":type: float"); static PyObject *CurvePointIterator_u_get(BPy_CurvePointIterator *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp index d63e3c197ed..d8c2b2adf47 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp @@ -21,23 +21,25 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -PyDoc_STRVAR(Interface0DIterator_doc, - "Class hierarchy: :class:`Iterator` > :class:`Interface0DIterator`\n" - "\n" - "Class defining an iterator over Interface0D elements. An instance of\n" - "this iterator is always obtained from a 1D element.\n" - "\n" - ".. method:: __init__(brother)\n" - " __init__(it)\n" - "\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" - " :arg it: An iterator object to be nested.\n" - " :type it: :class:`SVertexIterator`, :class:`CurvePointIterator`, or\n" - " :class:`StrokeVertexIterator`"); +PyDoc_STRVAR( + /* Wrap. */ + Interface0DIterator_doc, + "Class hierarchy: :class:`Iterator` > :class:`Interface0DIterator`\n" + "\n" + "Class defining an iterator over Interface0D elements. An instance of\n" + "this iterator is always obtained from a 1D element.\n" + "\n" + ".. method:: __init__(brother)\n" + " __init__(it)\n" + "\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" + " :arg it: An iterator object to be nested.\n" + " :type it: :class:`SVertexIterator`, :class:`CurvePointIterator`, or\n" + " :class:`StrokeVertexIterator`"); static int convert_nested_it(PyObject *obj, void *v) { @@ -130,13 +132,15 @@ static PyObject *Interface0DIterator_iternext(BPy_Interface0DIterator *self) /*----------------------Interface0DIterator get/setters ----------------------------*/ -PyDoc_STRVAR(Interface0DIterator_object_doc, - "The 0D object currently pointed to by this iterator. Note that the object\n" - "may be an instance of an Interface0D subclass. For example if the iterator\n" - "has been created from the `vertices_begin()` method of the :class:`Stroke`\n" - "class, the .object property refers to a :class:`StrokeVertex` object.\n" - "\n" - ":type: :class:`Interface0D` or one of its subclasses."); +PyDoc_STRVAR( + /* Wrap. */ + Interface0DIterator_object_doc, + "The 0D object currently pointed to by this iterator. Note that the object\n" + "may be an instance of an Interface0D subclass. For example if the iterator\n" + "has been created from the `vertices_begin()` method of the :class:`Stroke`\n" + "class, the .object property refers to a :class:`StrokeVertex` object.\n" + "\n" + ":type: :class:`Interface0D` or one of its subclasses."); static PyObject *Interface0DIterator_object_get(BPy_Interface0DIterator *self, void * /*closure*/) { @@ -147,31 +151,37 @@ static PyObject *Interface0DIterator_object_get(BPy_Interface0DIterator *self, v return Any_BPy_Interface0D_from_Interface0D(self->if0D_it->operator*()); } -PyDoc_STRVAR(Interface0DIterator_t_doc, - "The curvilinear abscissa of the current point.\n" - "\n" - ":type: float"); +PyDoc_STRVAR( + /* Wrap. */ + Interface0DIterator_t_doc, + "The curvilinear abscissa of the current point.\n" + "\n" + ":type: float"); static PyObject *Interface0DIterator_t_get(BPy_Interface0DIterator *self, void * /*closure*/) { return PyFloat_FromDouble(self->if0D_it->t()); } -PyDoc_STRVAR(Interface0DIterator_u_doc, - "The point parameter at the current point in the 1D element (0 <= u <= 1).\n" - "\n" - ":type: float"); +PyDoc_STRVAR( + /* Wrap. */ + Interface0DIterator_u_doc, + "The point parameter at the current point in the 1D element (0 <= u <= 1).\n" + "\n" + ":type: float"); static PyObject *Interface0DIterator_u_get(BPy_Interface0DIterator *self, void * /*closure*/) { return PyFloat_FromDouble(self->if0D_it->u()); } -PyDoc_STRVAR(Interface0DIterator_at_last_doc, - "True if the iterator points to the last valid element.\n" - "For its counterpart (pointing to the first valid element), use it.is_begin.\n" - "\n" - ":type: bool"); +PyDoc_STRVAR( + /* Wrap. */ + Interface0DIterator_at_last_doc, + "True if the iterator points to the last valid element.\n" + "For its counterpart (pointing to the first valid element), use it.is_begin.\n" + "\n" + ":type: bool"); static PyObject *Interface0DIterator_at_last_get(BPy_Interface0DIterator *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp index 46e6cd319c3..0b6ad7b5012 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp @@ -23,6 +23,7 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- PyDoc_STRVAR( + /* Wrap. */ SVertexIterator_doc, "Class hierarchy: :class:`Iterator` > :class:`SVertexIterator`\n" "\n" @@ -98,10 +99,12 @@ static int SVertexIterator_init(BPy_SVertexIterator *self, PyObject *args, PyObj /*----------------------SVertexIterator get/setters ----------------------------*/ -PyDoc_STRVAR(SVertexIterator_object_doc, - "The SVertex object currently pointed by this iterator.\n" - "\n" - ":type: :class:`SVertex`"); +PyDoc_STRVAR( + /* Wrap. */ + SVertexIterator_object_doc, + "The SVertex object currently pointed by this iterator.\n" + "\n" + ":type: :class:`SVertex`"); static PyObject *SVertexIterator_object_get(BPy_SVertexIterator *self, void * /*closure*/) { @@ -116,20 +119,24 @@ static PyObject *SVertexIterator_object_get(BPy_SVertexIterator *self, void * /* Py_RETURN_NONE; } -PyDoc_STRVAR(SVertexIterator_t_doc, - "The curvilinear abscissa of the current point.\n" - "\n" - ":type: float"); +PyDoc_STRVAR( + /* Wrap. */ + SVertexIterator_t_doc, + "The curvilinear abscissa of the current point.\n" + "\n" + ":type: float"); static PyObject *SVertexIterator_t_get(BPy_SVertexIterator *self, void * /*closure*/) { return PyFloat_FromDouble(self->sv_it->t()); } -PyDoc_STRVAR(SVertexIterator_u_doc, - "The point parameter at the current point in the 1D element (0 <= u <= 1).\n" - "\n" - ":type: float"); +PyDoc_STRVAR( + /* Wrap. */ + SVertexIterator_u_doc, + "The point parameter at the current point in the 1D element (0 <= u <= 1).\n" + "\n" + ":type: float"); static PyObject *SVertexIterator_u_get(BPy_SVertexIterator *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp index fc76884f601..5e1c0106b6c 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp @@ -22,29 +22,31 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -PyDoc_STRVAR(StrokeVertexIterator_doc, - "Class hierarchy: :class:`Iterator` > :class:`StrokeVertexIterator`\n" - "\n" - "Class defining an iterator designed to iterate over the\n" - ":class:`StrokeVertex` of a :class:`Stroke`. An instance of a\n" - "StrokeVertexIterator can be obtained from a Stroke by calling\n" - "iter(), stroke_vertices_begin() or stroke_vertices_begin(). It is iterating\n" - "over the same vertices as an :class:`Interface0DIterator`. The difference\n" - "resides in the object access: an Interface0DIterator only allows\n" - "access to an Interface0D while one might need to access the\n" - "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).\n" - "\n" - ".. method:: __init__()\n" - " __init__(brother)\n" - "\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`"); +PyDoc_STRVAR( + /* Wrap. */ + StrokeVertexIterator_doc, + "Class hierarchy: :class:`Iterator` > :class:`StrokeVertexIterator`\n" + "\n" + "Class defining an iterator designed to iterate over the\n" + ":class:`StrokeVertex` of a :class:`Stroke`. An instance of a\n" + "StrokeVertexIterator can be obtained from a Stroke by calling\n" + "iter(), stroke_vertices_begin() or stroke_vertices_begin(). It is iterating\n" + "over the same vertices as an :class:`Interface0DIterator`. The difference\n" + "resides in the object access: an Interface0DIterator only allows\n" + "access to an Interface0D while one might need to access the\n" + "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).\n" + "\n" + ".. method:: __init__()\n" + " __init__(brother)\n" + "\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`"); static int StrokeVertexIterator_init(BPy_StrokeVertexIterator *self, PyObject *args, @@ -134,13 +136,15 @@ 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`"); +PyDoc_STRVAR( + /* Wrap. */ + 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) { @@ -153,13 +157,15 @@ 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`"); +PyDoc_STRVAR( + /* Wrap. */ + 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) { @@ -172,14 +178,16 @@ 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`"); +PyDoc_STRVAR( + /* Wrap. */ + 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) { @@ -204,10 +212,12 @@ static PyMethodDef BPy_StrokeVertexIterator_methods[] = { /*----------------------StrokeVertexIterator get/setters ----------------------------*/ -PyDoc_STRVAR(StrokeVertexIterator_object_doc, - "The StrokeVertex object currently pointed to by this iterator.\n" - "\n" - ":type: :class:`StrokeVertex`"); +PyDoc_STRVAR( + /* Wrap. */ + StrokeVertexIterator_object_doc, + "The StrokeVertex object currently pointed to by this iterator.\n" + "\n" + ":type: :class:`StrokeVertex`"); static PyObject *StrokeVertexIterator_object_get(BPy_StrokeVertexIterator *self, void * /*closure*/) @@ -223,31 +233,37 @@ static PyObject *StrokeVertexIterator_object_get(BPy_StrokeVertexIterator *self, Py_RETURN_NONE; } -PyDoc_STRVAR(StrokeVertexIterator_t_doc, - "The curvilinear abscissa of the current point.\n" - "\n" - ":type: float"); +PyDoc_STRVAR( + /* Wrap. */ + StrokeVertexIterator_t_doc, + "The curvilinear abscissa of the current point.\n" + "\n" + ":type: float"); static PyObject *StrokeVertexIterator_t_get(BPy_StrokeVertexIterator *self, void * /*closure*/) { return PyFloat_FromDouble(self->sv_it->t()); } -PyDoc_STRVAR(StrokeVertexIterator_u_doc, - "The point parameter at the current point in the stroke (0 <= u <= 1).\n" - "\n" - ":type: float"); +PyDoc_STRVAR( + /* Wrap. */ + StrokeVertexIterator_u_doc, + "The point parameter at the current point in the stroke (0 <= u <= 1).\n" + "\n" + ":type: float"); static PyObject *StrokeVertexIterator_u_get(BPy_StrokeVertexIterator *self, void * /*closure*/) { return PyFloat_FromDouble(self->sv_it->u()); } -PyDoc_STRVAR(StrokeVertexIterator_at_last_doc, - "True if the iterator points to the last valid element.\n" - "For its counterpart (pointing to the first valid element), use it.is_begin.\n" - "\n" - ":type: bool"); +PyDoc_STRVAR( + /* Wrap. */ + StrokeVertexIterator_at_last_doc, + "True if the iterator points to the last valid element.\n" + "For its counterpart (pointing to the first valid element), use it.is_begin.\n" + "\n" + ":type: bool"); static PyObject *StrokeVertexIterator_at_last_get(BPy_StrokeVertexIterator *self) { diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp index aabe2799a7b..64a3f9f560e 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp @@ -21,29 +21,31 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -PyDoc_STRVAR(ViewEdgeIterator_doc, - "Class hierarchy: :class:`Iterator` > :class:`ViewEdgeIterator`\n" - "\n" - "Base class for iterators over ViewEdges of the :class:`ViewMap` Graph.\n" - "Basically the increment() operator of this class should be able to\n" - "take the decision of \"where\" (on which ViewEdge) to go when pointing\n" - "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 or the copy constructor.\n" - "\n" - " :arg begin: The ViewEdge from where to start the iteration.\n" - " :type begin: :class:`ViewEdge` or None\n" - " :arg orientation: If true, we'll look for the next ViewEdge among\n" - " the ViewEdges that surround the ending ViewVertex of begin. If\n" - " false, we'll search over the ViewEdges surrounding the ending\n" - " ViewVertex of begin.\n" - " :type orientation: bool\n" - " :arg brother: A ViewEdgeIterator object.\n" - " :type brother: :class:`ViewEdgeIterator`"); +PyDoc_STRVAR( + /* Wrap. */ + ViewEdgeIterator_doc, + "Class hierarchy: :class:`Iterator` > :class:`ViewEdgeIterator`\n" + "\n" + "Base class for iterators over ViewEdges of the :class:`ViewMap` Graph.\n" + "Basically the increment() operator of this class should be able to\n" + "take the decision of \"where\" (on which ViewEdge) to go when pointing\n" + "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 or the copy constructor.\n" + "\n" + " :arg begin: The ViewEdge from where to start the iteration.\n" + " :type begin: :class:`ViewEdge` or None\n" + " :arg orientation: If true, we'll look for the next ViewEdge among\n" + " the ViewEdges that surround the ending ViewVertex of begin. If\n" + " false, we'll search over the ViewEdges surrounding the ending\n" + " ViewVertex of begin.\n" + " :type orientation: bool\n" + " :arg brother: A ViewEdgeIterator object.\n" + " :type brother: :class:`ViewEdgeIterator`"); static int check_begin(PyObject *obj, void *v) { @@ -82,10 +84,12 @@ static int ViewEdgeIterator_init(BPy_ViewEdgeIterator *self, PyObject *args, PyO return 0; } -PyDoc_STRVAR(ViewEdgeIterator_change_orientation_doc, - ".. method:: change_orientation()\n" - "\n" - " Changes the current orientation."); +PyDoc_STRVAR( + /* Wrap. */ + ViewEdgeIterator_change_orientation_doc, + ".. method:: change_orientation()\n" + "\n" + " Changes the current orientation."); static PyObject *ViewEdgeIterator_change_orientation(BPy_ViewEdgeIterator *self) { @@ -103,10 +107,12 @@ static PyMethodDef BPy_ViewEdgeIterator_methods[] = { /*----------------------ViewEdgeIterator get/setters ----------------------------*/ -PyDoc_STRVAR(ViewEdgeIterator_object_doc, - "The ViewEdge object currently pointed by this iterator.\n" - "\n" - ":type: :class:`ViewEdge`"); +PyDoc_STRVAR( + /* Wrap. */ + ViewEdgeIterator_object_doc, + "The ViewEdge object currently pointed by this iterator.\n" + "\n" + ":type: :class:`ViewEdge`"); static PyObject *ViewEdgeIterator_object_get(BPy_ViewEdgeIterator *self, void * /*closure*/) { @@ -121,10 +127,12 @@ static PyObject *ViewEdgeIterator_object_get(BPy_ViewEdgeIterator *self, void * Py_RETURN_NONE; } -PyDoc_STRVAR(ViewEdgeIterator_current_edge_doc, - "The ViewEdge object currently pointed by this iterator.\n" - "\n" - ":type: :class:`ViewEdge`"); +PyDoc_STRVAR( + /* Wrap. */ + ViewEdgeIterator_current_edge_doc, + "The ViewEdge object currently pointed by this iterator.\n" + "\n" + ":type: :class:`ViewEdge`"); static PyObject *ViewEdgeIterator_current_edge_get(BPy_ViewEdgeIterator *self, void * /*closure*/) { @@ -147,14 +155,16 @@ static int ViewEdgeIterator_current_edge_set(BPy_ViewEdgeIterator *self, return 0; } -PyDoc_STRVAR(ViewEdgeIterator_orientation_doc, - "The orientation of the pointed ViewEdge in the iteration.\n" - "If true, the iterator looks for the next ViewEdge among those ViewEdges\n" - "that surround the ending ViewVertex of the \"begin\" ViewEdge. If false,\n" - "the iterator searches over the ViewEdges surrounding the ending ViewVertex\n" - "of the \"begin\" ViewEdge.\n" - "\n" - ":type: bool"); +PyDoc_STRVAR( + /* Wrap. */ + ViewEdgeIterator_orientation_doc, + "The orientation of the pointed ViewEdge in the iteration.\n" + "If true, the iterator looks for the next ViewEdge among those ViewEdges\n" + "that surround the ending ViewVertex of the \"begin\" ViewEdge. If false,\n" + "the iterator searches over the ViewEdges surrounding the ending ViewVertex\n" + "of the \"begin\" ViewEdge.\n" + "\n" + ":type: bool"); static PyObject *ViewEdgeIterator_orientation_get(BPy_ViewEdgeIterator *self, void * /*closure*/) { @@ -173,10 +183,12 @@ static int ViewEdgeIterator_orientation_set(BPy_ViewEdgeIterator *self, return 0; } -PyDoc_STRVAR(ViewEdgeIterator_begin_doc, - "The first ViewEdge used for the iteration.\n" - "\n" - ":type: :class:`ViewEdge`"); +PyDoc_STRVAR( + /* Wrap. */ + ViewEdgeIterator_begin_doc, + "The first ViewEdge used for the iteration.\n" + "\n" + ":type: :class:`ViewEdge`"); static PyObject *ViewEdgeIterator_begin_get(BPy_ViewEdgeIterator *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp index 22fb7911bab..e3339eba40e 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp @@ -20,22 +20,24 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -PyDoc_STRVAR(orientedViewEdgeIterator_doc, - "Class hierarchy: :class:`Iterator` > :class:`orientedViewEdgeIterator`\n" - "\n" - "Class representing an iterator over oriented ViewEdges around a\n" - ":class:`ViewVertex`. This iterator allows a CCW iteration (in the image\n" - "plane). An instance of an orientedViewEdgeIterator can only be\n" - "obtained from a ViewVertex by calling edges_begin() or edges_end().\n" - "\n" - ".. method:: __init__()\n" - " __init__(iBrother)\n" - "\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`"); +PyDoc_STRVAR( + /* Wrap. */ + orientedViewEdgeIterator_doc, + "Class hierarchy: :class:`Iterator` > :class:`orientedViewEdgeIterator`\n" + "\n" + "Class representing an iterator over oriented ViewEdges around a\n" + ":class:`ViewVertex`. This iterator allows a CCW iteration (in the image\n" + "plane). An instance of an orientedViewEdgeIterator can only be\n" + "obtained from a ViewVertex by calling edges_begin() or edges_end().\n" + "\n" + ".. method:: __init__()\n" + " __init__(iBrother)\n" + "\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`"); static int orientedViewEdgeIterator_init(BPy_orientedViewEdgeIterator *self, PyObject *args, @@ -102,12 +104,14 @@ static PyObject *orientedViewEdgeIterator_iternext(BPy_orientedViewEdgeIterator /*----------------------orientedViewEdgeIterator get/setters ----------------------------*/ -PyDoc_STRVAR(orientedViewEdgeIterator_object_doc, - "The oriented ViewEdge (i.e., a tuple of the pointed ViewEdge and a boolean\n" - "value) currently pointed to by this iterator. If the boolean value is true,\n" - "the ViewEdge is incoming.\n" - "\n" - ":type: (:class:`ViewEdge`, bool)"); +PyDoc_STRVAR( + /* Wrap. */ + orientedViewEdgeIterator_object_doc, + "The oriented ViewEdge (i.e., a tuple of the pointed ViewEdge and a boolean\n" + "value) currently pointed to by this iterator. If the boolean value is true,\n" + "the ViewEdge is incoming.\n" + "\n" + ":type: (:class:`ViewEdge`, bool)"); static PyObject *orientedViewEdgeIterator_object_get(BPy_orientedViewEdgeIterator *self, void * /*closure*/) diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp index f31edaea796..4f8cd0c7566 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char BackboneStretcherShader___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + BackboneStretcherShader___doc__, "Class hierarchy: :class:`freestyle.types.StrokeShader` > :class:`BackboneStretcherShader`\n" "\n" "[Geometry shader]\n" @@ -38,7 +40,7 @@ static char BackboneStretcherShader___doc__[] = " respective directions: v(1)v(0) and v(n-1)v(n).\n" "\n" " :arg stroke: A Stroke object.\n" - " :type stroke: :class:`freestyle.types.Stroke`\n"; + " :type stroke: :class:`freestyle.types.Stroke`\n"); static int BackboneStretcherShader___init__(BPy_BackboneStretcherShader *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp index 83926b126ef..f15fe10bfff 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char BezierCurveShader___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + BezierCurveShader___doc__, "Class hierarchy: :class:`freestyle.types.StrokeShader` > :class:`BezierCurveShader`\n" "\n" "[Geometry shader]\n" @@ -40,7 +42,7 @@ static char BezierCurveShader___doc__[] = " Bezier Curve approximation of the original backbone geometry.\n" "\n" " :arg stroke: A Stroke object.\n" - " :type stroke: :class:`freestyle.types.Stroke`\n"; + " :type stroke: :class:`freestyle.types.Stroke`\n"); static int BezierCurveShader___init__(BPy_BezierCurveShader *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp index 8827e56e1e3..79e9bbfb10b 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp @@ -22,7 +22,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char BlenderTextureShader___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + BlenderTextureShader___doc__, "Class hierarchy: :class:`freestyle.types.StrokeShader` > :class:`BlenderTextureShader`\n" "\n" "[Texture shader]\n" @@ -42,7 +44,7 @@ static char BlenderTextureShader___doc__[] = " simulate marks.\n" "\n" " :arg stroke: A Stroke object.\n" - " :type stroke: :class:`freestyle.types.Stroke`\n"; + " :type stroke: :class:`freestyle.types.Stroke`\n"); static int BlenderTextureShader___init__(BPy_BlenderTextureShader *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp index 89e97540e6d..c678e1d7ac0 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp @@ -21,7 +21,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char CalligraphicShader___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + CalligraphicShader___doc__, "Class hierarchy: :class:`freestyle.types.StrokeShader` > :class:`CalligraphicShader`\n" "\n" "[Thickness Shader]\n" @@ -51,7 +53,7 @@ static char CalligraphicShader___doc__[] = " perpendicular to this one, and an interpolation in between.\n" "\n" " :arg stroke: A Stroke object.\n" - " :type stroke: :class:`freestyle.types.Stroke`\n"; + " :type stroke: :class:`freestyle.types.Stroke`\n"); static int CalligraphicShader___init__(BPy_CalligraphicShader *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp index 3f6ef4799b8..4413ce38db3 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char ColorNoiseShader___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + ColorNoiseShader___doc__, "Class hierarchy: :class:`freestyle.types.StrokeShader` > :class:`ColorNoiseShader`\n" "\n" "[Color shader]\n" @@ -39,7 +41,7 @@ static char ColorNoiseShader___doc__[] = " Shader to add noise to the stroke colors.\n" "\n" " :arg stroke: A Stroke object.\n" - " :type stroke: :class:`freestyle.types.Stroke`\n"; + " :type stroke: :class:`freestyle.types.Stroke`\n"); static int ColorNoiseShader___init__(BPy_ColorNoiseShader *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp index 41eb684283e..55ace15da3e 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char ConstantColorShader___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + ConstantColorShader___doc__, "Class hierarchy: :class:`freestyle.types.StrokeShader` > :class:`ConstantColorShader`\n" "\n" "[Color shader]\n" @@ -43,7 +45,7 @@ static char ConstantColorShader___doc__[] = " Assigns a constant color to every vertex of the Stroke.\n" "\n" " :arg stroke: A Stroke object.\n" - " :type stroke: :class:`freestyle.types.Stroke`\n"; + " :type stroke: :class:`freestyle.types.Stroke`\n"); static int ConstantColorShader___init__(BPy_ConstantColorShader *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp index 19b25fb348b..342ec8982bf 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char ConstantThicknessShader___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + ConstantThicknessShader___doc__, "Class hierarchy: :class:`freestyle.types.StrokeShader` > :class:`ConstantThicknessShader`\n" "\n" "[Thickness shader]\n" @@ -37,7 +39,7 @@ static char ConstantThicknessShader___doc__[] = " Assigns an absolute constant thickness to every vertex of the Stroke.\n" "\n" " :arg stroke: A Stroke object.\n" - " :type stroke: :class:`freestyle.types.Stroke`\n"; + " :type stroke: :class:`freestyle.types.Stroke`\n"); static int ConstantThicknessShader___init__(BPy_ConstantThicknessShader *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp index fcbd64f0b79..46acaa168b2 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char ConstrainedIncreasingThicknessShader___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + ConstrainedIncreasingThicknessShader___doc__, "Class hierarchy: :class:`freestyle.types.StrokeShader` > " ":class:`ConstrainedIncreasingThicknessShader`\n" "\n" @@ -44,7 +46,7 @@ static char ConstrainedIncreasingThicknessShader___doc__[] = " fat short lines.\n" "\n" " :arg stroke: A Stroke object.\n" - " :type stroke: :class:`freestyle.types.Stroke`\n"; + " :type stroke: :class:`freestyle.types.Stroke`\n"); static int ConstrainedIncreasingThicknessShader___init__( BPy_ConstrainedIncreasingThicknessShader *self, PyObject *args, PyObject *kwds) diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp index e152068ec1d..30d10c75fa9 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char GuidingLinesShader___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + GuidingLinesShader___doc__, "Class hierarchy: :class:`freestyle.types.StrokeShader` > :class:`GuidingLinesShader`\n" "\n" "[Geometry shader]\n" @@ -45,7 +47,7 @@ static char GuidingLinesShader___doc__[] = " approximation is.\n" "\n" " :arg stroke: A Stroke object.\n" - " :type stroke: :class:`freestyle.types.Stroke`\n"; + " :type stroke: :class:`freestyle.types.Stroke`\n"); static int GuidingLinesShader___init__(BPy_GuidingLinesShader *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp index d46b76990ca..67da93af663 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char IncreasingColorShader___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + IncreasingColorShader___doc__, "Class hierarchy: :class:`freestyle.types.StrokeShader` > :class:`IncreasingColorShader`\n" "\n" "[Color shader]\n" @@ -54,7 +56,7 @@ static char IncreasingColorShader___doc__[] = " between the first and the last vertex.\n" "\n" " :arg stroke: A Stroke object.\n" - " :type stroke: :class:`freestyle.types.Stroke`\n"; + " :type stroke: :class:`freestyle.types.Stroke`\n"); static int IncreasingColorShader___init__(BPy_IncreasingColorShader *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp index 9306def317c..bcf53d6945e 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char IncreasingThicknessShader___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + IncreasingThicknessShader___doc__, "Class hierarchy: :class:`freestyle.types.StrokeShader` > :class:`IncreasingThicknessShader`\n" "\n" "[Thickness shader]\n" @@ -43,7 +45,7 @@ static char IncreasingThicknessShader___doc__[] = " linearly interpolated from A to B.\n" "\n" " :arg stroke: A Stroke object.\n" - " :type stroke: :class:`freestyle.types.Stroke`\n"; + " :type stroke: :class:`freestyle.types.Stroke`\n"); static int IncreasingThicknessShader___init__(BPy_IncreasingThicknessShader *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp index cd0006b41cd..3623782c229 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char PolygonalizationShader___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + PolygonalizationShader___doc__, "Class hierarchy: :class:`freestyle.types.StrokeShader` > :class:`PolygonalizationShader`\n" "\n" "[Geometry shader]\n" @@ -44,7 +46,7 @@ static char PolygonalizationShader___doc__[] = " error is reached.\n" "\n" " :arg stroke: A Stroke object.\n" - " :type stroke: :class:`freestyle.types.Stroke`\n"; + " :type stroke: :class:`freestyle.types.Stroke`\n"); static int PolygonalizationShader___init__(BPy_PolygonalizationShader *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp index 579e233de4e..83c270e8dd0 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char SamplingShader___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + SamplingShader___doc__, "Class hierarchy: :class:`freestyle.types.StrokeShader` > :class:`SamplingShader`\n" "\n" "[Geometry shader]\n" @@ -37,7 +39,7 @@ static char SamplingShader___doc__[] = " Resamples the stroke.\n" "\n" " :arg stroke: A Stroke object.\n" - " :type stroke: :class:`freestyle.types.Stroke`\n"; + " :type stroke: :class:`freestyle.types.Stroke`\n"); static int SamplingShader___init__(BPy_SamplingShader *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp index 2307e1cbfc9..969804ba49b 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char SmoothingShader___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + SmoothingShader___doc__, "Class hierarchy: :class:`freestyle.types.StrokeShader` > :class:`SmoothingShader`\n" "\n" "[Geometry shader]\n" @@ -57,7 +59,7 @@ static char SmoothingShader___doc__[] = " prevent the diffusion across corners.\n" "\n" " :arg stroke: A Stroke object.\n" - " :type stroke: :class:`freestyle.types.Stroke`\n"; + " :type stroke: :class:`freestyle.types.Stroke`\n"); static int SmoothingShader___init__(BPy_SmoothingShader *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp index b1b838ed491..1dee5392c19 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp @@ -21,7 +21,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char SpatialNoiseShader___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + SpatialNoiseShader___doc__, "Class hierarchy: :class:`freestyle.types.StrokeShader` > :class:`SpatialNoiseShader`\n" "\n" "[Geometry shader]\n" @@ -47,7 +49,7 @@ static char SpatialNoiseShader___doc__[] = " more noisy.\n" "\n" " :arg stroke: A Stroke object.\n" - " :type stroke: :class:`freestyle.types.Stroke`\n"; + " :type stroke: :class:`freestyle.types.Stroke`\n"); static int SpatialNoiseShader___init__(BPy_SpatialNoiseShader *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp index 0fc6e8350c6..f6a9ec8b244 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char StrokeTextureStepShader___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + StrokeTextureStepShader___doc__, "Class hierarchy: :class:`freestyle.types.StrokeShader` > :class:`StrokeTextureStepShader`\n" "\n" "[Texture shader]\n" @@ -37,7 +39,7 @@ static char StrokeTextureStepShader___doc__[] = " Assigns a spacing factor to the texture coordinates of the Stroke.\n" "\n" " :arg stroke: A Stroke object.\n" - " :type stroke: :class:`freestyle.types.Stroke`\n"; + " :type stroke: :class:`freestyle.types.Stroke`\n"); static int StrokeTextureStepShader___init__(BPy_StrokeTextureStepShader *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp index cc96049828b..d4f0ea0a6ae 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char ThicknessNoiseShader___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + ThicknessNoiseShader___doc__, "Class hierarchy: :class:`freestyle.types.StrokeShader` > :class:`ThicknessNoiseShader`\n" "\n" "[Thickness shader]\n" @@ -39,7 +41,7 @@ static char ThicknessNoiseShader___doc__[] = " Adds some noise to the stroke thickness.\n" "\n" " :arg stroke: A Stroke object.\n" - " :type stroke: :class:`freestyle.types.Stroke`\n"; + " :type stroke: :class:`freestyle.types.Stroke`\n"); static int ThicknessNoiseShader___init__(BPy_ThicknessNoiseShader *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp index e6dc34e68c3..db104a6a9fc 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char TipRemoverShader___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + TipRemoverShader___doc__, "Class hierarchy: :class:`freestyle.types.StrokeShader` > :class:`TipRemoverShader`\n" "\n" "[Geometry shader]\n" @@ -38,7 +40,7 @@ static char TipRemoverShader___doc__[] = " Removes the stroke's extremities.\n" "\n" " :arg stroke: A Stroke object.\n" - " :type stroke: :class:`freestyle.types.Stroke`\n"; + " :type stroke: :class:`freestyle.types.Stroke`\n"); static int TipRemoverShader___init__(BPy_TipRemoverShader *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp index fda378c3e9b..9ad901fba58 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp @@ -109,7 +109,9 @@ int UnaryFunction0DDouble_Init(PyObject *module) //------------------------INSTANCE METHODS ---------------------------------- -static char UnaryFunction0DDouble___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + UnaryFunction0DDouble___doc__, "Class hierarchy: :class:`UnaryFunction0D` > :class:`UnaryFunction0DDouble`\n" "\n" "Base class for unary functions (functors) that work on\n" @@ -117,7 +119,7 @@ static char UnaryFunction0DDouble___doc__[] = "\n" ".. method:: __init__()\n" "\n" - " Default constructor.\n"; + " Default constructor.\n"); static int UnaryFunction0DDouble___init__(BPy_UnaryFunction0DDouble *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp index 689a10cf63e..484bc04a86e 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp @@ -47,7 +47,9 @@ int UnaryFunction0DEdgeNature_Init(PyObject *module) //------------------------INSTANCE METHODS ---------------------------------- -static char UnaryFunction0DEdgeNature___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + UnaryFunction0DEdgeNature___doc__, "Class hierarchy: :class:`UnaryFunction0D` > :class:`UnaryFunction0DEdgeNature`\n" "\n" "Base class for unary functions (functors) that work on\n" @@ -55,7 +57,7 @@ static char UnaryFunction0DEdgeNature___doc__[] = "\n" ".. method:: __init__()\n" "\n" - " Default constructor.\n"; + " Default constructor.\n"); static int UnaryFunction0DEdgeNature___init__(BPy_UnaryFunction0DEdgeNature *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp index adedf3f2db2..737cfc3590e 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp @@ -85,7 +85,9 @@ int UnaryFunction0DFloat_Init(PyObject *module) //------------------------INSTANCE METHODS ---------------------------------- -static char UnaryFunction0DFloat___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + UnaryFunction0DFloat___doc__, "Class hierarchy: :class:`UnaryFunction0D` > :class:`UnaryFunction0DFloat`\n" "\n" "Base class for unary functions (functors) that work on\n" @@ -93,7 +95,7 @@ static char UnaryFunction0DFloat___doc__[] = "\n" ".. method:: __init__()\n" "\n" - " Default constructor.\n"; + " Default constructor.\n"); static int UnaryFunction0DFloat___init__(BPy_UnaryFunction0DFloat *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp index a5b7731d0a5..fb8eddc71b5 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp @@ -46,7 +46,9 @@ int UnaryFunction0DId_Init(PyObject *module) //------------------------INSTANCE METHODS ---------------------------------- -static char UnaryFunction0DId___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + UnaryFunction0DId___doc__, "Class hierarchy: :class:`UnaryFunction0D` > :class:`UnaryFunction0DId`\n" "\n" "Base class for unary functions (functors) that work on\n" @@ -54,7 +56,7 @@ static char UnaryFunction0DId___doc__[] = "\n" ".. method:: __init__()\n" "\n" - " Default constructor.\n"; + " Default constructor.\n"); static int UnaryFunction0DId___init__(BPy_UnaryFunction0DId *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp index e03b60029b6..31c657561c6 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp @@ -46,7 +46,9 @@ int UnaryFunction0DMaterial_Init(PyObject *module) //------------------------INSTANCE METHODS ---------------------------------- -static char UnaryFunction0DMaterial___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + UnaryFunction0DMaterial___doc__, "Class hierarchy: :class:`UnaryFunction0D` > :class:`UnaryFunction0DMaterial`\n" "\n" "Base class for unary functions (functors) that work on\n" @@ -54,7 +56,7 @@ static char UnaryFunction0DMaterial___doc__[] = "\n" ".. method:: __init__()\n" "\n" - " Default constructor.\n"; + " Default constructor.\n"); static int UnaryFunction0DMaterial___init__(BPy_UnaryFunction0DMaterial *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp index 83ef59ecd90..1cb4d2a73b4 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp @@ -49,7 +49,9 @@ int UnaryFunction0DUnsigned_Init(PyObject *module) //------------------------INSTANCE METHODS ---------------------------------- -static char UnaryFunction0DUnsigned___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + UnaryFunction0DUnsigned___doc__, "Class hierarchy: :class:`UnaryFunction0D` > :class:`UnaryFunction0DUnsigned`\n" "\n" "Base class for unary functions (functors) that work on\n" @@ -57,7 +59,7 @@ static char UnaryFunction0DUnsigned___doc__[] = "\n" ".. method:: __init__()\n" "\n" - " Default constructor.\n"; + " Default constructor.\n"); static int UnaryFunction0DUnsigned___init__(BPy_UnaryFunction0DUnsigned *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp index dc9b20fe6cd..610dee92bd3 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp @@ -53,7 +53,9 @@ int UnaryFunction0DVec2f_Init(PyObject *module) //------------------------INSTANCE METHODS ---------------------------------- -static char UnaryFunction0DVec2f___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + UnaryFunction0DVec2f___doc__, "Class hierarchy: :class:`UnaryFunction0D` > :class:`UnaryFunction0DVec2f`\n" "\n" "Base class for unary functions (functors) that work on\n" @@ -61,7 +63,7 @@ static char UnaryFunction0DVec2f___doc__[] = "\n" ".. method:: __init__()\n" "\n" - " Default constructor.\n"; + " Default constructor.\n"); static int UnaryFunction0DVec2f___init__(BPy_UnaryFunction0DVec2f *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp index b048cf617f3..ac578ad82b2 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp @@ -46,7 +46,9 @@ int UnaryFunction0DVec3f_Init(PyObject *module) //------------------------INSTANCE METHODS ---------------------------------- -static char UnaryFunction0DVec3f___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + UnaryFunction0DVec3f___doc__, "Class hierarchy: :class:`UnaryFunction0D` > :class:`UnaryFunction0DVec3f`\n" "\n" "Base class for unary functions (functors) that work on\n" @@ -54,7 +56,7 @@ static char UnaryFunction0DVec3f___doc__[] = "\n" ".. method:: __init__()\n" "\n" - " Default constructor.\n"; + " Default constructor.\n"); static int UnaryFunction0DVec3f___init__(BPy_UnaryFunction0DVec3f *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp index bd8308be217..c59de0174b0 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp @@ -49,7 +49,9 @@ int UnaryFunction0DVectorViewShape_Init(PyObject *module) //------------------------INSTANCE METHODS ---------------------------------- -static char UnaryFunction0DVectorViewShape___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + UnaryFunction0DVectorViewShape___doc__, "Class hierarchy: :class:`UnaryFunction0D` > :class:`UnaryFunction0DVectorViewShape`\n" "\n" "Base class for unary functions (functors) that work on\n" @@ -58,7 +60,7 @@ static char UnaryFunction0DVectorViewShape___doc__[] = "\n" ".. method:: __init__()\n" "\n" - " Default constructor.\n"; + " Default constructor.\n"); static int UnaryFunction0DVectorViewShape___init__(BPy_UnaryFunction0DVectorViewShape *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp index d37b32372e6..03ff4faf396 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp @@ -54,7 +54,9 @@ int UnaryFunction0DViewShape_Init(PyObject *module) //------------------------INSTANCE METHODS ---------------------------------- -static char UnaryFunction0DViewShape___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + UnaryFunction0DViewShape___doc__, "Class hierarchy: :class:`UnaryFunction0D` > :class:`UnaryFunction0DViewShape`\n" "\n" "Base class for unary functions (functors) that work on\n" @@ -62,7 +64,7 @@ static char UnaryFunction0DViewShape___doc__[] = "\n" ".. method:: __init__()\n" "\n" - " Default constructor.\n"; + " Default constructor.\n"); static int UnaryFunction0DViewShape___init__(BPy_UnaryFunction0DViewShape *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp index fc83e8d38f3..5931285d84c 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char ShapeIdF0D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + ShapeIdF0D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction0D` > " ":class:`freestyle.types.UnaryFunction0DId` > :class:`ShapeIdF0D`\n" "\n" @@ -43,7 +45,7 @@ static char ShapeIdF0D___doc__[] = " :arg it: An Interface0DIterator object.\n" " :type it: :class:`freestyle.types.Interface0DIterator`\n" " :return: The Id of the Shape the pointed Interface0D belongs to.\n" - " :rtype: :class:`freestyle.types.Id`\n"; + " :rtype: :class:`freestyle.types.Id`\n"); static int ShapeIdF0D___init__(BPy_ShapeIdF0D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp index bf75dfb44b0..75a5e14863a 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char MaterialF0D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + MaterialF0D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction0D` > " ":class:`freestyle.types.UnaryFunction0DMaterial` > :class:`MaterialF0D`\n" "\n" @@ -46,7 +48,7 @@ static char MaterialF0D___doc__[] = " :type it: :class:`freestyle.types.Interface0DIterator`\n" " :return: The material of the object evaluated at the pointed\n" " Interface0D.\n" - " :rtype: :class:`freestyle.types.Material`\n"; + " :rtype: :class:`freestyle.types.Material`\n"); static int MaterialF0D___init__(BPy_MaterialF0D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.cpp index e4ab8b4af13..8383f7d0065 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char CurveNatureF0D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + CurveNatureF0D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction0D` > " ":class:`freestyle.types.UnaryFunction0DEdgeNature` > :class:`CurveNatureF0D`\n" "\n" @@ -37,7 +39,7 @@ static char CurveNatureF0D___doc__[] = " :type it: :class:`freestyle.types.Interface0DIterator`\n" " :return: The nature of the 1D element to which the pointed Interface0D\n" " belongs.\n" - " :rtype: :class:`freestyle.types.Nature`\n"; + " :rtype: :class:`freestyle.types.Nature`\n"); static int CurveNatureF0D___init__(BPy_CurveNatureF0D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp index 9451a809ce0..fe536d5428f 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char Normal2DF0D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + Normal2DF0D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction0D` > " ":class:`freestyle.types.UnaryFunction0DVec2f` > :class:`Normal2DF0D`\n" "\n" @@ -39,7 +41,7 @@ static char Normal2DF0D___doc__[] = " :type it: :class:`freestyle.types.Interface0DIterator`\n" " :return: The 2D normal of the 1D element evaluated at the pointed\n" " Interface0D.\n" - " :rtype: :class:`mathutils.Vector`\n"; + " :rtype: :class:`mathutils.Vector`\n"); static int Normal2DF0D___init__(BPy_Normal2DF0D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.cpp index 431f2d67e50..7d65ba4d807 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char VertexOrientation2DF0D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + VertexOrientation2DF0D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction0D` > " ":class:`freestyle.types.UnaryFunction0DVec2f` > :class:`VertexOrientation2DF0D`\n" "\n" @@ -39,7 +41,7 @@ static char VertexOrientation2DF0D___doc__[] = " :type it: :class:`freestyle.types.Interface0DIterator`\n" " :return: The 2D oriented tangent to the 1D element evaluated at the\n" " pointed Interface0D.\n" - " :rtype: :class:`mathutils.Vector`\n"; + " :rtype: :class:`mathutils.Vector`\n"); static int VertexOrientation2DF0D___init__(BPy_VertexOrientation2DF0D *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.cpp index 96fc758091f..a1680b03974 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char VertexOrientation3DF0D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + VertexOrientation3DF0D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction0D` > " ":class:`freestyle.types.UnaryFunction0DVec3f` > :class:`VertexOrientation3DF0D`\n" "\n" @@ -39,7 +41,7 @@ static char VertexOrientation3DF0D___doc__[] = " :type it: :class:`freestyle.types.Interface0DIterator`\n" " :return: The 3D oriented tangent to the 1D element evaluated at the\n" " pointed Interface0D.\n" - " :rtype: :class:`mathutils.Vector`\n"; + " :rtype: :class:`mathutils.Vector`\n"); static int VertexOrientation3DF0D___init__(BPy_VertexOrientation3DF0D *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp index 48c267d0eff..41f38d20519 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char GetOccludeeF0D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + GetOccludeeF0D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction0D` > " ":class:`freestyle.types.UnaryFunction0DViewShape` > :class:`GetOccludeeF0D`\n" "\n" @@ -36,7 +38,7 @@ static char GetOccludeeF0D___doc__[] = " :arg it: An Interface0DIterator object.\n" " :type it: :class:`freestyle.types.Interface0DIterator`\n" " :return: The ViewShape occluded by the pointed Interface0D.\n" - " :rtype: :class:`freestyle.types.ViewShape`\n"; + " :rtype: :class:`freestyle.types.ViewShape`\n"); static int GetOccludeeF0D___init__(BPy_GetOccludeeF0D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp index a51077eccda..819be56d7b1 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char GetShapeF0D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + GetShapeF0D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction0D` > " ":class:`freestyle.types.UnaryFunction0DViewShape` > :class:`GetShapeF0D`\n" "\n" @@ -36,7 +38,7 @@ static char GetShapeF0D___doc__[] = " :arg it: An Interface0DIterator object.\n" " :type it: :class:`freestyle.types.Interface0DIterator`\n" " :return: The ViewShape containing the pointed Interface0D.\n" - " :rtype: :class:`freestyle.types.ViewShape`\n"; + " :rtype: :class:`freestyle.types.ViewShape`\n"); static int GetShapeF0D___init__(BPy_GetShapeF0D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.cpp index 73847f80de8..765b1a94571 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char Curvature2DAngleF0D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + Curvature2DAngleF0D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction0D` > " ":class:`freestyle.types.UnaryFunction0DDouble` > :class:`Curvature2DAngleF0D`\n" "\n" @@ -39,7 +41,7 @@ static char Curvature2DAngleF0D___doc__[] = " :type it: :class:`freestyle.types.Interface0DIterator`\n" " :return: The 2D curvature of the 1D element evaluated at the\n" " pointed Interface0D.\n" - " :rtype: float\n"; + " :rtype: float\n"); static int Curvature2DAngleF0D___init__(BPy_Curvature2DAngleF0D *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.cpp index afeb22d4f1a..c1c378c7b35 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char DensityF0D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + DensityF0D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction0D` > " ":class:`freestyle.types.UnaryFunction0DDouble` > :class:`DensityF0D`\n" "\n" @@ -45,7 +47,7 @@ static char DensityF0D___doc__[] = " :type it: :class:`freestyle.types.Interface0DIterator`\n" " :return: The density of the image evaluated at the pointed\n" " Interface0D.\n" - " :rtype: float\n"; + " :rtype: float\n"); static int DensityF0D___init__(BPy_DensityF0D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.cpp index c71fedfac88..7cc60bd62ce 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char GetProjectedXF0D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + GetProjectedXF0D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction0D` > " ":class:`freestyle.types.UnaryFunction0DDouble` > :class:`GetProjectedXF0D`\n" "\n" @@ -36,7 +38,7 @@ static char GetProjectedXF0D___doc__[] = " :arg it: An Interface0DIterator object.\n" " :type it: :class:`freestyle.types.Interface0DIterator`\n" " :return: The X 3D projected coordinate of the pointed Interface0D.\n" - " :rtype: float\n"; + " :rtype: float\n"); static int GetProjectedXF0D___init__(BPy_GetProjectedXF0D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.cpp index f20af6f97b0..c313b31e017 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char GetProjectedYF0D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + GetProjectedYF0D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction0D` > " ":class:`freestyle.types.UnaryFunction0DDouble` > :class:`GetProjectedYF0D`\n" "\n" @@ -36,7 +38,7 @@ static char GetProjectedYF0D___doc__[] = " :arg it: An Interface0DIterator object.\n" " :type it: :class:`freestyle.types.Interface0DIterator`\n" " :return: The Y 3D projected coordinate of the pointed Interface0D.\n" - " :rtype: float\n"; + " :rtype: float\n"); static int GetProjectedYF0D___init__(BPy_GetProjectedYF0D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.cpp index f4e10ffe2bb..52941bb3236 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char GetProjectedZF0D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + GetProjectedZF0D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction0D` > " ":class:`freestyle.types.UnaryFunction0DDouble` > :class:`GetProjectedZF0D`\n" "\n" @@ -36,7 +38,7 @@ static char GetProjectedZF0D___doc__[] = " :arg it: An Interface0DIterator object.\n" " :type it: :class:`freestyle.types.Interface0DIterator`\n" " :return: The Z 3D projected coordinate of the pointed Interface0D.\n" - " :rtype: float\n"; + " :rtype: float\n"); static int GetProjectedZF0D___init__(BPy_GetProjectedZF0D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.cpp index dc53509768d..46e1a375929 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char GetXF0D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + GetXF0D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction0D` > " ":class:`freestyle.types.UnaryFunction0DDouble` > :class:`GetXF0D`\n" "\n" @@ -36,7 +38,7 @@ static char GetXF0D___doc__[] = " :arg it: An Interface0DIterator object.\n" " :type it: :class:`freestyle.types.Interface0DIterator`\n" " :return: The X 3D coordinate of the pointed Interface0D.\n" - " :rtype: float\n"; + " :rtype: float\n"); static int GetXF0D___init__(BPy_GetXF0D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.cpp index b2906f0b0f5..67c88f94aa0 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char GetYF0D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + GetYF0D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction0D` > " ":class:`freestyle.types.UnaryFunction0DDouble` > :class:`GetYF0D`\n" "\n" @@ -36,7 +38,7 @@ static char GetYF0D___doc__[] = " :arg it: An Interface0DIterator object.\n" " :type it: :class:`freestyle.types.Interface0DIterator`\n" " :return: The Y 3D coordinate of the pointed Interface0D.\n" - " :rtype: float\n"; + " :rtype: float\n"); static int GetYF0D___init__(BPy_GetYF0D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.cpp index 7b223c8f38e..10af35eefa4 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char GetZF0D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + GetZF0D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction0D` > " ":class:`freestyle.types.UnaryFunction0DDouble` > :class:`GetZF0D`\n" "\n" @@ -36,7 +38,7 @@ static char GetZF0D___doc__[] = " :arg it: An Interface0DIterator object.\n" " :type it: :class:`freestyle.types.Interface0DIterator`\n" " :return: The Z 3D coordinate of the pointed Interface0D.\n" - " :rtype: float\n"; + " :rtype: float\n"); static int GetZF0D___init__(BPy_GetZF0D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.cpp index 648ba47c9ba..24f4482a4f1 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char LocalAverageDepthF0D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + LocalAverageDepthF0D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction0D` > " ":class:`freestyle.types.UnaryFunction0DDouble` > :class:`LocalAverageDepthF0D`\n" "\n" @@ -41,7 +43,7 @@ static char LocalAverageDepthF0D___doc__[] = " :arg it: An Interface0DIterator object.\n" " :type it: :class:`freestyle.types.Interface0DIterator`\n" " :return: The average depth around the pointed Interface0D.\n" - " :rtype: float\n"; + " :rtype: float\n"); static int LocalAverageDepthF0D___init__(BPy_LocalAverageDepthF0D *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp index dc2e9f0f7d3..3cfab30345b 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char ZDiscontinuityF0D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + ZDiscontinuityF0D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction0D` > " ":class:`freestyle.types.UnaryFunction0DDouble` > :class:`ZDiscontinuityF0D`\n" "\n" @@ -41,7 +43,7 @@ static char ZDiscontinuityF0D___doc__[] = " :type it: :class:`freestyle.types.Interface0DIterator`\n" " :return: The normalized distance between the pointed Interface0D\n" " and the occludee.\n" - " :rtype: float\n"; + " :rtype: float\n"); static int ZDiscontinuityF0D___init__(BPy_ZDiscontinuityF0D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.cpp index 9efe2fcf28e..482e065ad07 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char GetCurvilinearAbscissaF0D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + GetCurvilinearAbscissaF0D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction0D` > " ":class:`freestyle.types.UnaryFunction0DFloat` > :class:`GetCurvilinearAbscissaF0D`\n" "\n" @@ -37,7 +39,7 @@ static char GetCurvilinearAbscissaF0D___doc__[] = " :arg it: An Interface0DIterator object.\n" " :type it: :class:`freestyle.types.Interface0DIterator`\n" " :return: The curvilinear abscissa of the pointed Interface0D.\n" - " :rtype: float\n"; + " :rtype: float\n"); static int GetCurvilinearAbscissaF0D___init__(BPy_GetCurvilinearAbscissaF0D *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.cpp index ee07a66e727..84d057c4d62 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char GetParameterF0D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + GetParameterF0D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction0D` > " ":class:`freestyle.types.UnaryFunction0DFloat` > :class:`GetParameterF0D`\n" "\n" @@ -36,7 +38,7 @@ static char GetParameterF0D___doc__[] = " :arg it: An Interface0DIterator object.\n" " :type it: :class:`freestyle.types.Interface0DIterator`\n" " :return: The parameter of an Interface0D.\n" - " :rtype: float\n"; + " :rtype: float\n"); static int GetParameterF0D___init__(BPy_GetParameterF0D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.cpp index fedd280d9fc..614a6dd430c 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char GetViewMapGradientNormF0D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + GetViewMapGradientNormF0D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction0D` > " ":class:`freestyle.types.UnaryFunction0DFloat` > :class:`GetViewMapGradientNormF0D`\n" "\n" @@ -41,7 +43,7 @@ static char GetViewMapGradientNormF0D___doc__[] = " :type it: :class:`freestyle.types.Interface0DIterator`\n" " :return: The norm of the gradient of the global viewmap density\n" " image.\n" - " :rtype: float\n"; + " :rtype: float\n"); static int GetViewMapGradientNormF0D___init__(BPy_GetViewMapGradientNormF0D *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.cpp index aa16ca696ad..8c46545bb3c 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char ReadCompleteViewMapPixelF0D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + ReadCompleteViewMapPixelF0D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction0D` > " ":class:`freestyle.types.UnaryFunction0DFloat` > :class:`ReadCompleteViewMapPixelF0D`\n" "\n" @@ -39,7 +41,7 @@ static char ReadCompleteViewMapPixelF0D___doc__[] = " :arg it: An Interface0DIterator object.\n" " :type it: :class:`freestyle.types.Interface0DIterator`\n" " :return: A pixel in one of the level of the complete viewmap.\n" - " :rtype: float\n"; + " :rtype: float\n"); static int ReadCompleteViewMapPixelF0D___init__(BPy_ReadCompleteViewMapPixelF0D *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp index 306164634f3..512c04bc877 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char ReadMapPixelF0D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + ReadMapPixelF0D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction0D` > " ":class:`freestyle.types.UnaryFunction0DFloat` > :class:`ReadMapPixelF0D`\n" "\n" @@ -41,7 +43,7 @@ static char ReadMapPixelF0D___doc__[] = " :arg it: An Interface0DIterator object.\n" " :type it: :class:`freestyle.types.Interface0DIterator`\n" " :return: A pixel in a map.\n" - " :rtype: float\n"; + " :rtype: float\n"); static int ReadMapPixelF0D___init__(BPy_ReadMapPixelF0D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp index 98b37e02656..200ed9f7ea8 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp @@ -22,7 +22,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char ReadSteerableViewMapPixelF0D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + ReadSteerableViewMapPixelF0D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction0D` > " ":class:`freestyle.types.UnaryFunction0DFloat` > :class:`ReadSteerableViewMapPixelF0D`\n" "\n" @@ -44,7 +46,7 @@ static char ReadSteerableViewMapPixelF0D___doc__[] = " :arg it: An Interface0DIterator object.\n" " :type it: :class:`freestyle.types.Interface0DIterator`\n" " :return: A pixel in one of the level of one of the steerable viewmaps.\n" - " :rtype: float\n"; + " :rtype: float\n"); static int ReadSteerableViewMapPixelF0D___init__(BPy_ReadSteerableViewMapPixelF0D *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp index 311e44805b4..787f792a849 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char QuantitativeInvisibilityF0D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + QuantitativeInvisibilityF0D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction0D` > " ":class:`freestyle.types.UnaryFunction0DUnsigned` > :class:`QuantitativeInvisibilityF0D`\n" "\n" @@ -42,7 +44,7 @@ static char QuantitativeInvisibilityF0D___doc__[] = " :arg it: An Interface0DIterator object.\n" " :type it: :class:`freestyle.types.Interface0DIterator`\n" " :return: The quantitative invisibility of the pointed Interface0D.\n" - " :rtype: int\n"; + " :rtype: int\n"); static int QuantitativeInvisibilityF0D___init__(BPy_QuantitativeInvisibilityF0D *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp index aae1137dab0..b1793b45f2a 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char GetOccludersF0D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + GetOccludersF0D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction0D` > " ":class:`freestyle.types.UnaryFunction0DVectorViewShape` > :class:`GetOccludersF0D`\n" "\n" @@ -37,7 +39,7 @@ static char GetOccludersF0D___doc__[] = " :type it: :class:`freestyle.types.Interface0DIterator`\n" " :return: A list of ViewShape objects occluding the pointed\n" " Interface0D.\n" - " :rtype: list of :class:`freestyle.types.ViewShape` objects\n"; + " :rtype: list of :class:`freestyle.types.ViewShape` objects\n"); static int GetOccludersF0D___init__(BPy_GetOccludersF0D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp index 772afa61e1c..5d16a81c169 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp @@ -143,7 +143,9 @@ int UnaryFunction1DDouble_Init(PyObject *module) //------------------------INSTANCE METHODS ---------------------------------- -static char UnaryFunction1DDouble___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + UnaryFunction1DDouble___doc__, "Class hierarchy: :class:`UnaryFunction1D` > :class:`UnaryFunction1DDouble`\n" "\n" "Base class for unary functions (functors) that work on\n" @@ -156,7 +158,7 @@ static char UnaryFunction1DDouble___doc__[] = " or the integration method given as an argument.\n" "\n" " :arg integration_type: An integration method.\n" - " :type integration_type: :class:`IntegrationType`\n"; + " :type integration_type: :class:`IntegrationType`\n"); static int UnaryFunction1DDouble___init__(BPy_UnaryFunction1DDouble *self, PyObject *args, @@ -221,10 +223,12 @@ static PyObject *UnaryFunction1DDouble___call__(BPy_UnaryFunction1DDouble *self, /*----------------------UnaryFunction1DDouble get/setters ----------------------------*/ -PyDoc_STRVAR(integration_type_doc, - "The integration method.\n" - "\n" - ":type: :class:`IntegrationType`"); +PyDoc_STRVAR( + /* Wrap. */ + integration_type_doc, + "The integration method.\n" + "\n" + ":type: :class:`IntegrationType`"); static PyObject *integration_type_get(BPy_UnaryFunction1DDouble *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp index 045f13b6ad2..416f56c45e0 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp @@ -48,7 +48,9 @@ int UnaryFunction1DEdgeNature_Init(PyObject *module) //------------------------INSTANCE METHODS ---------------------------------- -static char UnaryFunction1DEdgeNature___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + UnaryFunction1DEdgeNature___doc__, "Class hierarchy: :class:`UnaryFunction1D` > :class:`UnaryFunction1DEdgeNature`\n" "\n" "Base class for unary functions (functors) that work on\n" @@ -61,7 +63,7 @@ static char UnaryFunction1DEdgeNature___doc__[] = " or the integration method given as an argument.\n" "\n" " :arg integration_type: An integration method.\n" - " :type integration_type: :class:`IntegrationType`\n"; + " :type integration_type: :class:`IntegrationType`\n"); static int UnaryFunction1DEdgeNature___init__(BPy_UnaryFunction1DEdgeNature *self, PyObject *args, @@ -128,10 +130,12 @@ static PyObject *UnaryFunction1DEdgeNature___call__(BPy_UnaryFunction1DEdgeNatur /*----------------------UnaryFunction1DEdgeNature get/setters ----------------------------*/ -PyDoc_STRVAR(integration_type_doc, - "The integration method.\n" - "\n" - ":type: :class:`IntegrationType`"); +PyDoc_STRVAR( + /* Wrap. */ + integration_type_doc, + "The integration method.\n" + "\n" + ":type: :class:`IntegrationType`"); static PyObject *integration_type_get(BPy_UnaryFunction1DEdgeNature *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp index 5340b3c04d5..e0f22d4a3a9 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp @@ -39,7 +39,9 @@ int UnaryFunction1DFloat_Init(PyObject *module) //------------------------INSTANCE METHODS ---------------------------------- -static char UnaryFunction1DFloat___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + UnaryFunction1DFloat___doc__, "Class hierarchy: :class:`UnaryFunction1D` > :class:`UnaryFunction1DFloat`\n" "\n" "Base class for unary functions (functors) that work on\n" @@ -52,7 +54,7 @@ static char UnaryFunction1DFloat___doc__[] = " or the integration method given as an argument.\n" "\n" " :arg integration_type: An integration method.\n" - " :type integration_type: :class:`IntegrationType`\n"; + " :type integration_type: :class:`IntegrationType`\n"); static int UnaryFunction1DFloat___init__(BPy_UnaryFunction1DFloat *self, PyObject *args, @@ -117,10 +119,12 @@ static PyObject *UnaryFunction1DFloat___call__(BPy_UnaryFunction1DFloat *self, /*----------------------UnaryFunction1DFloat get/setters ----------------------------*/ -PyDoc_STRVAR(integration_type_doc, - "The integration method.\n" - "\n" - ":type: :class:`IntegrationType`"); +PyDoc_STRVAR( + /* Wrap. */ + integration_type_doc, + "The integration method.\n" + "\n" + ":type: :class:`IntegrationType`"); static PyObject *integration_type_get(BPy_UnaryFunction1DFloat *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp index fd06d271975..53c9db65792 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp @@ -50,7 +50,9 @@ int UnaryFunction1DUnsigned_Init(PyObject *module) //------------------------INSTANCE METHODS ---------------------------------- -static char UnaryFunction1DUnsigned___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + UnaryFunction1DUnsigned___doc__, "Class hierarchy: :class:`UnaryFunction1D` > :class:`UnaryFunction1DUnsigned`\n" "\n" "Base class for unary functions (functors) that work on\n" @@ -63,7 +65,7 @@ static char UnaryFunction1DUnsigned___doc__[] = " or the integration method given as an argument.\n" "\n" " :arg integration_type: An integration method.\n" - " :type integration_type: :class:`IntegrationType`\n"; + " :type integration_type: :class:`IntegrationType`\n"); static int UnaryFunction1DUnsigned___init__(BPy_UnaryFunction1DUnsigned *self, PyObject *args, @@ -129,10 +131,12 @@ static PyObject *UnaryFunction1DUnsigned___call__(BPy_UnaryFunction1DUnsigned *s /*----------------------UnaryFunction1DUnsigned get/setters ----------------------------*/ -PyDoc_STRVAR(integration_type_doc, - "The integration method.\n" - "\n" - ":type: :class:`IntegrationType`"); +PyDoc_STRVAR( + /* Wrap. */ + integration_type_doc, + "The integration method.\n" + "\n" + ":type: :class:`IntegrationType`"); static PyObject *integration_type_get(BPy_UnaryFunction1DUnsigned *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp index c7ece4e9180..679f73fe32b 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp @@ -54,7 +54,9 @@ int UnaryFunction1DVec2f_Init(PyObject *module) //------------------------INSTANCE METHODS ---------------------------------- -static char UnaryFunction1DVec2f___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + UnaryFunction1DVec2f___doc__, "Class hierarchy: :class:`UnaryFunction1D` > :class:`UnaryFunction1DVec2f`\n" "\n" "Base class for unary functions (functors) that work on\n" @@ -67,7 +69,7 @@ static char UnaryFunction1DVec2f___doc__[] = " or the integration method given as an argument.\n" "\n" " :arg integration_type: An integration method.\n" - " :type integration_type: :class:`IntegrationType`\n"; + " :type integration_type: :class:`IntegrationType`\n"); static int UnaryFunction1DVec2f___init__(BPy_UnaryFunction1DVec2f *self, PyObject *args, @@ -132,10 +134,12 @@ static PyObject *UnaryFunction1DVec2f___call__(BPy_UnaryFunction1DVec2f *self, /*----------------------UnaryFunction1DVec2f get/setters ----------------------------*/ -PyDoc_STRVAR(integration_type_doc, - "The integration method.\n" - "\n" - ":type: :class:`IntegrationType`"); +PyDoc_STRVAR( + /* Wrap. */ + integration_type_doc, + "The integration method.\n" + "\n" + ":type: :class:`IntegrationType`"); static PyObject *integration_type_get(BPy_UnaryFunction1DVec2f *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp index 6f0d1aa3604..f90fbabf3d1 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp @@ -47,7 +47,9 @@ int UnaryFunction1DVec3f_Init(PyObject *module) //------------------------INSTANCE METHODS ---------------------------------- -static char UnaryFunction1DVec3f___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + UnaryFunction1DVec3f___doc__, "Class hierarchy: :class:`UnaryFunction1D` > :class:`UnaryFunction1DVec3f`\n" "\n" "Base class for unary functions (functors) that work on\n" @@ -60,7 +62,7 @@ static char UnaryFunction1DVec3f___doc__[] = " or the integration method given as an argument.\n" "\n" " :arg integration_type: An integration method.\n" - " :type integration_type: :class:`IntegrationType`\n"; + " :type integration_type: :class:`IntegrationType`\n"); static int UnaryFunction1DVec3f___init__(BPy_UnaryFunction1DVec3f *self, PyObject *args, @@ -125,10 +127,12 @@ static PyObject *UnaryFunction1DVec3f___call__(BPy_UnaryFunction1DVec3f *self, /*----------------------UnaryFunction1DVec3f get/setters ----------------------------*/ -PyDoc_STRVAR(integration_type_doc, - "The integration method.\n" - "\n" - ":type: :class:`IntegrationType`"); +PyDoc_STRVAR( + /* Wrap. */ + integration_type_doc, + "The integration method.\n" + "\n" + ":type: :class:`IntegrationType`"); static PyObject *integration_type_get(BPy_UnaryFunction1DVec3f *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp index dc2268f4d3a..54adc1ff29d 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp @@ -64,7 +64,9 @@ int UnaryFunction1DVectorViewShape_Init(PyObject *module) //------------------------INSTANCE METHODS ---------------------------------- -static char UnaryFunction1DVectorViewShape___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + UnaryFunction1DVectorViewShape___doc__, "Class hierarchy: :class:`UnaryFunction1D` > :class:`UnaryFunction1DVectorViewShape`\n" "\n" "Base class for unary functions (functors) that work on\n" @@ -78,7 +80,7 @@ static char UnaryFunction1DVectorViewShape___doc__[] = " or the integration method given as an argument.\n" "\n" " :arg integration_type: An integration method.\n" - " :type integration_type: :class:`IntegrationType`\n"; + " :type integration_type: :class:`IntegrationType`\n"); static int UnaryFunction1DVectorViewShape___init__(BPy_UnaryFunction1DVectorViewShape *self, PyObject *args, @@ -153,10 +155,12 @@ static PyObject *UnaryFunction1DVectorViewShape___call__(BPy_UnaryFunction1DVect /*----------------------UnaryFunction1DVectorViewShape get/setters ----------------------------*/ -PyDoc_STRVAR(integration_type_doc, - "The integration method.\n" - "\n" - ":type: :class:`IntegrationType`"); +PyDoc_STRVAR( + /* Wrap. */ + integration_type_doc, + "The integration method.\n" + "\n" + ":type: :class:`IntegrationType`"); static PyObject *integration_type_get(BPy_UnaryFunction1DVectorViewShape *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp index 776acbc724f..de60aeaef70 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp @@ -62,7 +62,9 @@ int UnaryFunction1DVoid_Init(PyObject *module) //------------------------INSTANCE METHODS ---------------------------------- -static char UnaryFunction1DVoid___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + UnaryFunction1DVoid___doc__, "Class hierarchy: :class:`UnaryFunction1D` > :class:`UnaryFunction1DVoid`\n" "\n" "Base class for unary functions (functors) working on\n" @@ -75,7 +77,7 @@ static char UnaryFunction1DVoid___doc__[] = " or the integration method given as an argument.\n" "\n" " :arg integration_type: An integration method.\n" - " :type integration_type: :class:`IntegrationType`\n"; + " :type integration_type: :class:`IntegrationType`\n"); static int UnaryFunction1DVoid___init__(BPy_UnaryFunction1DVoid *self, PyObject *args, @@ -140,10 +142,12 @@ static PyObject *UnaryFunction1DVoid___call__(BPy_UnaryFunction1DVoid *self, /*----------------------UnaryFunction1DVoid get/setters ----------------------------*/ -PyDoc_STRVAR(integration_type_doc, - "The integration method.\n" - "\n" - ":type: :class:`IntegrationType`"); +PyDoc_STRVAR( + /* Wrap. */ + integration_type_doc, + "The integration method.\n" + "\n" + ":type: :class:`IntegrationType`"); static PyObject *integration_type_get(BPy_UnaryFunction1DVoid *self, void * /*closure*/) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp index fb294861a0a..c301ebbcfa6 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp @@ -22,7 +22,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char CurveNatureF1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + CurveNatureF1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > " ":class:`freestyle.types.UnaryFunction1DEdgeNature` > :class:`CurveNatureF1D`\n" "\n" @@ -47,7 +49,7 @@ static char CurveNatureF1D___doc__[] = " :arg inter: An Interface1D object.\n" " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: The nature of the Interface1D.\n" - " :rtype: :class:`freestyle.types.Nature`\n"; + " :rtype: :class:`freestyle.types.Nature`\n"); static int CurveNatureF1D___init__(BPy_CurveNatureF1D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp index f0ccc22623d..a027b8924c9 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp @@ -22,7 +22,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char Normal2DF1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + Normal2DF1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > " ":class:`freestyle.types.UnaryFunction1DVec2f` > :class:`Normal2DF1D`\n" "\n" @@ -41,7 +43,7 @@ static char Normal2DF1D___doc__[] = " :arg inter: An Interface1D object.\n" " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: The 2D normal for the Interface1D.\n" - " :rtype: :class:`mathutils.Vector`\n"; + " :rtype: :class:`mathutils.Vector`\n"); static int Normal2DF1D___init__(BPy_Normal2DF1D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp index 762f8b96dd9..1a5d64897ef 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp @@ -22,7 +22,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char Orientation2DF1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + Orientation2DF1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > " ":class:`freestyle.types.UnaryFunction1DVec2f` > :class:`Orientation2DF1D`\n" "\n" @@ -41,7 +43,7 @@ static char Orientation2DF1D___doc__[] = " :arg inter: An Interface1D object.\n" " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: The 2D orientation of the Interface1D.\n" - " :rtype: :class:`mathutils.Vector`\n"; + " :rtype: :class:`mathutils.Vector`\n"); static int Orientation2DF1D___init__(BPy_Orientation2DF1D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp index 8d4f974fbf7..5803358a10a 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp @@ -22,7 +22,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char Orientation3DF1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + Orientation3DF1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > " ":class:`freestyle.types.UnaryFunction1DVec3f` > :class:`Orientation3DF1D`\n" "\n" @@ -41,7 +43,7 @@ static char Orientation3DF1D___doc__[] = " :arg inter: An Interface1D object.\n" " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: The 3D orientation of the Interface1D.\n" - " :rtype: :class:`mathutils.Vector`\n"; + " :rtype: :class:`mathutils.Vector`\n"); static int Orientation3DF1D___init__(BPy_Orientation3DF1D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp index 56113c83dc0..879346f28b4 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp @@ -22,7 +22,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char Curvature2DAngleF1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + Curvature2DAngleF1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > " ":class:`freestyle.types.UnaryFunction1DDouble` > :class:`Curvature2DAngleF1D`\n" "\n" @@ -41,7 +43,7 @@ static char Curvature2DAngleF1D___doc__[] = " :arg inter: An Interface1D object.\n" " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: The 2D curvature as an angle.\n" - " :rtype: float\n"; + " :rtype: float\n"); static int Curvature2DAngleF1D___init__(BPy_Curvature2DAngleF1D *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp index 90ca5b88ab4..e1c2e45d8e0 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp @@ -22,7 +22,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char DensityF1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + DensityF1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > " ":class:`freestyle.types.UnaryFunction1DDouble` > :class:`DensityF1D`\n" "\n" @@ -53,7 +55,7 @@ static char DensityF1D___doc__[] = " :arg inter: An Interface1D object.\n" " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: The density evaluated for an Interface1D.\n" - " :rtype: float\n"; + " :rtype: float\n"); static int DensityF1D___init__(BPy_DensityF1D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp index f0542704a9a..ecd9e7a1597 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp @@ -22,7 +22,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char GetCompleteViewMapDensityF1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + GetCompleteViewMapDensityF1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > " ":class:`freestyle.types.UnaryFunction1DDouble` > :class:`GetCompleteViewMapDensityF1D`\n" "\n" @@ -55,7 +57,7 @@ static char GetCompleteViewMapDensityF1D___doc__[] = " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: The density evaluated for the Interface1D in the complete\n" " viewmap image.\n" - " :rtype: float\n"; + " :rtype: float\n"); static int GetCompleteViewMapDensityF1D___init__(BPy_GetCompleteViewMapDensityF1D *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp index 5f957e74d18..7b7ea6a5eba 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp @@ -24,7 +24,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char GetDirectionalViewMapDensityF1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + GetDirectionalViewMapDensityF1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > " ":class:`freestyle.types.UnaryFunction1DDouble` " "> :class:`GetDirectionalViewMapDensityF1D`\n" @@ -63,7 +65,7 @@ static char GetDirectionalViewMapDensityF1D___doc__[] = " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: the density evaluated for an Interface1D in of the\n" " steerable viewmaps image.\n" - " :rtype: float\n"; + " :rtype: float\n"); static int GetDirectionalViewMapDensityF1D___init__(BPy_GetDirectionalViewMapDensityF1D *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp index 8209a3cb794..1d9d90b5f22 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp @@ -22,7 +22,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char GetProjectedXF1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + GetProjectedXF1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > " ":class:`freestyle.types.UnaryFunction1DDouble` > :class:`GetProjectedXF1D`\n" "\n" @@ -41,7 +43,7 @@ static char GetProjectedXF1D___doc__[] = " :arg inter: An Interface1D object.\n" " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: The projected X 3D coordinate of an Interface1D.\n" - " :rtype: float\n"; + " :rtype: float\n"); static int GetProjectedXF1D___init__(BPy_GetProjectedXF1D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp index 3c199448ee4..1e62d833739 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp @@ -22,7 +22,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char GetProjectedYF1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + GetProjectedYF1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > " ":class:`freestyle.types.UnaryFunction1DDouble` > :class:`GetProjectedYF1D`\n" "\n" @@ -41,7 +43,7 @@ static char GetProjectedYF1D___doc__[] = " :arg inter: An Interface1D object.\n" " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: The projected Y 3D coordinate of an Interface1D.\n" - " :rtype: float\n"; + " :rtype: float\n"); static int GetProjectedYF1D___init__(BPy_GetProjectedYF1D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp index d6ab5c80867..7c64f20a7ae 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp @@ -22,7 +22,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char GetProjectedZF1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + GetProjectedZF1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > " ":class:`freestyle.types.UnaryFunction1DDouble` > :class:`GetProjectedZF1D`\n" "\n" @@ -41,7 +43,7 @@ static char GetProjectedZF1D___doc__[] = " :arg inter: An Interface1D object.\n" " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: The projected Z 3D coordinate of an Interface1D.\n" - " :rtype: float\n"; + " :rtype: float\n"); static int GetProjectedZF1D___init__(BPy_GetProjectedZF1D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp index 64f0aa839ea..2a7b43b345e 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp @@ -22,7 +22,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char GetSteerableViewMapDensityF1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + GetSteerableViewMapDensityF1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > " ":class:`freestyle.types.UnaryFunction1DDouble` > :class:`GetSteerableViewMapDensityF1D`\n" "\n" @@ -52,7 +54,7 @@ static char GetSteerableViewMapDensityF1D___doc__[] = " :arg inter: An Interface1D object.\n" " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: The density of the ViewMap for a given Interface1D.\n" - " :rtype: float\n"; + " :rtype: float\n"); static int GetSteerableViewMapDensityF1D___init__(BPy_GetSteerableViewMapDensityF1D *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp index 541c4f7623b..83e192d2809 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp @@ -22,7 +22,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char GetViewMapGradientNormF1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + GetViewMapGradientNormF1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > " ":class:`freestyle.types.UnaryFunction1DDouble` > :class:`GetViewMapGradientNormF1D`\n" "\n" @@ -52,7 +54,7 @@ static char GetViewMapGradientNormF1D___doc__[] = " :arg inter: An Interface1D object.\n" " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: The density of the ViewMap for a given Interface1D.\n" - " :rtype: float\n"; + " :rtype: float\n"); static int GetViewMapGradientNormF1D___init__(BPy_GetViewMapGradientNormF1D *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp index ff215d0829e..375e0bb143b 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp @@ -22,7 +22,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char GetXF1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + GetXF1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > " ":class:`freestyle.types.UnaryFunction1DDouble` > :class:`GetXF1D`\n" "\n" @@ -41,7 +43,7 @@ static char GetXF1D___doc__[] = " :arg inter: An Interface1D object.\n" " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: The X 3D coordinate of the Interface1D.\n" - " :rtype: float\n"; + " :rtype: float\n"); static int GetXF1D___init__(BPy_GetXF1D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp index dba0dc924eb..6b14a51f78b 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp @@ -22,7 +22,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char GetYF1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + GetYF1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > " ":class:`freestyle.types.UnaryFunction1DDouble` > :class:`GetYF1D`\n" "\n" @@ -41,7 +43,7 @@ static char GetYF1D___doc__[] = " :arg inter: An Interface1D object.\n" " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: The Y 3D coordinate of the Interface1D.\n" - " :rtype: float\n"; + " :rtype: float\n"); static int GetYF1D___init__(BPy_GetYF1D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp index 8eb424315bf..b427facf11b 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp @@ -22,7 +22,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char GetZF1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + GetZF1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > " ":class:`freestyle.types.UnaryFunction1DDouble` > :class:`GetZF1D`\n" "\n" @@ -41,7 +43,7 @@ static char GetZF1D___doc__[] = " :arg inter: An Interface1D object.\n" " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: The Z 3D coordinate of the Interface1D.\n" - " :rtype: float\n"; + " :rtype: float\n"); static int GetZF1D___init__(BPy_GetZF1D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.cpp index 668a1ff1ae2..6ee56a71ba0 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.cpp @@ -22,7 +22,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char LocalAverageDepthF1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + LocalAverageDepthF1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > " ":class:`freestyle.types.UnaryFunction1DDouble` > :class:`LocalAverageDepthF1D`\n" "\n" @@ -48,7 +50,7 @@ static char LocalAverageDepthF1D___doc__[] = " :arg inter: An Interface1D object.\n" " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: The average depth evaluated for the Interface1D.\n" - " :rtype: float\n"; + " :rtype: float\n"); static int LocalAverageDepthF1D___init__(BPy_LocalAverageDepthF1D *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp index b8164504a1e..e86718c0413 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp @@ -22,7 +22,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char ZDiscontinuityF1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + ZDiscontinuityF1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > " ":class:`freestyle.types.UnaryFunction1DDouble` > :class:`ZDiscontinuityF1D`\n" "\n" @@ -45,7 +47,7 @@ static char ZDiscontinuityF1D___doc__[] = " :arg inter: An Interface1D object.\n" " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: The normalized distance between the Interface1D and the occludee.\n" - " :rtype: float\n"; + " :rtype: float\n"); static int ZDiscontinuityF1D___init__(BPy_ZDiscontinuityF1D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp index aa4a8231dc2..12238378e26 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp @@ -22,7 +22,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char QuantitativeInvisibilityF1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + QuantitativeInvisibilityF1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > " ":class:`freestyle.types.UnaryFunction1DUnsigned` > :class:`QuantitativeInvisibilityF1D`\n" "\n" @@ -45,7 +47,7 @@ static char QuantitativeInvisibilityF1D___doc__[] = " :arg inter: An Interface1D object.\n" " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: The Quantitative Invisibility of the Interface1D.\n" - " :rtype: int\n"; + " :rtype: int\n"); static int QuantitativeInvisibilityF1D___init__(BPy_QuantitativeInvisibilityF1D *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp index affed2bc932..2d26edcf229 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp @@ -22,7 +22,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char GetOccludeeF1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + GetOccludeeF1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > " ":class:`freestyle.types.UnaryFunction1DVectorViewShape` > :class:`GetOccludeeF1D`\n" "\n" @@ -37,7 +39,7 @@ static char GetOccludeeF1D___doc__[] = " :arg inter: An Interface1D object.\n" " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: A list of occluded shapes covered by the Interface1D.\n" - " :rtype: list of :class:`freestyle.types.ViewShape` objects\n"; + " :rtype: list of :class:`freestyle.types.ViewShape` objects\n"); static int GetOccludeeF1D___init__(BPy_GetOccludeeF1D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp index b2e76d58fbc..35e8b70f69f 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp @@ -22,7 +22,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char GetOccludersF1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + GetOccludersF1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > " ":class:`freestyle.types.UnaryFunction1DVectorViewShape` > :class:`GetOccludersF1D`\n" "\n" @@ -37,7 +39,7 @@ static char GetOccludersF1D___doc__[] = " :arg inter: An Interface1D object.\n" " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: A list of occluding shapes that cover the Interface1D.\n" - " :rtype: list of :class:`freestyle.types.ViewShape` objects\n"; + " :rtype: list of :class:`freestyle.types.ViewShape` objects\n"); static int GetOccludersF1D___init__(BPy_GetOccludersF1D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp index f46d1b78c18..fd118b7db99 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp @@ -22,7 +22,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char GetShapeF1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + GetShapeF1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > " ":class:`freestyle.types.UnaryFunction1DVectorViewShape` > :class:`GetShapeF1D`\n" "\n" @@ -37,7 +39,7 @@ static char GetShapeF1D___doc__[] = " :arg inter: An Interface1D object.\n" " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: A list of shapes covered by the Interface1D.\n" - " :rtype: list of :class:`freestyle.types.ViewShape` objects\n"; + " :rtype: list of :class:`freestyle.types.ViewShape` objects\n"); static int GetShapeF1D___init__(BPy_GetShapeF1D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp index cc1b0d56d3f..315f1511513 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp @@ -22,7 +22,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char ChainingTimeStampF1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + ChainingTimeStampF1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > " ":class:`freestyle.types.UnaryFunction1DVoid` > :class:`ChainingTimeStampF1D`\n" "\n" @@ -35,7 +37,7 @@ static char ChainingTimeStampF1D___doc__[] = " Sets the chaining time stamp of the Interface1D.\n" "\n" " :arg inter: An Interface1D object.\n" - " :type inter: :class:`freestyle.types.Interface1D`\n"; + " :type inter: :class:`freestyle.types.Interface1D`\n"); static int ChainingTimeStampF1D___init__(BPy_ChainingTimeStampF1D *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp index 00dcdf063f8..2854afc831e 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp @@ -22,7 +22,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char IncrementChainingTimeStampF1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + IncrementChainingTimeStampF1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > " ":class:`freestyle.types.UnaryFunction1DVoid` > :class:`IncrementChainingTimeStampF1D`\n" "\n" @@ -35,7 +37,7 @@ static char IncrementChainingTimeStampF1D___doc__[] = " Increments the chaining time stamp of the Interface1D.\n" "\n" " :arg inter: An Interface1D object.\n" - " :type inter: :class:`freestyle.types.Interface1D`\n"; + " :type inter: :class:`freestyle.types.Interface1D`\n"); static int IncrementChainingTimeStampF1D___init__(BPy_IncrementChainingTimeStampF1D *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp index c9a08224aa4..407d0147c8d 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp @@ -22,7 +22,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char TimeStampF1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + TimeStampF1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > " ":class:`freestyle.types.UnaryFunction1DVoid` > :class:`TimeStampF1D`\n" "\n" @@ -35,7 +37,7 @@ static char TimeStampF1D___doc__[] = " Returns the time stamp of the Interface1D.\n" "\n" " :arg inter: An Interface1D object.\n" - " :type inter: :class:`freestyle.types.Interface1D`\n"; + " :type inter: :class:`freestyle.types.Interface1D`\n"); static int TimeStampF1D___init__(BPy_TimeStampF1D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp index a8ccc3d6cd0..bdf0af073a8 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp @@ -18,7 +18,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char FalseUP0D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + FalseUP0D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryPredicate0D` > :class:`FalseUP0D`\n" "\n" ".. method:: __call__(it)\n" @@ -28,7 +30,7 @@ static char FalseUP0D___doc__[] = " :arg it: An Interface0DIterator object.\n" " :type it: :class:`freestyle.types.Interface0DIterator`\n" " :return: False.\n" - " :rtype: bool\n"; + " :rtype: bool\n"); static int FalseUP0D___init__(BPy_FalseUP0D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp index 10afe744f2b..1c4b38b4810 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp @@ -18,7 +18,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char TrueUP0D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + TrueUP0D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryPredicate0D` > :class:`TrueUP0D`\n" "\n" ".. method:: __call__(it)\n" @@ -28,7 +30,7 @@ static char TrueUP0D___doc__[] = " :arg it: An Interface0DIterator object.\n" " :type it: :class:`freestyle.types.Interface0DIterator`\n" " :return: True.\n" - " :rtype: bool\n"; + " :rtype: bool\n"); static int TrueUP0D___init__(BPy_TrueUP0D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp index 23f8cad7645..d7756dbdfb0 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp @@ -18,7 +18,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char ContourUP1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + ContourUP1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryPredicate1D` > :class:`ContourUP1D`\n" "\n" ".. method:: __call__(inter)\n" @@ -29,7 +31,7 @@ static char ContourUP1D___doc__[] = " :arg inter: An Interface1D object.\n" " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: True if the Interface1D is a contour, false otherwise.\n" - " :rtype: bool\n"; + " :rtype: bool\n"); static int ContourUP1D___init__(BPy_ContourUP1D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp index ea218c4ca0d..40a0601f29a 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char DensityLowerThanUP1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + DensityLowerThanUP1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryPredicate1D` > :class:`DensityLowerThanUP1D`\n" "\n" ".. method:: __init__(threshold, sigma=2.0)\n" @@ -42,7 +44,7 @@ static char DensityLowerThanUP1D___doc__[] = " :arg inter: An Interface1D object.\n" " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: True if the density is lower than a threshold.\n" - " :rtype: bool\n"; + " :rtype: bool\n"); static int DensityLowerThanUP1D___init__(BPy_DensityLowerThanUP1D *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp index 65c7635f2a3..5f7181fe5cd 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char EqualToChainingTimeStampUP1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + EqualToChainingTimeStampUP1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryPredicate1D` > " ":class:`freestyle.types.EqualToChainingTimeStampUP1D`\n" "\n" @@ -39,7 +41,7 @@ static char EqualToChainingTimeStampUP1D___doc__[] = " :arg inter: An Interface1D object.\n" " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: True if the time stamp is equal to a user-defined value.\n" - " :rtype: bool\n"; + " :rtype: bool\n"); static int EqualToChainingTimeStampUP1D___init__(BPy_EqualToChainingTimeStampUP1D *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp index 429b31b070b..d57d916dbc6 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char EqualToTimeStampUP1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + EqualToTimeStampUP1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryPredicate1D` > :class:`EqualToTimeStampUP1D`\n" "\n" ".. method:: __init__(ts)\n" @@ -38,7 +40,7 @@ static char EqualToTimeStampUP1D___doc__[] = " :arg inter: An Interface1D object.\n" " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: True if the time stamp is equal to a user-defined value.\n" - " :rtype: bool\n"; + " :rtype: bool\n"); static int EqualToTimeStampUP1D___init__(BPy_EqualToTimeStampUP1D *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp index e0a27c11606..5813d4b9cae 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp @@ -18,7 +18,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char ExternalContourUP1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + ExternalContourUP1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryPredicate1D` > :class:`ExternalContourUP1D`\n" "\n" ".. method:: __call__(inter)\n" @@ -31,7 +33,7 @@ static char ExternalContourUP1D___doc__[] = " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: True if the Interface1D is an external contour, false\n" " otherwise.\n" - " :rtype: bool\n"; + " :rtype: bool\n"); static int ExternalContourUP1D___init__(BPy_ExternalContourUP1D *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp index 9bc1696e549..3b7ec2bbdad 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp @@ -18,7 +18,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char FalseUP1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + FalseUP1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryPredicate1D` > :class:`FalseUP1D`\n" "\n" ".. method:: __call__(inter)\n" @@ -28,7 +30,7 @@ static char FalseUP1D___doc__[] = " :arg inter: An Interface1D object.\n" " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: False.\n" - " :rtype: bool\n"; + " :rtype: bool\n"); static int FalseUP1D___init__(BPy_FalseUP1D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp index 65d38ecb968..3b0c0e57d98 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp @@ -18,7 +18,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char QuantitativeInvisibilityUP1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + QuantitativeInvisibilityUP1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryPredicate1D` > " ":class:`QuantitativeInvisibilityUP1D`\n" "\n" @@ -41,7 +43,7 @@ static char QuantitativeInvisibilityUP1D___doc__[] = " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: True if Quantitative Invisibility equals a user-defined\n" " value.\n" - " :rtype: bool\n"; + " :rtype: bool\n"); static int QuantitativeInvisibilityUP1D___init__(BPy_QuantitativeInvisibilityUP1D *self, PyObject *args, diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp index b7c3004acb8..c48b5e798da 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp @@ -20,7 +20,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char ShapeUP1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + ShapeUP1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryPredicate1D` > :class:`ShapeUP1D`\n" "\n" ".. method:: __init__(first, second=0)\n" @@ -41,7 +43,7 @@ static char ShapeUP1D___doc__[] = " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: True if Interface1D belongs to the shape of the\n" " user-specified Id.\n" - " :rtype: bool\n"; + " :rtype: bool\n"); static int ShapeUP1D___init__(BPy_ShapeUP1D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp index 241bda83fde..d9e3923052b 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp @@ -18,7 +18,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char TrueUP1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + TrueUP1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryPredicate1D` > :class:`TrueUP1D`\n" "\n" ".. method:: __call__(inter)\n" @@ -28,7 +30,7 @@ static char TrueUP1D___doc__[] = " :arg inter: An Interface1D object.\n" " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: True.\n" - " :rtype: bool\n"; + " :rtype: bool\n"); static int TrueUP1D___init__(BPy_TrueUP1D *self, PyObject *args, PyObject *kwds) { diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp index 27e54f8d2d1..b0d5dda815c 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp @@ -18,7 +18,9 @@ using namespace Freestyle; //------------------------INSTANCE METHODS ---------------------------------- -static char WithinImageBoundaryUP1D___doc__[] = +PyDoc_STRVAR( + /* Wrap. */ + WithinImageBoundaryUP1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryPredicate1D` > " ":class:`WithinImageBoundaryUP1D`\n" "\n" @@ -37,7 +39,7 @@ static char WithinImageBoundaryUP1D___doc__[] = "\n" ".. method:: __call__(inter)\n" "\n" - " Returns true if the Interface1D intersects with image boundary.\n"; + " Returns true if the Interface1D intersects with image boundary.\n"); static int WithinImageBoundaryUP1D___init__(BPy_WithinImageBoundaryUP1D *self, PyObject *args, diff --git a/source/blender/python/bmesh/bmesh_py_api.cc b/source/blender/python/bmesh/bmesh_py_api.cc index 7f25973fda2..b6fa0453e05 100644 --- a/source/blender/python/bmesh/bmesh_py_api.cc +++ b/source/blender/python/bmesh/bmesh_py_api.cc @@ -31,14 +31,16 @@ #include "bmesh_py_api.h" /* own include */ -PyDoc_STRVAR(bpy_bm_new_doc, - ".. method:: new(use_operators=True)\n" - "\n" - " :arg use_operators: Support calling operators in :mod:`bmesh.ops` (uses some " - "extra memory per vert/edge/face).\n" - " :type use_operators: bool\n" - " :return: Return a new, empty BMesh.\n" - " :rtype: :class:`bmesh.types.BMesh`\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bm_new_doc, + ".. method:: new(use_operators=True)\n" + "\n" + " :arg use_operators: Support calling operators in :mod:`bmesh.ops` (uses some " + "extra memory per vert/edge/face).\n" + " :type use_operators: bool\n" + " :return: Return a new, empty BMesh.\n" + " :rtype: :class:`bmesh.types.BMesh`\n"); static PyObject *bpy_bm_new(PyObject * /*self*/, PyObject *args, PyObject *kw) { @@ -60,15 +62,17 @@ static PyObject *bpy_bm_new(PyObject * /*self*/, PyObject *args, PyObject *kw) return BPy_BMesh_CreatePyObject(bm, BPY_BMFLAG_NOP); } -PyDoc_STRVAR(bpy_bm_from_edit_mesh_doc, - ".. method:: from_edit_mesh(mesh)\n" - "\n" - " Return a BMesh from this mesh, currently the mesh must already be in editmode.\n" - "\n" - " :arg mesh: The editmode mesh.\n" - " :type mesh: :class:`bpy.types.Mesh`\n" - " :return: the BMesh associated with this mesh.\n" - " :rtype: :class:`bmesh.types.BMesh`\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bm_from_edit_mesh_doc, + ".. method:: from_edit_mesh(mesh)\n" + "\n" + " Return a BMesh from this mesh, currently the mesh must already be in editmode.\n" + "\n" + " :arg mesh: The editmode mesh.\n" + " :type mesh: :class:`bpy.types.Mesh`\n" + " :return: the BMesh associated with this mesh.\n" + " :rtype: :class:`bmesh.types.BMesh`\n"); static PyObject *bpy_bm_from_edit_mesh(PyObject * /*self*/, PyObject *value) { BMesh *bm; @@ -90,18 +94,20 @@ static PyObject *bpy_bm_from_edit_mesh(PyObject * /*self*/, PyObject *value) void EDBM_update_extern(Mesh *mesh, const bool do_tessface, const bool is_destructive); -PyDoc_STRVAR(bpy_bm_update_edit_mesh_doc, - ".. method:: update_edit_mesh(mesh, loop_triangles=True, destructive=True)\n" - "\n" - " Update the mesh after changes to the BMesh in editmode,\n" - " optionally recalculating n-gon tessellation.\n" - "\n" - " :arg mesh: The editmode mesh.\n" - " :type mesh: :class:`bpy.types.Mesh`\n" - " :arg loop_triangles: Option to recalculate n-gon tessellation.\n" - " :type loop_triangles: boolean\n" - " :arg destructive: Use when geometry has been added or removed.\n" - " :type destructive: boolean\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bm_update_edit_mesh_doc, + ".. method:: update_edit_mesh(mesh, loop_triangles=True, destructive=True)\n" + "\n" + " Update the mesh after changes to the BMesh in editmode,\n" + " optionally recalculating n-gon tessellation.\n" + "\n" + " :arg mesh: The editmode mesh.\n" + " :type mesh: :class:`bpy.types.Mesh`\n" + " :arg loop_triangles: Option to recalculate n-gon tessellation.\n" + " :type loop_triangles: boolean\n" + " :arg destructive: Use when geometry has been added or removed.\n" + " :type destructive: boolean\n"); static PyObject *bpy_bm_update_edit_mesh(PyObject * /*self*/, PyObject *args, PyObject *kw) { static const char *kwlist[] = {"mesh", "loop_triangles", "destructive", nullptr}; @@ -160,10 +166,12 @@ static PyMethodDef BPy_BM_methods[] = { # pragma GCC diagnostic pop #endif -PyDoc_STRVAR(BPy_BM_doc, - "This module provides access to blenders bmesh data structures.\n" - "\n" - ".. include:: include__bmesh.rst\n"); +PyDoc_STRVAR( + /* Wrap. */ + BPy_BM_doc, + "This module provides access to blenders bmesh data structures.\n" + "\n" + ".. include:: include__bmesh.rst\n"); static PyModuleDef BPy_BM_module_def = { /*m_base*/ PyModuleDef_HEAD_INIT, /*m_name*/ "bmesh", diff --git a/source/blender/python/bmesh/bmesh_py_geometry.cc b/source/blender/python/bmesh/bmesh_py_geometry.cc index 3691d64add2..d383c8cd482 100644 --- a/source/blender/python/bmesh/bmesh_py_geometry.cc +++ b/source/blender/python/bmesh/bmesh_py_geometry.cc @@ -19,17 +19,19 @@ #include "bmesh_py_geometry.h" /* own include */ #include "bmesh_py_types.h" -PyDoc_STRVAR(bpy_bm_geometry_intersect_face_point_doc, - ".. method:: intersect_face_point(face, point)\n" - "\n" - " Tests if the projection of a point is inside a face (using the face's normal).\n" - "\n" - " :arg face: The face to test.\n" - " :type face: :class:`bmesh.types.BMFace`\n" - " :arg point: The point to test.\n" - " :type point: float triplet\n" - " :return: True when the projection of the point is in the face.\n" - " :rtype: bool\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bm_geometry_intersect_face_point_doc, + ".. method:: intersect_face_point(face, point)\n" + "\n" + " Tests if the projection of a point is inside a face (using the face's normal).\n" + "\n" + " :arg face: The face to test.\n" + " :type face: :class:`bmesh.types.BMFace`\n" + " :arg point: The point to test.\n" + " :type point: float triplet\n" + " :return: True when the projection of the point is in the face.\n" + " :rtype: bool\n"); static PyObject *bpy_bm_geometry_intersect_face_point(BPy_BMFace * /*self*/, PyObject *args) { BPy_BMFace *py_face; @@ -59,8 +61,10 @@ static PyMethodDef BPy_BM_geometry_methods[] = { {nullptr, nullptr, 0, nullptr}, }; -PyDoc_STRVAR(BPy_BM_utils_doc, - "This module provides access to bmesh geometry evaluation functions."); +PyDoc_STRVAR( + /* Wrap. */ + BPy_BM_utils_doc, + "This module provides access to bmesh geometry evaluation functions."); static PyModuleDef BPy_BM_geometry_module_def = { /*m_base*/ PyModuleDef_HEAD_INIT, /*m_name*/ "bmesh.geometry", diff --git a/source/blender/python/bmesh/bmesh_py_ops.cc b/source/blender/python/bmesh/bmesh_py_ops.cc index 7370e9be880..c0653d7bf0f 100644 --- a/source/blender/python/bmesh/bmesh_py_ops.cc +++ b/source/blender/python/bmesh/bmesh_py_ops.cc @@ -242,7 +242,10 @@ static PyMethodDef BPy_BM_ops_methods[] = { # pragma GCC diagnostic pop #endif -PyDoc_STRVAR(BPy_BM_ops_doc, "Access to BMesh operators"); +PyDoc_STRVAR( + /* Wrap. */ + BPy_BM_ops_doc, + "Access to BMesh operators"); static PyModuleDef BPy_BM_ops_module_def = { /*m_base*/ PyModuleDef_HEAD_INIT, /*m_name*/ "bmesh.ops", diff --git a/source/blender/python/bmesh/bmesh_py_types.cc b/source/blender/python/bmesh/bmesh_py_types.cc index 5c3ffca4ca3..57c3fea6c19 100644 --- a/source/blender/python/bmesh/bmesh_py_types.cc +++ b/source/blender/python/bmesh/bmesh_py_types.cc @@ -89,12 +89,36 @@ PyC_FlagSet bpy_bm_hflag_all_flags[] = { /* bmesh elems * ----------- */ -PyDoc_STRVAR(bpy_bm_elem_select_doc, "Selected state of this element.\n\n:type: boolean"); -PyDoc_STRVAR(bpy_bm_elem_hide_doc, "Hidden state of this element.\n\n:type: boolean"); -PyDoc_STRVAR(bpy_bm_elem_tag_doc, - "Generic attribute scripts can use for own logic\n\n:type: boolean"); -PyDoc_STRVAR(bpy_bm_elem_smooth_doc, "Smooth state of this element.\n\n:type: boolean"); -PyDoc_STRVAR(bpy_bm_elem_seam_doc, "Seam for UV unwrapping.\n\n:type: boolean"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bm_elem_select_doc, + "Selected state of this element.\n" + "\n" + ":type: boolean"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bm_elem_hide_doc, + "Hidden state of this element.\n" + "\n" + ":type: boolean"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bm_elem_tag_doc, + "Generic attribute scripts can use for own logic\n" + "\n" + ":type: boolean"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bm_elem_smooth_doc, + "Smooth state of this element.\n" + "\n" + ":type: boolean"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bm_elem_seam_doc, + "Seam for UV unwrapping.\n" + "\n" + ":type: boolean"); static PyObject *bpy_bm_elem_hflag_get(BPy_BMElem *self, void *flag) { @@ -126,6 +150,7 @@ static int bpy_bm_elem_hflag_set(BPy_BMElem *self, PyObject *value, void *flag) } PyDoc_STRVAR( + /* Wrap. */ bpy_bm_elem_index_doc, "Index of this element.\n" "\n" @@ -172,36 +197,52 @@ static int bpy_bm_elem_index_set(BPy_BMElem *self, PyObject *value, void * /*fla /* doc-strings for all uses of this function */ -PyDoc_STRVAR(bpy_bmvertseq_doc, - "This meshes vert sequence (read-only).\n\n:type: :class:`BMVertSeq`"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmvertseq_doc, + "This meshes vert sequence (read-only).\n" + "\n" + ":type: :class:`BMVertSeq`"); static PyObject *bpy_bmvertseq_get(BPy_BMesh *self, void * /*closure*/) { BPY_BM_CHECK_OBJ(self); return BPy_BMVertSeq_CreatePyObject(self->bm); } -PyDoc_STRVAR(bpy_bmedgeseq_doc, - "This meshes edge sequence (read-only).\n\n:type: :class:`BMEdgeSeq`"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmedgeseq_doc, + "This meshes edge sequence (read-only).\n" + "\n" + ":type: :class:`BMEdgeSeq`"); static PyObject *bpy_bmedgeseq_get(BPy_BMesh *self, void * /*closure*/) { BPY_BM_CHECK_OBJ(self); return BPy_BMEdgeSeq_CreatePyObject(self->bm); } -PyDoc_STRVAR(bpy_bmfaceseq_doc, - "This meshes face sequence (read-only).\n\n:type: :class:`BMFaceSeq`"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmfaceseq_doc, + "This meshes face sequence (read-only).\n" + "\n" + ":type: :class:`BMFaceSeq`"); static PyObject *bpy_bmfaceseq_get(BPy_BMesh *self, void * /*closure*/) { BPY_BM_CHECK_OBJ(self); return BPy_BMFaceSeq_CreatePyObject(self->bm); } -PyDoc_STRVAR(bpy_bmloopseq_doc, - "This meshes loops (read-only).\n\n:type: :class:`BMLoopSeq`\n" - "\n" - ".. note::\n" - "\n" - " Loops must be accessed via faces, this is only exposed for layer access.\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmloopseq_doc, + "This meshes loops (read-only).\n" + "\n" + ":type: :class:`BMLoopSeq`\n" + "\n" + ".. note::\n" + "\n" + " Loops must be accessed via faces, this is only exposed for layer access.\n"); static PyObject *bpy_bmloopseq_get(BPy_BMesh *self, void * /*closure*/) { BPY_BM_CHECK_OBJ(self); @@ -209,36 +250,58 @@ static PyObject *bpy_bmloopseq_get(BPy_BMesh *self, void * /*closure*/) } /* vert */ -PyDoc_STRVAR( - bpy_bmvert_link_edges_doc, - "Edges connected to this vertex (read-only).\n\n:type: :class:`BMElemSeq` of :class:`BMEdge`"); -PyDoc_STRVAR( - bpy_bmvert_link_faces_doc, - "Faces connected to this vertex (read-only).\n\n:type: :class:`BMElemSeq` of :class:`BMFace`"); -PyDoc_STRVAR( - bpy_bmvert_link_loops_doc, - "Loops that use this vertex (read-only).\n\n:type: :class:`BMElemSeq` of :class:`BMLoop`"); +PyDoc_STRVAR(bpy_bmvert_link_edges_doc, + "Edges connected to this vertex (read-only).\n" + "\n" + ":type: :class:`BMElemSeq` of :class:`BMEdge`"); +PyDoc_STRVAR(bpy_bmvert_link_faces_doc, + "Faces connected to this vertex (read-only).\n" + "\n" + ":type: :class:`BMElemSeq` of :class:`BMFace`"); +PyDoc_STRVAR(bpy_bmvert_link_loops_doc, + "Loops that use this vertex (read-only).\n" + "\n" + ":type: :class:`BMElemSeq` of :class:`BMLoop`"); /* edge */ -PyDoc_STRVAR(bpy_bmedge_verts_doc, - "Verts this edge uses (always 2), (read-only).\n\n:type: :class:`BMElemSeq` of " - ":class:`BMVert`"); PyDoc_STRVAR( - bpy_bmedge_link_faces_doc, - "Faces connected to this edge, (read-only).\n\n:type: :class:`BMElemSeq` of :class:`BMFace`"); -PyDoc_STRVAR( - bpy_bmedge_link_loops_doc, - "Loops connected to this edge, (read-only).\n\n:type: :class:`BMElemSeq` of :class:`BMLoop`"); + /* Wrap. */ + bpy_bmedge_verts_doc, + "Verts this edge uses (always 2), (read-only).\n" + "\n" + ":type: :class:`BMElemSeq` of " + ":class:`BMVert`"); +PyDoc_STRVAR(bpy_bmedge_link_faces_doc, + "Faces connected to this edge, (read-only).\n" + "\n" + ":type: :class:`BMElemSeq` of :class:`BMFace`"); +PyDoc_STRVAR(bpy_bmedge_link_loops_doc, + "Loops connected to this edge, (read-only).\n" + "\n" + ":type: :class:`BMElemSeq` of :class:`BMLoop`"); /* face */ -PyDoc_STRVAR(bpy_bmface_verts_doc, - "Verts of this face, (read-only).\n\n:type: :class:`BMElemSeq` of :class:`BMVert`"); -PyDoc_STRVAR(bpy_bmface_edges_doc, - "Edges of this face, (read-only).\n\n:type: :class:`BMElemSeq` of :class:`BMEdge`"); -PyDoc_STRVAR(bpy_bmface_loops_doc, - "Loops of this face, (read-only).\n\n:type: :class:`BMElemSeq` of :class:`BMLoop`"); -/* loop */ PyDoc_STRVAR( - bpy_bmloops_link_loops_doc, - "Loops connected to this loop, (read-only).\n\n:type: :class:`BMElemSeq` of :class:`BMLoop`"); + /* Wrap. */ + bpy_bmface_verts_doc, + "Verts of this face, (read-only).\n" + "\n" + ":type: :class:`BMElemSeq` of :class:`BMVert`"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmface_edges_doc, + "Edges of this face, (read-only).\n" + "\n" + ":type: :class:`BMElemSeq` of :class:`BMEdge`"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmface_loops_doc, + "Loops of this face, (read-only).\n" + "\n" + ":type: :class:`BMElemSeq` of :class:`BMLoop`"); +/* loop */ +PyDoc_STRVAR(bpy_bmloops_link_loops_doc, + "Loops connected to this loop, (read-only).\n" + "\n" + ":type: :class:`BMElemSeq` of :class:`BMLoop`"); static PyObject *bpy_bmelemseq_elem_get(BPy_BMElem *self, void *itype) { @@ -246,16 +309,21 @@ static PyObject *bpy_bmelemseq_elem_get(BPy_BMElem *self, void *itype) return BPy_BMElemSeq_CreatePyObject(self->bm, self, POINTER_AS_INT(itype)); } -PyDoc_STRVAR(bpy_bm_is_valid_doc, - "True when this element is valid (hasn't been removed).\n\n:type: boolean"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bm_is_valid_doc, + "True when this element is valid (hasn't been removed).\n" + "\n" + ":type: boolean"); static PyObject *bpy_bm_is_valid_get(BPy_BMGeneric *self, void * /*closure*/) { return PyBool_FromLong(BPY_BM_IS_VALID(self)); } -PyDoc_STRVAR( - bpy_bmesh_is_wrapped_doc, - "True when this mesh is owned by blender (typically the editmode BMesh).\n\n:type: boolean"); +PyDoc_STRVAR(bpy_bmesh_is_wrapped_doc, + "True when this mesh is owned by blender (typically the editmode BMesh).\n" + "\n" + ":type: boolean"); static PyObject *bpy_bmesh_is_wrapped_get(BPy_BMesh *self, void * /*closure*/) { BPY_BM_CHECK_OBJ(self); @@ -263,9 +331,12 @@ static PyObject *bpy_bmesh_is_wrapped_get(BPy_BMesh *self, void * /*closure*/) return PyBool_FromLong(self->flag & BPY_BMFLAG_IS_WRAPPED); } -PyDoc_STRVAR(bpy_bmesh_select_mode_doc, - "The selection mode, values can be {'VERT', 'EDGE', 'FACE'}, can't be assigned an " - "empty set.\n\n:type: set"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmesh_select_mode_doc, + "The selection mode, values can be {'VERT', 'EDGE', 'FACE'}, can't be assigned an empty set.\n" + "\n" + ":type: set"); static PyObject *bpy_bmesh_select_mode_get(BPy_BMesh *self, void * /*closure*/) { BPY_BM_CHECK_OBJ(self); @@ -292,9 +363,13 @@ static int bpy_bmesh_select_mode_set(BPy_BMesh *self, PyObject *value, void * /* return 0; } -PyDoc_STRVAR(bpy_bmesh_select_history_doc, - "Sequence of selected items (the last is displayed as active).\n\n:type: " - ":class:`BMEditSelSeq`"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmesh_select_history_doc, + "Sequence of selected items (the last is displayed as active).\n" + "\n" + ":type: " + ":class:`BMEditSelSeq`"); static PyObject *bpy_bmesh_select_history_get(BPy_BMesh *self, void * /*closure*/) { BPY_BM_CHECK_OBJ(self); @@ -312,9 +387,13 @@ static int bpy_bmesh_select_history_set(BPy_BMesh *self, PyObject *value, void * /* Vert * ^^^^ */ -PyDoc_STRVAR(bpy_bmvert_co_doc, - "The coordinates for this vertex as a 3D, wrapped vector.\n\n:type: " - ":class:`mathutils.Vector`"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmvert_co_doc, + "The coordinates for this vertex as a 3D, wrapped vector.\n" + "\n" + ":type: " + ":class:`mathutils.Vector`"); static PyObject *bpy_bmvert_co_get(BPy_BMVert *self, void * /*closure*/) { BPY_BM_CHECK_OBJ(self); @@ -332,9 +411,10 @@ static int bpy_bmvert_co_set(BPy_BMVert *self, PyObject *value, void * /*closure return -1; } -PyDoc_STRVAR( - bpy_bmvert_normal_doc, - "The normal for this vertex as a 3D, wrapped vector.\n\n:type: :class:`mathutils.Vector`"); +PyDoc_STRVAR(bpy_bmvert_normal_doc, + "The normal for this vertex as a 3D, wrapped vector.\n" + "\n" + ":type: :class:`mathutils.Vector`"); static PyObject *bpy_bmvert_normal_get(BPy_BMVert *self, void * /*closure*/) { BPY_BM_CHECK_OBJ(self); @@ -352,25 +432,34 @@ static int bpy_bmvert_normal_set(BPy_BMVert *self, PyObject *value, void * /*clo return -1; } -PyDoc_STRVAR(bpy_bmvert_is_manifold_doc, - "True when this vertex is manifold (read-only).\n\n:type: boolean"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmvert_is_manifold_doc, + "True when this vertex is manifold (read-only).\n" + "\n" + ":type: boolean"); static PyObject *bpy_bmvert_is_manifold_get(BPy_BMVert *self, void * /*closure*/) { BPY_BM_CHECK_OBJ(self); return PyBool_FromLong(BM_vert_is_manifold(self->v)); } -PyDoc_STRVAR(bpy_bmvert_is_wire_doc, - "True when this vertex is not connected to any faces (read-only).\n\n:type: boolean"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmvert_is_wire_doc, + "True when this vertex is not connected to any faces (read-only).\n" + "\n" + ":type: boolean"); static PyObject *bpy_bmvert_is_wire_get(BPy_BMVert *self, void * /*closure*/) { BPY_BM_CHECK_OBJ(self); return PyBool_FromLong(BM_vert_is_wire(self->v)); } -PyDoc_STRVAR( - bpy_bmvert_is_boundary_doc, - "True when this vertex is connected to boundary edges (read-only).\n\n:type: boolean"); +PyDoc_STRVAR(bpy_bmvert_is_boundary_doc, + "True when this vertex is connected to boundary edges (read-only).\n" + "\n" + ":type: boolean"); static PyObject *bpy_bmvert_is_boundary_get(BPy_BMVert *self, void * /*closure*/) { BPY_BM_CHECK_OBJ(self); @@ -380,42 +469,61 @@ static PyObject *bpy_bmvert_is_boundary_get(BPy_BMVert *self, void * /*closure*/ /* Edge * ^^^^ */ -PyDoc_STRVAR(bpy_bmedge_is_manifold_doc, - "True when this edge is manifold (read-only).\n\n:type: boolean"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmedge_is_manifold_doc, + "True when this edge is manifold (read-only).\n" + "\n" + ":type: boolean"); static PyObject *bpy_bmedge_is_manifold_get(BPy_BMEdge *self, void * /*closure*/) { BPY_BM_CHECK_OBJ(self); return PyBool_FromLong(BM_edge_is_manifold(self->e)); } -PyDoc_STRVAR(bpy_bmedge_is_contiguous_doc, - "True when this edge is manifold, between two faces with the same winding " - "(read-only).\n\n:type: boolean"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmedge_is_contiguous_doc, + "True when this edge is manifold, between two faces with the same winding " + "(read-only).\n" + "\n" + ":type: boolean"); static PyObject *bpy_bmedge_is_contiguous_get(BPy_BMEdge *self, void * /*closure*/) { BPY_BM_CHECK_OBJ(self); return PyBool_FromLong(BM_edge_is_contiguous(self->e)); } -PyDoc_STRVAR(bpy_bmedge_is_convex_doc, - "True when this edge joins two convex faces, depends on a valid face normal " - "(read-only).\n\n:type: boolean"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmedge_is_convex_doc, + "True when this edge joins two convex faces, depends on a valid face normal (read-only).\n" + "\n" + ":type: boolean"); static PyObject *bpy_bmedge_is_convex_get(BPy_BMEdge *self, void * /*closure*/) { BPY_BM_CHECK_OBJ(self); return PyBool_FromLong(BM_edge_is_convex(self->e)); } -PyDoc_STRVAR(bpy_bmedge_is_wire_doc, - "True when this edge is not connected to any faces (read-only).\n\n:type: boolean"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmedge_is_wire_doc, + "True when this edge is not connected to any faces (read-only).\n" + "\n" + ":type: boolean"); static PyObject *bpy_bmedge_is_wire_get(BPy_BMEdge *self, void * /*closure*/) { BPY_BM_CHECK_OBJ(self); return PyBool_FromLong(BM_edge_is_wire(self->e)); } -PyDoc_STRVAR(bpy_bmedge_is_boundary_doc, - "True when this edge is at the boundary of a face (read-only).\n\n:type: boolean"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmedge_is_boundary_doc, + "True when this edge is at the boundary of a face (read-only).\n" + "\n" + ":type: boolean"); static PyObject *bpy_bmedge_is_boundary_get(BPy_BMEdge *self, void * /*closure*/) { BPY_BM_CHECK_OBJ(self); @@ -425,9 +533,10 @@ static PyObject *bpy_bmedge_is_boundary_get(BPy_BMEdge *self, void * /*closure*/ /* Face * ^^^^ */ -PyDoc_STRVAR( - bpy_bmface_normal_doc, - "The normal for this face as a 3D, wrapped vector.\n\n:type: :class:`mathutils.Vector`"); +PyDoc_STRVAR(bpy_bmface_normal_doc, + "The normal for this face as a 3D, wrapped vector.\n" + "\n" + ":type: :class:`mathutils.Vector`"); static PyObject *bpy_bmface_normal_get(BPy_BMFace *self, void * /*closure*/) { BPY_BM_CHECK_OBJ(self); @@ -445,7 +554,12 @@ static int bpy_bmface_normal_set(BPy_BMFace *self, PyObject *value, void * /*clo return -1; } -PyDoc_STRVAR(bpy_bmface_material_index_doc, "The face's material index.\n\n:type: int"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmface_material_index_doc, + "The face's material index.\n" + "\n" + ":type: int"); static PyObject *bpy_bmface_material_index_get(BPy_BMFace *self, void * /*closure*/) { BPY_BM_CHECK_OBJ(self); @@ -476,65 +590,95 @@ static int bpy_bmface_material_index_set(BPy_BMFace *self, PyObject *value, void /* Loop * ^^^^ */ -PyDoc_STRVAR(bpy_bmloop_vert_doc, "The loop's vertex (read-only).\n\n:type: :class:`BMVert`"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmloop_vert_doc, + "The loop's vertex (read-only).\n" + "\n" + ":type: :class:`BMVert`"); static PyObject *bpy_bmloop_vert_get(BPy_BMLoop *self, void * /*closure*/) { BPY_BM_CHECK_OBJ(self); return BPy_BMVert_CreatePyObject(self->bm, self->l->v); } -PyDoc_STRVAR( - bpy_bmloop_edge_doc, - "The loop's edge (between this loop and the next), (read-only).\n\n:type: :class:`BMEdge`"); +PyDoc_STRVAR(bpy_bmloop_edge_doc, + "The loop's edge (between this loop and the next), (read-only).\n" + "\n" + ":type: :class:`BMEdge`"); static PyObject *bpy_bmloop_edge_get(BPy_BMLoop *self, void * /*closure*/) { BPY_BM_CHECK_OBJ(self); return BPy_BMEdge_CreatePyObject(self->bm, self->l->e); } -PyDoc_STRVAR(bpy_bmloop_face_doc, - "The face this loop makes (read-only).\n\n:type: :class:`BMFace`"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmloop_face_doc, + "The face this loop makes (read-only).\n" + "\n" + ":type: :class:`BMFace`"); static PyObject *bpy_bmloop_face_get(BPy_BMLoop *self, void * /*closure*/) { BPY_BM_CHECK_OBJ(self); return BPy_BMFace_CreatePyObject(self->bm, self->l->f); } -PyDoc_STRVAR(bpy_bmloop_link_loop_next_doc, - "The next face corner (read-only).\n\n:type: :class:`BMLoop`"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmloop_link_loop_next_doc, + "The next face corner (read-only).\n" + "\n" + ":type: :class:`BMLoop`"); static PyObject *bpy_bmloop_link_loop_next_get(BPy_BMLoop *self, void * /*closure*/) { BPY_BM_CHECK_OBJ(self); return BPy_BMLoop_CreatePyObject(self->bm, self->l->next); } -PyDoc_STRVAR(bpy_bmloop_link_loop_prev_doc, - "The previous face corner (read-only).\n\n:type: :class:`BMLoop`"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmloop_link_loop_prev_doc, + "The previous face corner (read-only).\n" + "\n" + ":type: :class:`BMLoop`"); static PyObject *bpy_bmloop_link_loop_prev_get(BPy_BMLoop *self, void * /*closure*/) { BPY_BM_CHECK_OBJ(self); return BPy_BMLoop_CreatePyObject(self->bm, self->l->prev); } -PyDoc_STRVAR(bpy_bmloop_link_loop_radial_next_doc, - "The next loop around the edge (read-only).\n\n:type: :class:`BMLoop`"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmloop_link_loop_radial_next_doc, + "The next loop around the edge (read-only).\n" + "\n" + ":type: :class:`BMLoop`"); static PyObject *bpy_bmloop_link_loop_radial_next_get(BPy_BMLoop *self, void * /*closure*/) { BPY_BM_CHECK_OBJ(self); return BPy_BMLoop_CreatePyObject(self->bm, self->l->radial_next); } -PyDoc_STRVAR(bpy_bmloop_link_loop_radial_prev_doc, - "The previous loop around the edge (read-only).\n\n:type: :class:`BMLoop`"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmloop_link_loop_radial_prev_doc, + "The previous loop around the edge (read-only).\n" + "\n" + ":type: :class:`BMLoop`"); static PyObject *bpy_bmloop_link_loop_radial_prev_get(BPy_BMLoop *self, void * /*closure*/) { BPY_BM_CHECK_OBJ(self); return BPy_BMLoop_CreatePyObject(self->bm, self->l->radial_prev); } -PyDoc_STRVAR(bpy_bmloop_is_convex_doc, - "True when this loop is at the convex corner of a face, depends on a valid face " - "normal (read-only).\n\n:type: boolean"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmloop_is_convex_doc, + "True when this loop is at the convex corner of a face, depends on a valid face " + "normal (read-only).\n" + "\n" + ":type: boolean"); static PyObject *bpy_bmloop_is_convex_get(BPy_BMLoop *self, void * /*closure*/) { BPY_BM_CHECK_OBJ(self); @@ -545,14 +689,30 @@ static PyObject *bpy_bmloop_is_convex_get(BPy_BMLoop *self, void * /*closure*/) * ^^^^^^^ */ /* NOTE: use for bmvert/edge/face/loop seq's use these, not bmelemseq directly. */ -PyDoc_STRVAR(bpy_bmelemseq_layers_vert_doc, - "custom-data layers (read-only).\n\n:type: :class:`BMLayerAccessVert`"); -PyDoc_STRVAR(bpy_bmelemseq_layers_edge_doc, - "custom-data layers (read-only).\n\n:type: :class:`BMLayerAccessEdge`"); -PyDoc_STRVAR(bpy_bmelemseq_layers_face_doc, - "custom-data layers (read-only).\n\n:type: :class:`BMLayerAccessFace`"); -PyDoc_STRVAR(bpy_bmelemseq_layers_loop_doc, - "custom-data layers (read-only).\n\n:type: :class:`BMLayerAccessLoop`"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmelemseq_layers_vert_doc, + "custom-data layers (read-only).\n" + "\n" + ":type: :class:`BMLayerAccessVert`"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmelemseq_layers_edge_doc, + "custom-data layers (read-only).\n" + "\n" + ":type: :class:`BMLayerAccessEdge`"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmelemseq_layers_face_doc, + "custom-data layers (read-only).\n" + "\n" + ":type: :class:`BMLayerAccessFace`"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmelemseq_layers_loop_doc, + "custom-data layers (read-only).\n" + "\n" + ":type: :class:`BMLayerAccessLoop`"); static PyObject *bpy_bmelemseq_layers_get(BPy_BMElemSeq *self, void *htype) { BPY_BM_CHECK_OBJ(self); @@ -563,7 +723,12 @@ static PyObject *bpy_bmelemseq_layers_get(BPy_BMElemSeq *self, void *htype) /* FaceSeq * ^^^^^^^ */ -PyDoc_STRVAR(bpy_bmfaceseq_active_doc, "active face.\n\n:type: :class:`BMFace` or None"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmfaceseq_active_doc, + "active face.\n" + "\n" + ":type: :class:`BMFace` or None"); static PyObject *bpy_bmfaceseq_active_get(BPy_BMElemSeq *self, void * /*closure*/) { BMesh *bm = self->bm; @@ -944,11 +1109,13 @@ static PyGetSetDef bpy_bmloopseq_getseters[] = { /* Mesh * ---- */ -PyDoc_STRVAR(bpy_bmesh_copy_doc, - ".. method:: copy()\n" - "\n" - " :return: A copy of this BMesh.\n" - " :rtype: :class:`BMesh`\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmesh_copy_doc, + ".. method:: copy()\n" + "\n" + " :return: A copy of this BMesh.\n" + " :rtype: :class:`BMesh`\n"); static PyObject *bpy_bmesh_copy(BPy_BMesh *self) { BMesh *bm; @@ -968,10 +1135,12 @@ static PyObject *bpy_bmesh_copy(BPy_BMesh *self) return nullptr; } -PyDoc_STRVAR(bpy_bmesh_clear_doc, - ".. method:: clear()\n" - "\n" - " Clear all mesh data.\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmesh_clear_doc, + ".. method:: clear()\n" + "\n" + " Clear all mesh data.\n"); static PyObject *bpy_bmesh_clear(BPy_BMesh *self) { BMesh *bm; @@ -986,6 +1155,7 @@ static PyObject *bpy_bmesh_clear(BPy_BMesh *self) } PyDoc_STRVAR( + /* Wrap. */ bpy_bmesh_free_doc, ".. method:: free()\n" "\n" @@ -1017,13 +1187,15 @@ static PyObject *bpy_bmesh_free(BPy_BMesh *self) Py_RETURN_NONE; } -PyDoc_STRVAR(bpy_bmesh_to_mesh_doc, - ".. method:: to_mesh(mesh)\n" - "\n" - " Writes this BMesh data into an existing Mesh datablock.\n" - "\n" - " :arg mesh: The mesh data to write into.\n" - " :type mesh: :class:`Mesh`\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmesh_to_mesh_doc, + ".. method:: to_mesh(mesh)\n" + "\n" + " Writes this BMesh data into an existing Mesh datablock.\n" + "\n" + " :arg mesh: The mesh data to write into.\n" + " :type mesh: :class:`Mesh`\n"); static PyObject *bpy_bmesh_to_mesh(BPy_BMesh *self, PyObject *args) { PyObject *py_mesh; @@ -1068,21 +1240,23 @@ static PyObject *bpy_bmesh_to_mesh(BPy_BMesh *self, PyObject *args) Py_RETURN_NONE; } -PyDoc_STRVAR(bpy_bmesh_from_object_doc, - ".. method:: from_object(object, depsgraph, cage=False, face_normals=True, " - "vertex_normals=True)\n" - "\n" - " Initialize this bmesh from existing object data-block (only meshes are currently " - "supported).\n" - "\n" - " :arg object: The object data to load.\n" - " :type object: :class:`Object`\n" - " :arg cage: Get the mesh as a deformed cage.\n" - " :type cage: boolean\n" - " :arg face_normals: Calculate face normals.\n" - " :type face_normals: boolean\n" - " :arg vertex_normals: Calculate vertex normals.\n" - " :type vertex_normals: boolean\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmesh_from_object_doc, + ".. method:: from_object(object, depsgraph, cage=False, face_normals=True, " + "vertex_normals=True)\n" + "\n" + " Initialize this bmesh from existing object data-block (only meshes are currently " + "supported).\n" + "\n" + " :arg object: The object data to load.\n" + " :type object: :class:`Object`\n" + " :arg cage: Get the mesh as a deformed cage.\n" + " :type cage: boolean\n" + " :arg face_normals: Calculate face normals.\n" + " :type face_normals: boolean\n" + " :arg vertex_normals: Calculate vertex normals.\n" + " :type vertex_normals: boolean\n"); static PyObject *bpy_bmesh_from_object(BPy_BMesh *self, PyObject *args, PyObject *kw) { static const char *kwlist[] = { @@ -1173,6 +1347,7 @@ static PyObject *bpy_bmesh_from_object(BPy_BMesh *self, PyObject *args, PyObject } PyDoc_STRVAR( + /* Wrap. */ bpy_bmesh_from_mesh_doc, ".. method:: from_mesh(mesh, face_normals=True, vertex_normals=True, use_shape_key=False, " "shape_key_index=0)\n" @@ -1236,10 +1411,12 @@ static PyObject *bpy_bmesh_from_mesh(BPy_BMesh *self, PyObject *args, PyObject * Py_RETURN_NONE; } -PyDoc_STRVAR(bpy_bmesh_select_flush_mode_doc, - ".. method:: select_flush_mode()\n" - "\n" - " flush selection based on the current mode current :class:`BMesh.select_mode`.\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmesh_select_flush_mode_doc, + ".. method:: select_flush_mode()\n" + "\n" + " flush selection based on the current mode current :class:`BMesh.select_mode`.\n"); static PyObject *bpy_bmesh_select_flush_mode(BPy_BMesh *self) { BPY_BM_CHECK_OBJ(self); @@ -1249,13 +1426,15 @@ static PyObject *bpy_bmesh_select_flush_mode(BPy_BMesh *self) Py_RETURN_NONE; } -PyDoc_STRVAR(bpy_bmesh_select_flush_doc, - ".. method:: select_flush(select)\n" - "\n" - " Flush selection, independent of the current selection mode.\n" - "\n" - " :arg select: flush selection or de-selected elements.\n" - " :type select: boolean\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmesh_select_flush_doc, + ".. method:: select_flush(select)\n" + "\n" + " Flush selection, independent of the current selection mode.\n" + "\n" + " :arg select: flush selection or de-selected elements.\n" + " :type select: boolean\n"); static PyObject *bpy_bmesh_select_flush(BPy_BMesh *self, PyObject *value) { int param; @@ -1277,6 +1456,7 @@ static PyObject *bpy_bmesh_select_flush(BPy_BMesh *self, PyObject *value) } PyDoc_STRVAR( + /* Wrap. */ bpy_bmesh_normal_update_doc, ".. method:: normal_update()\n" "\n" @@ -1295,16 +1475,18 @@ static PyObject *bpy_bmesh_normal_update(BPy_BMesh *self) Py_RETURN_NONE; } -PyDoc_STRVAR(bpy_bmesh_transform_doc, - ".. method:: transform(matrix, filter=None)\n" - "\n" - " Transform the mesh (optionally filtering flagged data only).\n" - "\n" - " :arg matrix: transform matrix.\n" - " :type matrix: 4x4 :class:`mathutils.Matrix`\n" - " :arg filter: set of values in " BPY_BM_HFLAG_ALL_STR - ".\n" - " :type filter: set\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmesh_transform_doc, + ".. method:: transform(matrix, filter=None)\n" + "\n" + " Transform the mesh (optionally filtering flagged data only).\n" + "\n" + " :arg matrix: transform matrix.\n" + " :type matrix: 4x4 :class:`mathutils.Matrix`\n" + " :arg filter: set of values in " BPY_BM_HFLAG_ALL_STR + ".\n" + " :type filter: set\n"); static PyObject *bpy_bmesh_transform(BPy_BMElem *self, PyObject *args, PyObject *kw) { static const char *kwlist[] = {"matrix", "filter", nullptr}; @@ -1358,15 +1540,17 @@ static PyObject *bpy_bmesh_transform(BPy_BMElem *self, PyObject *args, PyObject Py_RETURN_NONE; } -PyDoc_STRVAR(bpy_bmesh_calc_volume_doc, - ".. method:: calc_volume(signed=False)\n" - "\n" - " Calculate mesh volume based on face normals.\n" - "\n" - " :arg signed: when signed is true, negative values may be returned.\n" - " :type signed: bool\n" - " :return: The volume of the mesh.\n" - " :rtype: float\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmesh_calc_volume_doc, + ".. method:: calc_volume(signed=False)\n" + "\n" + " Calculate mesh volume based on face normals.\n" + "\n" + " :arg signed: when signed is true, negative values may be returned.\n" + " :type signed: bool\n" + " :return: The volume of the mesh.\n" + " :rtype: float\n"); static PyObject *bpy_bmesh_calc_volume(BPy_BMElem *self, PyObject *args, PyObject *kw) { static const char *kwlist[] = {"signed", nullptr}; @@ -1383,13 +1567,15 @@ static PyObject *bpy_bmesh_calc_volume(BPy_BMElem *self, PyObject *args, PyObjec return PyFloat_FromDouble(BM_mesh_calc_volume(self->bm, is_signed != Py_False)); } -PyDoc_STRVAR(bpy_bmesh_calc_loop_triangles_doc, - ".. method:: calc_loop_triangles()\n" - "\n" - " Calculate triangle tessellation from quads/ngons.\n" - "\n" - " :return: The triangulated faces.\n" - " :rtype: list of :class:`BMLoop` tuples\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmesh_calc_loop_triangles_doc, + ".. method:: calc_loop_triangles()\n" + "\n" + " Calculate triangle tessellation from quads/ngons.\n" + "\n" + " :return: The triangulated faces.\n" + " :rtype: list of :class:`BMLoop` tuples\n"); static PyObject *bpy_bmesh_calc_loop_triangles(BPy_BMElem *self) { BMesh *bm; @@ -1422,22 +1608,24 @@ static PyObject *bpy_bmesh_calc_loop_triangles(BPy_BMElem *self) /* Elem * ---- */ -PyDoc_STRVAR(bpy_bm_elem_select_set_doc, - ".. method:: select_set(select)\n" - "\n" - " Set the selection.\n" - " This is different from the *select* attribute because it updates the selection " - "state of associated geometry.\n" - "\n" - " :arg select: Select or de-select.\n" - " :type select: boolean\n" - "\n" - " .. note::\n" - "\n" - " Currently this only flushes down, so selecting a face will select all its " - "vertices but de-selecting a vertex " - " won't de-select all the faces that use it, before finishing with a mesh " - "typically flushing is still needed.\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bm_elem_select_set_doc, + ".. method:: select_set(select)\n" + "\n" + " Set the selection.\n" + " This is different from the *select* attribute because it updates the selection " + "state of associated geometry.\n" + "\n" + " :arg select: Select or de-select.\n" + " :type select: boolean\n" + "\n" + " .. note::\n" + "\n" + " Currently this only flushes down, so selecting a face will select all its " + "vertices but de-selecting a vertex " + " won't de-select all the faces that use it, before finishing with a mesh " + "typically flushing is still needed.\n"); static PyObject *bpy_bm_elem_select_set(BPy_BMElem *self, PyObject *value) { int param; @@ -1453,15 +1641,17 @@ static PyObject *bpy_bm_elem_select_set(BPy_BMElem *self, PyObject *value) Py_RETURN_NONE; } -PyDoc_STRVAR(bpy_bm_elem_hide_set_doc, - ".. method:: hide_set(hide)\n" - "\n" - " Set the hide state.\n" - " This is different from the *hide* attribute because it updates the selection and " - "hide state of associated geometry.\n" - "\n" - " :arg hide: Hidden or visible.\n" - " :type hide: boolean\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bm_elem_hide_set_doc, + ".. method:: hide_set(hide)\n" + "\n" + " Set the hide state.\n" + " This is different from the *hide* attribute because it updates the selection and " + "hide state of associated geometry.\n" + "\n" + " :arg hide: Hidden or visible.\n" + " :type hide: boolean\n"); static PyObject *bpy_bm_elem_hide_set(BPy_BMElem *self, PyObject *value) { int param; @@ -1477,10 +1667,12 @@ static PyObject *bpy_bm_elem_hide_set(BPy_BMElem *self, PyObject *value) Py_RETURN_NONE; } -PyDoc_STRVAR(bpy_bm_elem_copy_from_doc, - ".. method:: copy_from(other)\n" - "\n" - " Copy values from another element of matching type.\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bm_elem_copy_from_doc, + ".. method:: copy_from(other)\n" + "\n" + " Copy values from another element of matching type.\n"); static PyObject *bpy_bm_elem_copy_from(BPy_BMElem *self, BPy_BMElem *value) { BPY_BM_CHECK_OBJ(self); @@ -1540,13 +1732,15 @@ static PyObject *bpy_bm_elem_copy_from(BPy_BMElem *self, BPy_BMElem *value) /* Vert * ---- */ -PyDoc_STRVAR(bpy_bmvert_copy_from_vert_interp_doc, - ".. method:: copy_from_vert_interp(vert_pair, fac)\n" - "\n" - " Interpolate the customdata from a vert between 2 other verts.\n" - "\n" - " :arg vert_pair: The vert to interpolate data from.\n" - " :type vert_pair: :class:`BMVert`\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmvert_copy_from_vert_interp_doc, + ".. method:: copy_from_vert_interp(vert_pair, fac)\n" + "\n" + " Interpolate the customdata from a vert between 2 other verts.\n" + "\n" + " :arg vert_pair: The vert to interpolate data from.\n" + " :type vert_pair: :class:`BMVert`\n"); static PyObject *bpy_bmvert_copy_from_vert_interp(BPy_BMVert *self, PyObject *args) { PyObject *vert_seq; @@ -1583,14 +1777,16 @@ static PyObject *bpy_bmvert_copy_from_vert_interp(BPy_BMVert *self, PyObject *ar Py_RETURN_NONE; } -PyDoc_STRVAR(bpy_bmvert_copy_from_face_interp_doc, - ".. method:: copy_from_face_interp(face)\n" - "\n" - " Interpolate the customdata from a face onto this loop (the loops vert should " - "overlap the face).\n" - "\n" - " :arg face: The face to interpolate data from.\n" - " :type face: :class:`BMFace`\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmvert_copy_from_face_interp_doc, + ".. method:: copy_from_face_interp(face)\n" + "\n" + " Interpolate the customdata from a face onto this loop (the loops vert should " + "overlap the face).\n" + "\n" + " :arg face: The face to interpolate data from.\n" + " :type face: :class:`BMFace`\n"); static PyObject *bpy_bmvert_copy_from_face_interp(BPy_BMVert *self, PyObject *args) { BPy_BMFace *py_face = nullptr; @@ -1610,16 +1806,18 @@ static PyObject *bpy_bmvert_copy_from_face_interp(BPy_BMVert *self, PyObject *ar Py_RETURN_NONE; } -PyDoc_STRVAR(bpy_bmvert_calc_edge_angle_doc, - ".. method:: calc_edge_angle(fallback=None)\n" - "\n" - " Return the angle between this vert's two connected edges.\n" - "\n" - " :arg fallback: return this when the vert doesn't have 2 edges\n" - " (instead of raising a :exc:`ValueError`).\n" - " :type fallback: any\n" - " :return: Angle between edges in radians.\n" - " :rtype: float\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmvert_calc_edge_angle_doc, + ".. method:: calc_edge_angle(fallback=None)\n" + "\n" + " Return the angle between this vert's two connected edges.\n" + "\n" + " :arg fallback: return this when the vert doesn't have 2 edges\n" + " (instead of raising a :exc:`ValueError`).\n" + " :type fallback: any\n" + " :return: Angle between edges in radians.\n" + " :rtype: float\n"); static PyObject *bpy_bmvert_calc_edge_angle(BPy_BMVert *self, PyObject *args) { const float angle_invalid = -1.0f; @@ -1651,6 +1849,7 @@ static PyObject *bpy_bmvert_calc_edge_angle(BPy_BMVert *self, PyObject *args) } PyDoc_STRVAR( + /* Wrap. */ bpy_bmvert_calc_shell_factor_doc, ".. method:: calc_shell_factor()\n" "\n" @@ -1666,15 +1865,17 @@ static PyObject *bpy_bmvert_calc_shell_factor(BPy_BMVert *self) return PyFloat_FromDouble(BM_vert_calc_shell_factor(self->v)); } -PyDoc_STRVAR(bpy_bmvert_normal_update_doc, - ".. method:: normal_update()\n" - "\n" - " Update vertex normal.\n" - " This does not update the normals of adjoining faces.\n" - "\n" - " .. note::\n" - "\n" - " The vertex normal will be a zero vector if vertex :attr:`is_wire` is True.\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmvert_normal_update_doc, + ".. method:: normal_update()\n" + "\n" + " Update vertex normal.\n" + " This does not update the normals of adjoining faces.\n" + "\n" + " .. note::\n" + "\n" + " The vertex normal will be a zero vector if vertex :attr:`is_wire` is True.\n"); static PyObject *bpy_bmvert_normal_update(BPy_BMVert *self) { BPY_BM_CHECK_OBJ(self); @@ -1687,25 +1888,29 @@ static PyObject *bpy_bmvert_normal_update(BPy_BMVert *self) /* Edge * ---- */ -PyDoc_STRVAR(bpy_bmedge_calc_length_doc, - ".. method:: calc_length()\n" - "\n" - " :return: The length between both verts.\n" - " :rtype: float\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmedge_calc_length_doc, + ".. method:: calc_length()\n" + "\n" + " :return: The length between both verts.\n" + " :rtype: float\n"); static PyObject *bpy_bmedge_calc_length(BPy_BMEdge *self) { BPY_BM_CHECK_OBJ(self); return PyFloat_FromDouble(len_v3v3(self->e->v1->co, self->e->v2->co)); } -PyDoc_STRVAR(bpy_bmedge_calc_face_angle_doc, - ".. method:: calc_face_angle(fallback=None)\n" - "\n" - " :arg fallback: return this when the edge doesn't have 2 faces\n" - " (instead of raising a :exc:`ValueError`).\n" - " :type fallback: any\n" - " :return: The angle between 2 connected faces in radians.\n" - " :rtype: float\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmedge_calc_face_angle_doc, + ".. method:: calc_face_angle(fallback=None)\n" + "\n" + " :arg fallback: return this when the edge doesn't have 2 faces\n" + " (instead of raising a :exc:`ValueError`).\n" + " :type fallback: any\n" + " :return: The angle between 2 connected faces in radians.\n" + " :rtype: float\n"); static PyObject *bpy_bmedge_calc_face_angle(BPy_BMEdge *self, PyObject *args) { const float angle_invalid = -1.0f; @@ -1737,6 +1942,7 @@ static PyObject *bpy_bmedge_calc_face_angle(BPy_BMEdge *self, PyObject *args) } PyDoc_STRVAR( + /* Wrap. */ bpy_bmedge_calc_face_angle_signed_doc, ".. method:: calc_face_angle_signed(fallback=None)\n" "\n" @@ -1776,6 +1982,7 @@ static PyObject *bpy_bmedge_calc_face_angle_signed(BPy_BMEdge *self, PyObject *a } PyDoc_STRVAR( + /* Wrap. */ bpy_bmedge_calc_tangent_doc, ".. method:: calc_tangent(loop)\n" "\n" @@ -1803,6 +2010,7 @@ static PyObject *bpy_bmedge_calc_tangent(BPy_BMEdge *self, PyObject *args) } PyDoc_STRVAR( + /* Wrap. */ bpy_bmedge_other_vert_doc, ".. method:: other_vert(vert)\n" "\n" @@ -1837,6 +2045,7 @@ static PyObject *bpy_bmedge_other_vert(BPy_BMEdge *self, BPy_BMVert *value) } PyDoc_STRVAR( + /* Wrap. */ bpy_bmedge_normal_update_doc, ".. method:: normal_update()\n" "\n" @@ -1858,6 +2067,7 @@ static PyObject *bpy_bmedge_normal_update(BPy_BMEdge *self) * ---- */ PyDoc_STRVAR( + /* Wrap. */ bpy_bmface_copy_from_face_interp_doc, ".. method:: copy_from_face_interp(face, vert=True)\n" "\n" @@ -1893,17 +2103,19 @@ static PyObject *bpy_bmface_copy_from_face_interp(BPy_BMFace *self, PyObject *ar Py_RETURN_NONE; } -PyDoc_STRVAR(bpy_bmface_copy_doc, - ".. method:: copy(verts=True, edges=True)\n" - "\n" - " Make a copy of this face.\n" - "\n" - " :arg verts: When set, the faces verts will be duplicated too.\n" - " :type verts: boolean\n" - " :arg edges: When set, the faces edges will be duplicated too.\n" - " :type edges: boolean\n" - " :return: The newly created face.\n" - " :rtype: :class:`BMFace`\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmface_copy_doc, + ".. method:: copy(verts=True, edges=True)\n" + "\n" + " Make a copy of this face.\n" + "\n" + " :arg verts: When set, the faces verts will be duplicated too.\n" + " :type verts: boolean\n" + " :arg edges: When set, the faces edges will be duplicated too.\n" + " :type edges: boolean\n" + " :return: The newly created face.\n" + " :rtype: :class:`BMFace`\n"); static PyObject *bpy_bmface_copy(BPy_BMFace *self, PyObject *args, PyObject *kw) { static const char *kwlist[] = {"verts", "edges", nullptr}; @@ -1937,39 +2149,45 @@ static PyObject *bpy_bmface_copy(BPy_BMFace *self, PyObject *args, PyObject *kw) return nullptr; } -PyDoc_STRVAR(bpy_bmface_calc_area_doc, - ".. method:: calc_area()\n" - "\n" - " Return the area of the face.\n" - "\n" - " :return: Return the area of the face.\n" - " :rtype: float\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmface_calc_area_doc, + ".. method:: calc_area()\n" + "\n" + " Return the area of the face.\n" + "\n" + " :return: Return the area of the face.\n" + " :rtype: float\n"); static PyObject *bpy_bmface_calc_area(BPy_BMFace *self) { BPY_BM_CHECK_OBJ(self); return PyFloat_FromDouble(BM_face_calc_area(self->f)); } -PyDoc_STRVAR(bpy_bmface_calc_perimeter_doc, - ".. method:: calc_perimeter()\n" - "\n" - " Return the perimeter of the face.\n" - "\n" - " :return: Return the perimeter of the face.\n" - " :rtype: float\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmface_calc_perimeter_doc, + ".. method:: calc_perimeter()\n" + "\n" + " Return the perimeter of the face.\n" + "\n" + " :return: Return the perimeter of the face.\n" + " :rtype: float\n"); static PyObject *bpy_bmface_calc_perimeter(BPy_BMFace *self) { BPY_BM_CHECK_OBJ(self); return PyFloat_FromDouble(BM_face_calc_perimeter(self->f)); } -PyDoc_STRVAR(bpy_bmface_calc_tangent_edge_doc, - ".. method:: calc_tangent_edge()\n" - "\n" - " Return face tangent based on longest edge.\n" - "\n" - " :return: a normalized vector.\n" - " :rtype: :class:`mathutils.Vector`\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmface_calc_tangent_edge_doc, + ".. method:: calc_tangent_edge()\n" + "\n" + " Return face tangent based on longest edge.\n" + "\n" + " :return: a normalized vector.\n" + " :rtype: :class:`mathutils.Vector`\n"); static PyObject *bpy_bmface_calc_tangent_edge(BPy_BMFace *self) { float tangent[3]; @@ -1979,17 +2197,19 @@ static PyObject *bpy_bmface_calc_tangent_edge(BPy_BMFace *self) return Vector_CreatePyObject(tangent, 3, nullptr); } -PyDoc_STRVAR(bpy_bmface_calc_tangent_edge_pair_doc, - ".. method:: calc_tangent_edge_pair()\n" - "\n" - " Return face tangent based on the two longest disconnected edges.\n" - "\n" - " - Tris: Use the edge pair with the most similar lengths.\n" - " - Quads: Use the longest edge pair.\n" - " - NGons: Use the two longest disconnected edges.\n" - "\n" - " :return: a normalized vector.\n" - " :rtype: :class:`mathutils.Vector`\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmface_calc_tangent_edge_pair_doc, + ".. method:: calc_tangent_edge_pair()\n" + "\n" + " Return face tangent based on the two longest disconnected edges.\n" + "\n" + " - Tris: Use the edge pair with the most similar lengths.\n" + " - Quads: Use the longest edge pair.\n" + " - NGons: Use the two longest disconnected edges.\n" + "\n" + " :return: a normalized vector.\n" + " :rtype: :class:`mathutils.Vector`\n"); static PyObject *bpy_bmface_calc_tangent_edge_pair(BPy_BMFace *self) { float tangent[3]; @@ -1999,13 +2219,15 @@ static PyObject *bpy_bmface_calc_tangent_edge_pair(BPy_BMFace *self) return Vector_CreatePyObject(tangent, 3, nullptr); } -PyDoc_STRVAR(bpy_bmface_calc_tangent_edge_diagonal_doc, - ".. method:: calc_tangent_edge_diagonal()\n" - "\n" - " Return face tangent based on the edge farthest from any vertex.\n" - "\n" - " :return: a normalized vector.\n" - " :rtype: :class:`mathutils.Vector`\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmface_calc_tangent_edge_diagonal_doc, + ".. method:: calc_tangent_edge_diagonal()\n" + "\n" + " Return face tangent based on the edge farthest from any vertex.\n" + "\n" + " :return: a normalized vector.\n" + " :rtype: :class:`mathutils.Vector`\n"); static PyObject *bpy_bmface_calc_tangent_edge_diagonal(BPy_BMFace *self) { float tangent[3]; @@ -2015,13 +2237,15 @@ static PyObject *bpy_bmface_calc_tangent_edge_diagonal(BPy_BMFace *self) return Vector_CreatePyObject(tangent, 3, nullptr); } -PyDoc_STRVAR(bpy_bmface_calc_tangent_vert_diagonal_doc, - ".. method:: calc_tangent_vert_diagonal()\n" - "\n" - " Return face tangent based on the two most distant vertices.\n" - "\n" - " :return: a normalized vector.\n" - " :rtype: :class:`mathutils.Vector`\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmface_calc_tangent_vert_diagonal_doc, + ".. method:: calc_tangent_vert_diagonal()\n" + "\n" + " Return face tangent based on the two most distant vertices.\n" + "\n" + " :return: a normalized vector.\n" + " :rtype: :class:`mathutils.Vector`\n"); static PyObject *bpy_bmface_calc_tangent_vert_diagonal(BPy_BMFace *self) { float tangent[3]; @@ -2031,13 +2255,15 @@ static PyObject *bpy_bmface_calc_tangent_vert_diagonal(BPy_BMFace *self) return Vector_CreatePyObject(tangent, 3, nullptr); } -PyDoc_STRVAR(bpy_bmface_calc_center_median_doc, - ".. method:: calc_center_median()\n" - "\n" - " Return median center of the face.\n" - "\n" - " :return: a 3D vector.\n" - " :rtype: :class:`mathutils.Vector`\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmface_calc_center_median_doc, + ".. method:: calc_center_median()\n" + "\n" + " Return median center of the face.\n" + "\n" + " :return: a 3D vector.\n" + " :rtype: :class:`mathutils.Vector`\n"); static PyObject *bpy_bmface_calc_center_mean(BPy_BMFace *self) { float cent[3]; @@ -2047,13 +2273,15 @@ static PyObject *bpy_bmface_calc_center_mean(BPy_BMFace *self) return Vector_CreatePyObject(cent, 3, nullptr); } -PyDoc_STRVAR(bpy_bmface_calc_center_median_weighted_doc, - ".. method:: calc_center_median_weighted()\n" - "\n" - " Return median center of the face weighted by edge lengths.\n" - "\n" - " :return: a 3D vector.\n" - " :rtype: :class:`mathutils.Vector`\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmface_calc_center_median_weighted_doc, + ".. method:: calc_center_median_weighted()\n" + "\n" + " Return median center of the face weighted by edge lengths.\n" + "\n" + " :return: a 3D vector.\n" + " :rtype: :class:`mathutils.Vector`\n"); static PyObject *bpy_bmface_calc_center_median_weighted(BPy_BMFace *self) { float cent[3]; @@ -2063,13 +2291,15 @@ static PyObject *bpy_bmface_calc_center_median_weighted(BPy_BMFace *self) return Vector_CreatePyObject(cent, 3, nullptr); } -PyDoc_STRVAR(bpy_bmface_calc_center_bounds_doc, - ".. method:: calc_center_bounds()\n" - "\n" - " Return bounds center of the face.\n" - "\n" - " :return: a 3D vector.\n" - " :rtype: :class:`mathutils.Vector`\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmface_calc_center_bounds_doc, + ".. method:: calc_center_bounds()\n" + "\n" + " Return bounds center of the face.\n" + "\n" + " :return: a 3D vector.\n" + " :rtype: :class:`mathutils.Vector`\n"); static PyObject *bpy_bmface_calc_center_bounds(BPy_BMFace *self) { float cent[3]; @@ -2079,11 +2309,13 @@ static PyObject *bpy_bmface_calc_center_bounds(BPy_BMFace *self) return Vector_CreatePyObject(cent, 3, nullptr); } -PyDoc_STRVAR(bpy_bmface_normal_update_doc, - ".. method:: normal_update()\n" - "\n" - " Update face normal based on the positions of the face verts.\n" - " This does not update the normals of face verts.\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmface_normal_update_doc, + ".. method:: normal_update()\n" + "\n" + " Update face normal based on the positions of the face verts.\n" + " This does not update the normals of face verts.\n"); static PyObject *bpy_bmface_normal_update(BPy_BMFace *self) { BPY_BM_CHECK_OBJ(self); @@ -2093,10 +2325,12 @@ static PyObject *bpy_bmface_normal_update(BPy_BMFace *self) Py_RETURN_NONE; } -PyDoc_STRVAR(bpy_bmface_normal_flip_doc, - ".. method:: normal_flip()\n" - "\n" - " Reverses winding of a face, which flips its normal.\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmface_normal_flip_doc, + ".. method:: normal_flip()\n" + "\n" + " Reverses winding of a face, which flips its normal.\n"); static PyObject *bpy_bmface_normal_flip(BPy_BMFace *self) { BPY_BM_CHECK_OBJ(self); @@ -2109,18 +2343,20 @@ static PyObject *bpy_bmface_normal_flip(BPy_BMFace *self) /* Loop * ---- */ -PyDoc_STRVAR(bpy_bmloop_copy_from_face_interp_doc, - ".. method:: copy_from_face_interp(face, vert=True, multires=True)\n" - "\n" - " Interpolate the customdata from a face onto this loop (the loops vert should " - "overlap the face).\n" - "\n" - " :arg face: The face to interpolate data from.\n" - " :type face: :class:`BMFace`\n" - " :arg vert: When enabled, interpolate the loops vertex data (optional).\n" - " :type vert: boolean\n" - " :arg multires: When enabled, interpolate the loops multires data (optional).\n" - " :type multires: boolean\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmloop_copy_from_face_interp_doc, + ".. method:: copy_from_face_interp(face, vert=True, multires=True)\n" + "\n" + " Interpolate the customdata from a face onto this loop (the loops vert should " + "overlap the face).\n" + "\n" + " :arg face: The face to interpolate data from.\n" + " :type face: :class:`BMFace`\n" + " :arg vert: When enabled, interpolate the loops vertex data (optional).\n" + " :type vert: boolean\n" + " :arg multires: When enabled, interpolate the loops multires data (optional).\n" + " :type multires: boolean\n"); static PyObject *bpy_bmloop_copy_from_face_interp(BPy_BMLoop *self, PyObject *args) { BPy_BMFace *py_face = nullptr; @@ -2150,28 +2386,32 @@ static PyObject *bpy_bmloop_copy_from_face_interp(BPy_BMLoop *self, PyObject *ar Py_RETURN_NONE; } -PyDoc_STRVAR(bpy_bmloop_calc_angle_doc, - ".. method:: calc_angle()\n" - "\n" - " Return the angle at this loops corner of the face.\n" - " This is calculated so sharper corners give lower angles.\n" - "\n" - " :return: The angle in radians.\n" - " :rtype: float\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmloop_calc_angle_doc, + ".. method:: calc_angle()\n" + "\n" + " Return the angle at this loops corner of the face.\n" + " This is calculated so sharper corners give lower angles.\n" + "\n" + " :return: The angle in radians.\n" + " :rtype: float\n"); static PyObject *bpy_bmloop_calc_angle(BPy_BMLoop *self) { BPY_BM_CHECK_OBJ(self); return PyFloat_FromDouble(BM_loop_calc_face_angle(self->l)); } -PyDoc_STRVAR(bpy_bmloop_calc_normal_doc, - ".. method:: calc_normal()\n" - "\n" - " Return normal at this loops corner of the face.\n" - " Falls back to the face normal for straight lines.\n" - "\n" - " :return: a normalized vector.\n" - " :rtype: :class:`mathutils.Vector`\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmloop_calc_normal_doc, + ".. method:: calc_normal()\n" + "\n" + " Return normal at this loops corner of the face.\n" + " Falls back to the face normal for straight lines.\n" + "\n" + " :return: a normalized vector.\n" + " :rtype: :class:`mathutils.Vector`\n"); static PyObject *bpy_bmloop_calc_normal(BPy_BMLoop *self) { float vec[3]; @@ -2181,6 +2421,7 @@ static PyObject *bpy_bmloop_calc_normal(BPy_BMLoop *self) } PyDoc_STRVAR( + /* Wrap. */ bpy_bmloop_calc_tangent_doc, ".. method:: calc_tangent()\n" "\n" @@ -2199,17 +2440,19 @@ static PyObject *bpy_bmloop_calc_tangent(BPy_BMLoop *self) /* Vert Seq * -------- */ -PyDoc_STRVAR(bpy_bmvertseq_new_doc, - ".. method:: new(co=(0.0, 0.0, 0.0), example=None)\n" - "\n" - " Create a new vertex.\n" - "\n" - " :arg co: The initial location of the vertex (optional argument).\n" - " :type co: float triplet\n" - " :arg example: Existing vert to initialize settings.\n" - " :type example: :class:`BMVert`\n" - " :return: The newly created vertex.\n" - " :rtype: :class:`BMVert`\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmvertseq_new_doc, + ".. method:: new(co=(0.0, 0.0, 0.0), example=None)\n" + "\n" + " Create a new vertex.\n" + "\n" + " :arg co: The initial location of the vertex (optional argument).\n" + " :type co: float triplet\n" + " :arg example: Existing vert to initialize settings.\n" + " :type example: :class:`BMVert`\n" + " :return: The newly created vertex.\n" + " :rtype: :class:`BMVert`\n"); static PyObject *bpy_bmvertseq_new(BPy_BMElemSeq *self, PyObject *args) { PyObject *py_co = nullptr; @@ -2257,17 +2500,19 @@ static PyObject *bpy_bmvertseq_new(BPy_BMElemSeq *self, PyObject *args) /* Edge Seq * -------- */ -PyDoc_STRVAR(bpy_bmedgeseq_new_doc, - ".. method:: new(verts, example=None)\n" - "\n" - " Create a new edge from a given pair of verts.\n" - "\n" - " :arg verts: Vertex pair.\n" - " :type verts: pair of :class:`BMVert`\n" - " :arg example: Existing edge to initialize settings (optional argument).\n" - " :type example: :class:`BMEdge`\n" - " :return: The newly created edge.\n" - " :rtype: :class:`BMEdge`\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmedgeseq_new_doc, + ".. method:: new(verts, example=None)\n" + "\n" + " Create a new edge from a given pair of verts.\n" + "\n" + " :arg verts: Vertex pair.\n" + " :type verts: pair of :class:`BMVert`\n" + " :arg example: Existing edge to initialize settings (optional argument).\n" + " :type example: :class:`BMEdge`\n" + " :return: The newly created edge.\n" + " :rtype: :class:`BMEdge`\n"); static PyObject *bpy_bmedgeseq_new(BPy_BMElemSeq *self, PyObject *args) { PyObject *vert_seq; @@ -2331,17 +2576,19 @@ cleanup: /* Face Seq * -------- */ -PyDoc_STRVAR(bpy_bmfaceseq_new_doc, - ".. method:: new(verts, example=None)\n" - "\n" - " Create a new face from a given set of verts.\n" - "\n" - " :arg verts: Sequence of 3 or more verts.\n" - " :type verts: sequence of :class:`BMVert`\n" - " :arg example: Existing face to initialize settings (optional argument).\n" - " :type example: :class:`BMFace`\n" - " :return: The newly created face.\n" - " :rtype: :class:`BMFace`\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmfaceseq_new_doc, + ".. method:: new(verts, example=None)\n" + "\n" + " Create a new face from a given set of verts.\n" + "\n" + " :arg verts: Sequence of 3 or more verts.\n" + " :type verts: sequence of :class:`BMVert`\n" + " :arg example: Existing face to initialize settings (optional argument).\n" + " :type example: :class:`BMFace`\n" + " :return: The newly created face.\n" + " :rtype: :class:`BMFace`\n"); static PyObject *bpy_bmfaceseq_new(BPy_BMElemSeq *self, PyObject *args) { PyObject *vert_seq; @@ -2408,10 +2655,12 @@ cleanup: /* Elem Seq * -------- */ -PyDoc_STRVAR(bpy_bmvertseq_remove_doc, - ".. method:: remove(vert)\n" - "\n" - " Remove a vert.\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmvertseq_remove_doc, + ".. method:: remove(vert)\n" + "\n" + " Remove a vert.\n"); static PyObject *bpy_bmvertseq_remove(BPy_BMElemSeq *self, BPy_BMVert *value) { BPY_BM_CHECK_OBJ(self); @@ -2430,10 +2679,12 @@ static PyObject *bpy_bmvertseq_remove(BPy_BMElemSeq *self, BPy_BMVert *value) Py_RETURN_NONE; } -PyDoc_STRVAR(bpy_bmedgeseq_remove_doc, - ".. method:: remove(edge)\n" - "\n" - " Remove an edge.\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmedgeseq_remove_doc, + ".. method:: remove(edge)\n" + "\n" + " Remove an edge.\n"); static PyObject *bpy_bmedgeseq_remove(BPy_BMElemSeq *self, BPy_BMEdge *value) { BPY_BM_CHECK_OBJ(self); @@ -2452,10 +2703,12 @@ static PyObject *bpy_bmedgeseq_remove(BPy_BMElemSeq *self, BPy_BMEdge *value) Py_RETURN_NONE; } -PyDoc_STRVAR(bpy_bmfaceseq_remove_doc, - ".. method:: remove(face)\n" - "\n" - " Remove a face.\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmfaceseq_remove_doc, + ".. method:: remove(face)\n" + "\n" + " Remove a face.\n"); static PyObject *bpy_bmfaceseq_remove(BPy_BMElemSeq *self, BPy_BMFace *value) { BPY_BM_CHECK_OBJ(self); @@ -2474,16 +2727,18 @@ static PyObject *bpy_bmfaceseq_remove(BPy_BMElemSeq *self, BPy_BMFace *value) Py_RETURN_NONE; } -PyDoc_STRVAR(bpy_bmedgeseq_get__method_doc, - ".. method:: get(verts, fallback=None)\n" - "\n" - " Return an edge which uses the **verts** passed.\n" - "\n" - " :arg verts: Sequence of verts.\n" - " :type verts: :class:`BMVert`\n" - " :arg fallback: Return this value if nothing is found.\n" - " :return: The edge found or None\n" - " :rtype: :class:`BMEdge`\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmedgeseq_get__method_doc, + ".. method:: get(verts, fallback=None)\n" + "\n" + " Return an edge which uses the **verts** passed.\n" + "\n" + " :arg verts: Sequence of verts.\n" + " :type verts: :class:`BMVert`\n" + " :arg fallback: Return this value if nothing is found.\n" + " :return: The edge found or None\n" + " :rtype: :class:`BMEdge`\n"); static PyObject *bpy_bmedgeseq_get__method(BPy_BMElemSeq *self, PyObject *args) { PyObject *vert_seq; @@ -2520,16 +2775,18 @@ static PyObject *bpy_bmedgeseq_get__method(BPy_BMElemSeq *self, PyObject *args) return ret; } -PyDoc_STRVAR(bpy_bmfaceseq_get__method_doc, - ".. method:: get(verts, fallback=None)\n" - "\n" - " Return a face which uses the **verts** passed.\n" - "\n" - " :arg verts: Sequence of verts.\n" - " :type verts: :class:`BMVert`\n" - " :arg fallback: Return this value if nothing is found.\n" - " :return: The face found or None\n" - " :rtype: :class:`BMFace`\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmfaceseq_get__method_doc, + ".. method:: get(verts, fallback=None)\n" + "\n" + " Return a face which uses the **verts** passed.\n" + "\n" + " :arg verts: Sequence of verts.\n" + " :type verts: :class:`BMVert`\n" + " :arg fallback: Return this value if nothing is found.\n" + " :return: The face found or None\n" + " :rtype: :class:`BMFace`\n"); static PyObject *bpy_bmfaceseq_get__method(BPy_BMElemSeq *self, PyObject *args) { PyObject *vert_seq; @@ -2568,6 +2825,7 @@ static PyObject *bpy_bmfaceseq_get__method(BPy_BMElemSeq *self, PyObject *args) } PyDoc_STRVAR( + /* Wrap. */ bpy_bmelemseq_index_update_doc, ".. method:: index_update()\n" "\n" @@ -2624,13 +2882,15 @@ static PyObject *bpy_bmelemseq_index_update(BPy_BMElemSeq *self) Py_RETURN_NONE; } -PyDoc_STRVAR(bpy_bmelemseq_ensure_lookup_table_doc, - ".. method:: ensure_lookup_table()\n" - "\n" - " Ensure internal data needed for int subscription is initialized with " - "verts/edges/faces, eg ``bm.verts[index]``.\n" - "\n" - " This needs to be called again after adding/removing data in this sequence."); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmelemseq_ensure_lookup_table_doc, + ".. method:: ensure_lookup_table()\n" + "\n" + " Ensure internal data needed for int subscription is initialized with " + "verts/edges/faces, eg ``bm.verts[index]``.\n" + "\n" + " This needs to be called again after adding/removing data in this sequence."); static PyObject *bpy_bmelemseq_ensure_lookup_table(BPy_BMElemSeq *self) { BPY_BM_CHECK_OBJ(self); @@ -2641,6 +2901,7 @@ static PyObject *bpy_bmelemseq_ensure_lookup_table(BPy_BMElemSeq *self) } PyDoc_STRVAR( + /* Wrap. */ bpy_bmelemseq_sort_doc, ".. method:: sort(key=None, reverse=False)\n" "\n" @@ -3550,22 +3811,40 @@ static Py_hash_t bpy_bm_hash(PyObject *self) /* Type Doc-strings * ================ */ -PyDoc_STRVAR(bpy_bmesh_doc, "The BMesh data structure\n"); -PyDoc_STRVAR(bpy_bmvert_doc, "The BMesh vertex type\n"); -PyDoc_STRVAR(bpy_bmedge_doc, "The BMesh edge connecting 2 verts\n"); -PyDoc_STRVAR(bpy_bmface_doc, "The BMesh face with 3 or more sides\n"); -PyDoc_STRVAR(bpy_bmloop_doc, - "This is normally accessed from :class:`BMFace.loops` where each face loop " - "represents a corner of the face.\n"); -PyDoc_STRVAR(bpy_bmelemseq_doc, - "General sequence type used for accessing any sequence of\n" - ":class:`BMVert`, :class:`BMEdge`, :class:`BMFace`, :class:`BMLoop`.\n" - "\n" - "When accessed via :class:`BMesh.verts`, :class:`BMesh.edges`, :class:`BMesh.faces`\n" - "there are also functions to create/remove items.\n"); -PyDoc_STRVAR(bpy_bmiter_doc, - "Internal BMesh type for looping over verts/faces/edges,\n" - "used for iterating over :class:`BMElemSeq` types.\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmesh_doc, + "The BMesh data structure\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmvert_doc, + "The BMesh vertex type\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmedge_doc, + "The BMesh edge connecting 2 verts\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmface_doc, + "The BMesh face with 3 or more sides\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmloop_doc, + "This is normally accessed from :class:`BMFace.loops` where each face loop " + "represents a corner of the face.\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmelemseq_doc, + "General sequence type used for accessing any sequence of\n" + ":class:`BMVert`, :class:`BMEdge`, :class:`BMFace`, :class:`BMLoop`.\n" + "\n" + "When accessed via :class:`BMesh.verts`, :class:`BMesh.edges`, :class:`BMesh.faces`\n" + "there are also functions to create/remove items.\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmiter_doc, + "Internal BMesh type for looping over verts/faces/edges,\n" + "used for iterating over :class:`BMElemSeq` types.\n"); static PyObject *bpy_bmesh_repr(BPy_BMesh *self) { diff --git a/source/blender/python/bmesh/bmesh_py_types_customdata.cc b/source/blender/python/bmesh/bmesh_py_types_customdata.cc index 7cd7b031c02..4b8547e702d 100644 --- a/source/blender/python/bmesh/bmesh_py_types_customdata.cc +++ b/source/blender/python/bmesh/bmesh_py_types_customdata.cc @@ -66,39 +66,85 @@ static CustomDataLayer *bpy_bmlayeritem_get(BPy_BMLayerItem *self) /* used for many different types. */ -PyDoc_STRVAR(bpy_bmlayeraccess_collection__float_doc, - "Generic float custom-data layer.\n\ntype: :class:`BMLayerCollection`"); -PyDoc_STRVAR(bpy_bmlayeraccess_collection__int_doc, - "Generic int custom-data layer.\n\ntype: :class:`BMLayerCollection`"); -PyDoc_STRVAR(bpy_bmlayeraccess_collection__float_vector_doc, - "Generic 3D vector with float precision custom-data layer.\n\ntype: " - ":class:`BMLayerCollection`"); -PyDoc_STRVAR(bpy_bmlayeraccess_collection__float_color_doc, - "Generic RGBA color with float precision custom-data layer.\n\ntype: " - ":class:`BMLayerCollection`"); -PyDoc_STRVAR(bpy_bmlayeraccess_collection__color_doc, - "Generic RGBA color with 8-bit precision custom-data layer.\n\ntype: " - ":class:`BMLayerCollection`"); -PyDoc_STRVAR(bpy_bmlayeraccess_collection__string_doc, - "Generic string custom-data layer (exposed as bytes, 255 max length).\n\ntype: " - ":class:`BMLayerCollection`"); -PyDoc_STRVAR(bpy_bmlayeraccess_collection__deform_doc, - "Vertex deform weight :class:`BMDeformVert` (TODO).\n\ntype: " - ":class:`BMLayerCollection`" /* TYPE DOESN'T EXIST YET */ +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmlayeraccess_collection__float_doc, + "Generic float custom-data layer.\n" + "\n" + "type: :class:`BMLayerCollection`"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmlayeraccess_collection__int_doc, + "Generic int custom-data layer.\n" + "\n" + "type: :class:`BMLayerCollection`"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmlayeraccess_collection__float_vector_doc, + "Generic 3D vector with float precision custom-data layer.\n" + "\n" + "type: " + ":class:`BMLayerCollection`"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmlayeraccess_collection__float_color_doc, + "Generic RGBA color with float precision custom-data layer.\n" + "\n" + "type: " + ":class:`BMLayerCollection`"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmlayeraccess_collection__color_doc, + "Generic RGBA color with 8-bit precision custom-data layer.\n" + "\n" + "type: " + ":class:`BMLayerCollection`"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmlayeraccess_collection__string_doc, + "Generic string custom-data layer (exposed as bytes, 255 max length).\n" + "\n" + "type: " + ":class:`BMLayerCollection`"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmlayeraccess_collection__deform_doc, + "Vertex deform weight :class:`BMDeformVert` (TODO).\n" + "\n" + "type: " + ":class:`BMLayerCollection`" /* TYPE DOESN'T EXIST YET */ ); PyDoc_STRVAR( + /* Wrap. */ bpy_bmlayeraccess_collection__shape_doc, - "Vertex shapekey absolute location (as a 3D Vector).\n\n:type: :class:`BMLayerCollection`"); + "Vertex shapekey absolute location (as a 3D Vector).\n" + "\n" + ":type: :class:`BMLayerCollection`"); PyDoc_STRVAR( + /* Wrap. */ bpy_bmlayeraccess_collection__uv_doc, - "Accessor for :class:`BMLoopUV` UV (as a 2D Vector).\n\ntype: :class:`BMLayerCollection`"); -PyDoc_STRVAR(bpy_bmlayeraccess_collection__skin_doc, - "Accessor for skin layer.\n\ntype: :class:`BMLayerCollection`"); + "Accessor for :class:`BMLoopUV` UV (as a 2D Vector).\n" + "\n" + "type: :class:`BMLayerCollection`"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmlayeraccess_collection__skin_doc, + "Accessor for skin layer.\n" + "\n" + "type: :class:`BMLayerCollection`"); #ifdef WITH_FREESTYLE -PyDoc_STRVAR(bpy_bmlayeraccess_collection__freestyle_edge_doc, - "Accessor for Freestyle edge layer.\n\ntype: :class:`BMLayerCollection`"); -PyDoc_STRVAR(bpy_bmlayeraccess_collection__freestyle_face_doc, - "Accessor for Freestyle face layer.\n\ntype: :class:`BMLayerCollection`"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmlayeraccess_collection__freestyle_edge_doc, + "Accessor for Freestyle edge layer.\n" + "\n" + "type: :class:`BMLayerCollection`"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmlayeraccess_collection__freestyle_face_doc, + "Accessor for Freestyle face layer.\n" + "\n" + "type: :class:`BMLayerCollection`"); #endif static PyObject *bpy_bmlayeraccess_collection_get(BPy_BMLayerAccess *self, void *flag) @@ -110,8 +156,12 @@ static PyObject *bpy_bmlayeraccess_collection_get(BPy_BMLayerAccess *self, void return BPy_BMLayerCollection_CreatePyObject(self->bm, self->htype, type); } -PyDoc_STRVAR(bpy_bmlayercollection_active_doc, - "The active layer of this type (read-only).\n\n:type: :class:`BMLayerItem`"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmlayercollection_active_doc, + "The active layer of this type (read-only).\n" + "\n" + ":type: :class:`BMLayerItem`"); static PyObject *bpy_bmlayercollection_active_get(BPy_BMLayerItem *self, void * /*flag*/) { CustomData *data; @@ -129,9 +179,10 @@ static PyObject *bpy_bmlayercollection_active_get(BPy_BMLayerItem *self, void * Py_RETURN_NONE; } -PyDoc_STRVAR( - bpy_bmlayercollection_is_singleton_doc, - "True if there can exists only one layer of this type (read-only).\n\n:type: boolean"); +PyDoc_STRVAR(bpy_bmlayercollection_is_singleton_doc, + "True if there can exists only one layer of this type (read-only).\n" + "\n" + ":type: boolean"); static PyObject *bpy_bmlayercollection_is_singleton_get(BPy_BMLayerItem *self, void * /*flag*/) { BPY_BM_CHECK_OBJ(self); @@ -139,8 +190,12 @@ static PyObject *bpy_bmlayercollection_is_singleton_get(BPy_BMLayerItem *self, v return PyBool_FromLong(CustomData_layertype_is_singleton(eCustomDataType(self->type))); } -PyDoc_STRVAR(bpy_bmlayercollection_name_doc, - "The layers unique name (read-only).\n\n:type: string"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmlayercollection_name_doc, + "The layers unique name (read-only).\n" + "\n" + ":type: string"); static PyObject *bpy_bmlayeritem_name_get(BPy_BMLayerItem *self, void * /*flag*/) { CustomDataLayer *layer; @@ -364,13 +419,15 @@ static PyGetSetDef bpy_bmlayeritem_getseters[] = { /* BMLayerCollection * ----------------- */ -PyDoc_STRVAR(bpy_bmlayeritem_copy_from_doc, - ".. method:: copy_from(other)\n" - "\n" - " Return a copy of the layer\n" - "\n" - " :arg other: Another layer to copy from.\n" - " :arg other: :class:`BMLayerItem`\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmlayeritem_copy_from_doc, + ".. method:: copy_from(other)\n" + "\n" + " Return a copy of the layer\n" + "\n" + " :arg other: Another layer to copy from.\n" + " :arg other: :class:`BMLayerItem`\n"); static PyObject *bpy_bmlayeritem_copy_from(BPy_BMLayerItem *self, BPy_BMLayerItem *value) { CustomData *data; @@ -405,13 +462,15 @@ static PyObject *bpy_bmlayeritem_copy_from(BPy_BMLayerItem *self, BPy_BMLayerIte } /* similar to new(), but no name arg. */ -PyDoc_STRVAR(bpy_bmlayercollection_verify_doc, - ".. method:: verify()\n" - "\n" - " Create a new layer or return an existing active layer\n" - "\n" - " :return: The newly verified layer.\n" - " :rtype: :class:`BMLayerItem`\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmlayercollection_verify_doc, + ".. method:: verify()\n" + "\n" + " Create a new layer or return an existing active layer\n" + "\n" + " :return: The newly verified layer.\n" + " :rtype: :class:`BMLayerItem`\n"); static PyObject *bpy_bmlayercollection_verify(BPy_BMLayerCollection *self) { int index; @@ -439,15 +498,17 @@ static PyObject *bpy_bmlayercollection_verify(BPy_BMLayerCollection *self) return BPy_BMLayerItem_CreatePyObject(self->bm, self->htype, self->type, index); } -PyDoc_STRVAR(bpy_bmlayercollection_new_doc, - ".. method:: new(name)\n" - "\n" - " Create a new layer\n" - "\n" - " :arg name: Optional name argument (will be made unique).\n" - " :type name: string\n" - " :return: The newly created layer.\n" - " :rtype: :class:`BMLayerItem`\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmlayercollection_new_doc, + ".. method:: new(name)\n" + "\n" + " Create a new layer\n" + "\n" + " :arg name: Optional name argument (will be made unique).\n" + " :type name: string\n" + " :return: The newly created layer.\n" + " :rtype: :class:`BMLayerItem`\n"); static PyObject *bpy_bmlayercollection_new(BPy_BMLayerCollection *self, PyObject *args) { const char *name = nullptr; @@ -489,13 +550,15 @@ static PyObject *bpy_bmlayercollection_new(BPy_BMLayerCollection *self, PyObject return BPy_BMLayerItem_CreatePyObject(self->bm, self->htype, self->type, index); } -PyDoc_STRVAR(bpy_bmlayercollection_remove_doc, - ".. method:: remove(layer)\n" - "\n" - " Remove a layer\n" - "\n" - " :arg layer: The layer to remove.\n" - " :type layer: :class:`BMLayerItem`\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmlayercollection_remove_doc, + ".. method:: remove(layer)\n" + "\n" + " Remove a layer\n" + "\n" + " :arg layer: The layer to remove.\n" + " :type layer: :class:`BMLayerItem`\n"); static PyObject *bpy_bmlayercollection_remove(BPy_BMLayerCollection *self, BPy_BMLayerItem *value) { CustomData *data; @@ -521,14 +584,16 @@ static PyObject *bpy_bmlayercollection_remove(BPy_BMLayerCollection *self, BPy_B Py_RETURN_NONE; } -PyDoc_STRVAR(bpy_bmlayercollection_keys_doc, - ".. method:: keys()\n" - "\n" - " Return the identifiers of collection members\n" - " (matching Python's dict.keys() functionality).\n" - "\n" - " :return: the identifiers for each member of this collection.\n" - " :rtype: list of strings\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmlayercollection_keys_doc, + ".. method:: keys()\n" + "\n" + " Return the identifiers of collection members\n" + " (matching Python's dict.keys() functionality).\n" + "\n" + " :return: the identifiers for each member of this collection.\n" + " :rtype: list of strings\n"); static PyObject *bpy_bmlayercollection_keys(BPy_BMLayerCollection *self) { PyObject *ret; @@ -556,14 +621,16 @@ static PyObject *bpy_bmlayercollection_keys(BPy_BMLayerCollection *self) return ret; } -PyDoc_STRVAR(bpy_bmlayercollection_items_doc, - ".. method:: items()\n" - "\n" - " Return the identifiers of collection members\n" - " (matching Python's dict.items() functionality).\n" - "\n" - " :return: (key, value) pairs for each member of this collection.\n" - " :rtype: list of tuples\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmlayercollection_items_doc, + ".. method:: items()\n" + "\n" + " Return the identifiers of collection members\n" + " (matching Python's dict.items() functionality).\n" + "\n" + " :return: (key, value) pairs for each member of this collection.\n" + " :rtype: list of tuples\n"); static PyObject *bpy_bmlayercollection_items(BPy_BMLayerCollection *self) { PyObject *ret; @@ -591,14 +658,16 @@ static PyObject *bpy_bmlayercollection_items(BPy_BMLayerCollection *self) return ret; } -PyDoc_STRVAR(bpy_bmlayercollection_values_doc, - ".. method:: values()\n" - "\n" - " Return the values of collection\n" - " (matching Python's dict.values() functionality).\n" - "\n" - " :return: the members of this collection.\n" - " :rtype: list\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmlayercollection_values_doc, + ".. method:: values()\n" + "\n" + " Return the values of collection\n" + " (matching Python's dict.values() functionality).\n" + "\n" + " :return: the members of this collection.\n" + " :rtype: list\n"); static PyObject *bpy_bmlayercollection_values(BPy_BMLayerCollection *self) { PyObject *ret; @@ -623,17 +692,19 @@ static PyObject *bpy_bmlayercollection_values(BPy_BMLayerCollection *self) return ret; } -PyDoc_STRVAR(bpy_bmlayercollection_get_doc, - ".. method:: get(key, default=None)\n" - "\n" - " Returns the value of the layer matching the key or default\n" - " when not found (matches Python's dictionary function of the same name).\n" - "\n" - " :arg key: The key associated with the layer.\n" - " :type key: string\n" - " :arg default: Optional argument for the value to return if\n" - " *key* is not found.\n" - " :type default: Undefined\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmlayercollection_get_doc, + ".. method:: get(key, default=None)\n" + "\n" + " Returns the value of the layer matching the key or default\n" + " when not found (matches Python's dictionary function of the same name).\n" + "\n" + " :arg key: The key associated with the layer.\n" + " :type key: string\n" + " :arg default: Optional argument for the value to return if\n" + " *key* is not found.\n" + " :type default: Undefined\n"); static PyObject *bpy_bmlayercollection_get(BPy_BMLayerCollection *self, PyObject *args) { const char *key; @@ -902,17 +973,24 @@ static PyObject *bpy_bmlayercollection_iter(BPy_BMLayerCollection *self) return iter; } -PyDoc_STRVAR(bpy_bmlayeraccess_type_doc, "Exposes custom-data layer attributes."); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmlayeraccess_type_doc, + "Exposes custom-data layer attributes."); -PyDoc_STRVAR(bpy_bmlayercollection_type_doc, - "Gives access to a collection of custom-data layers of the same type and behaves " - "like Python dictionaries, " - "except for the ability to do list like index access."); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmlayercollection_type_doc, + "Gives access to a collection of custom-data layers of the same type and behaves " + "like Python dictionaries, " + "except for the ability to do list like index access."); -PyDoc_STRVAR(bpy_bmlayeritem_type_doc, - "Exposes a single custom data layer, " - "their main purpose is for use as item accessors to custom-data when used with " - "vert/edge/face/loop data."); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmlayeritem_type_doc, + "Exposes a single custom data layer, " + "their main purpose is for use as item accessors to custom-data when used with " + "vert/edge/face/loop data."); PyTypeObject BPy_BMLayerAccessVert_Type; /* bm.verts.layers */ PyTypeObject BPy_BMLayerAccessEdge_Type; /* bm.edges.layers */ diff --git a/source/blender/python/bmesh/bmesh_py_types_meshdata.cc b/source/blender/python/bmesh/bmesh_py_types_meshdata.cc index 87377d8a373..0b264126164 100644 --- a/source/blender/python/bmesh/bmesh_py_types_meshdata.cc +++ b/source/blender/python/bmesh/bmesh_py_types_meshdata.cc @@ -59,8 +59,12 @@ struct BPy_BMLoopUV { BMLoop *loop; }; -PyDoc_STRVAR(bpy_bmloopuv_uv_doc, - "Loops UV (as a 2D Vector).\n\n:type: :class:`mathutils.Vector`"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmloopuv_uv_doc, + "Loops UV (as a 2D Vector).\n" + "\n" + ":type: :class:`mathutils.Vector`"); static PyObject *bpy_bmloopuv_uv_get(BPy_BMLoopUV *self, void * /*closure*/) { return Vector_CreatePyObject_wrap(self->uv, 2, nullptr); @@ -77,9 +81,24 @@ static int bpy_bmloopuv_uv_set(BPy_BMLoopUV *self, PyObject *value, void * /*clo return -1; } -PyDoc_STRVAR(bpy_bmloopuv_pin_uv_doc, "UV pin state.\n\n:type: boolean"); -PyDoc_STRVAR(bpy_bmloopuv_select_doc, "UV select state.\n\n:type: boolean"); -PyDoc_STRVAR(bpy_bmloopuv_select_edge_doc, "UV edge select state.\n\n:type: boolean"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmloopuv_pin_uv_doc, + "UV pin state.\n" + "\n" + ":type: boolean"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmloopuv_select_doc, + "UV select state.\n" + "\n" + ":type: boolean"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmloopuv_select_edge_doc, + "UV edge select state.\n" + "\n" + ":type: boolean"); static PyObject *bpy_bmloopuv_pin_uv_get(BPy_BMLoopUV *self, void * /*closure*/) { @@ -239,8 +258,12 @@ struct BPy_BMVertSkin { MVertSkin *data; }; -PyDoc_STRVAR(bpy_bmvertskin_radius_doc, - "Vert skin radii (as a 2D Vector).\n\n:type: :class:`mathutils.Vector`"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmvertskin_radius_doc, + "Vert skin radii (as a 2D Vector).\n" + "\n" + ":type: :class:`mathutils.Vector`"); static PyObject *bpy_bmvertskin_radius_get(BPy_BMVertSkin *self, void * /*closure*/) { return Vector_CreatePyObject_wrap(self->data->radius, 2, nullptr); @@ -257,10 +280,18 @@ static int bpy_bmvertskin_radius_set(BPy_BMVertSkin *self, PyObject *value, void return -1; } -PyDoc_STRVAR(bpy_bmvertskin_flag__use_root_doc, - "Use as root vertex. Setting this flag does not clear other roots in the same mesh " - "island.\n\n:type: boolean"); -PyDoc_STRVAR(bpy_bmvertskin_flag__use_loose_doc, "Use loose vertex.\n\n:type: boolean"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmvertskin_flag__use_root_doc, + "Use as root vertex. Setting this flag does not clear other roots in the same mesh island.\n" + "\n" + ":type: boolean"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmvertskin_flag__use_loose_doc, + "Use loose vertex.\n" + "\n" + ":type: boolean"); static PyObject *bpy_bmvertskin_flag_get(BPy_BMVertSkin *self, void *flag_p) { @@ -598,14 +629,16 @@ static PyMappingMethods bpy_bmdeformvert_as_mapping = { /* Methods * ======= */ -PyDoc_STRVAR(bpy_bmdeformvert_keys_doc, - ".. method:: keys()\n" - "\n" - " Return the group indices used by this vertex\n" - " (matching Python's dict.keys() functionality).\n" - "\n" - " :return: the deform group this vertex uses\n" - " :rtype: list of ints\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmdeformvert_keys_doc, + ".. method:: keys()\n" + "\n" + " Return the group indices used by this vertex\n" + " (matching Python's dict.keys() functionality).\n" + "\n" + " :return: the deform group this vertex uses\n" + " :rtype: list of ints\n"); static PyObject *bpy_bmdeformvert_keys(BPy_BMDeformVert *self) { PyObject *ret; @@ -620,14 +653,16 @@ static PyObject *bpy_bmdeformvert_keys(BPy_BMDeformVert *self) return ret; } -PyDoc_STRVAR(bpy_bmdeformvert_values_doc, - ".. method:: values()\n" - "\n" - " Return the weights of the deform vertex\n" - " (matching Python's dict.values() functionality).\n" - "\n" - " :return: The weights that influence this vertex\n" - " :rtype: list of floats\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmdeformvert_values_doc, + ".. method:: values()\n" + "\n" + " Return the weights of the deform vertex\n" + " (matching Python's dict.values() functionality).\n" + "\n" + " :return: The weights that influence this vertex\n" + " :rtype: list of floats\n"); static PyObject *bpy_bmdeformvert_values(BPy_BMDeformVert *self) { PyObject *ret; @@ -642,14 +677,16 @@ static PyObject *bpy_bmdeformvert_values(BPy_BMDeformVert *self) return ret; } -PyDoc_STRVAR(bpy_bmdeformvert_items_doc, - ".. method:: items()\n" - "\n" - " Return (group, weight) pairs for this vertex\n" - " (matching Python's dict.items() functionality).\n" - "\n" - " :return: (key, value) pairs for each deform weight of this vertex.\n" - " :rtype: list of tuples\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmdeformvert_items_doc, + ".. method:: items()\n" + "\n" + " Return (group, weight) pairs for this vertex\n" + " (matching Python's dict.items() functionality).\n" + "\n" + " :return: (key, value) pairs for each deform weight of this vertex.\n" + " :rtype: list of tuples\n"); static PyObject *bpy_bmdeformvert_items(BPy_BMDeformVert *self) { PyObject *ret; @@ -667,17 +704,19 @@ static PyObject *bpy_bmdeformvert_items(BPy_BMDeformVert *self) return ret; } -PyDoc_STRVAR(bpy_bmdeformvert_get_doc, - ".. method:: get(key, default=None)\n" - "\n" - " Returns the deform weight matching the key or default\n" - " when not found (matches Python's dictionary function of the same name).\n" - "\n" - " :arg key: The key associated with deform weight.\n" - " :type key: int\n" - " :arg default: Optional argument for the value to return if\n" - " *key* is not found.\n" - " :type default: Undefined\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmdeformvert_get_doc, + ".. method:: get(key, default=None)\n" + "\n" + " Returns the deform weight matching the key or default\n" + " when not found (matches Python's dictionary function of the same name).\n" + "\n" + " :arg key: The key associated with deform weight.\n" + " :type key: int\n" + " :arg default: Optional argument for the value to return if\n" + " *key* is not found.\n" + " :type default: Undefined\n"); static PyObject *bpy_bmdeformvert_get(BPy_BMDeformVert *self, PyObject *args) { int key; @@ -696,10 +735,12 @@ static PyObject *bpy_bmdeformvert_get(BPy_BMDeformVert *self, PyObject *args) return Py_INCREF_RET(def); } -PyDoc_STRVAR(bpy_bmdeformvert_clear_doc, - ".. method:: clear()\n" - "\n" - " Clears all weights.\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmdeformvert_clear_doc, + ".. method:: clear()\n" + "\n" + " Clears all weights.\n"); static PyObject *bpy_bmdeformvert_clear(BPy_BMDeformVert *self) { BKE_defvert_clear(self->data); diff --git a/source/blender/python/bmesh/bmesh_py_types_select.cc b/source/blender/python/bmesh/bmesh_py_types_select.cc index fb21a9155ea..cea2048135f 100644 --- a/source/blender/python/bmesh/bmesh_py_types_select.cc +++ b/source/blender/python/bmesh/bmesh_py_types_select.cc @@ -25,9 +25,13 @@ #include "../generic/py_capi_utils.h" #include "../generic/python_utildefines.h" -PyDoc_STRVAR(bpy_bmeditselseq_active_doc, - "The last selected element or None (read-only).\n\n:type: :class:`BMVert`, " - ":class:`BMEdge` or :class:`BMFace`"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmeditselseq_active_doc, + "The last selected element or None (read-only).\n" + "\n" + ":type: :class:`BMVert`, " + ":class:`BMEdge` or :class:`BMFace`"); static PyObject *bpy_bmeditselseq_active_get(BPy_BMEditSelSeq *self, void * /*closure*/) { BMEditSelection *ese; @@ -49,10 +53,12 @@ static PyGetSetDef bpy_bmeditselseq_getseters[] = { {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */ }; -PyDoc_STRVAR(bpy_bmeditselseq_validate_doc, - ".. method:: validate()\n" - "\n" - " Ensures all elements in the selection history are selected.\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmeditselseq_validate_doc, + ".. method:: validate()\n" + "\n" + " Ensures all elements in the selection history are selected.\n"); static PyObject *bpy_bmeditselseq_validate(BPy_BMEditSelSeq *self) { BPY_BM_CHECK_OBJ(self); @@ -60,10 +66,12 @@ static PyObject *bpy_bmeditselseq_validate(BPy_BMEditSelSeq *self) Py_RETURN_NONE; } -PyDoc_STRVAR(bpy_bmeditselseq_clear_doc, - ".. method:: clear()\n" - "\n" - " Empties the selection history.\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmeditselseq_clear_doc, + ".. method:: clear()\n" + "\n" + " Empties the selection history.\n"); static PyObject *bpy_bmeditselseq_clear(BPy_BMEditSelSeq *self) { BPY_BM_CHECK_OBJ(self); @@ -72,6 +80,7 @@ static PyObject *bpy_bmeditselseq_clear(BPy_BMEditSelSeq *self) } PyDoc_STRVAR( + /* Wrap. */ bpy_bmeditselseq_add_doc, ".. method:: add(element)\n" "\n" @@ -93,10 +102,12 @@ static PyObject *bpy_bmeditselseq_add(BPy_BMEditSelSeq *self, BPy_BMElem *value) Py_RETURN_NONE; } -PyDoc_STRVAR(bpy_bmeditselseq_remove_doc, - ".. method:: remove(element)\n" - "\n" - " Remove an element from the selection history.\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bmeditselseq_remove_doc, + ".. method:: remove(element)\n" + "\n" + " Remove an element from the selection history.\n"); static PyObject *bpy_bmeditselseq_remove(BPy_BMEditSelSeq *self, BPy_BMElem *value) { BPY_BM_CHECK_OBJ(self); @@ -118,6 +129,7 @@ static PyObject *bpy_bmeditselseq_remove(BPy_BMEditSelSeq *self, BPy_BMElem *val } PyDoc_STRVAR( + /* Wrap. */ bpy_bmeditselseq_discard_doc, ".. method:: discard(element)\n" "\n" diff --git a/source/blender/python/bmesh/bmesh_py_utils.cc b/source/blender/python/bmesh/bmesh_py_utils.cc index 2a431dde080..b04df38a07c 100644 --- a/source/blender/python/bmesh/bmesh_py_utils.cc +++ b/source/blender/python/bmesh/bmesh_py_utils.cc @@ -25,17 +25,19 @@ #include "../generic/py_capi_utils.h" #include "../generic/python_utildefines.h" -PyDoc_STRVAR(bpy_bm_utils_vert_collapse_edge_doc, - ".. method:: vert_collapse_edge(vert, edge)\n" - "\n" - " Collapse a vertex into an edge.\n" - "\n" - " :arg vert: The vert that will be collapsed.\n" - " :type vert: :class:`bmesh.types.BMVert`\n" - " :arg edge: The edge to collapse into.\n" - " :type edge: :class:`bmesh.types.BMEdge`\n" - " :return: The resulting edge from the collapse operation.\n" - " :rtype: :class:`bmesh.types.BMEdge`\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bm_utils_vert_collapse_edge_doc, + ".. method:: vert_collapse_edge(vert, edge)\n" + "\n" + " Collapse a vertex into an edge.\n" + "\n" + " :arg vert: The vert that will be collapsed.\n" + " :type vert: :class:`bmesh.types.BMVert`\n" + " :arg edge: The edge to collapse into.\n" + " :type edge: :class:`bmesh.types.BMEdge`\n" + " :return: The resulting edge from the collapse operation.\n" + " :rtype: :class:`bmesh.types.BMEdge`\n"); static PyObject *bpy_bm_utils_vert_collapse_edge(PyObject * /*self*/, PyObject *args) { BPy_BMEdge *py_edge; @@ -79,23 +81,25 @@ static PyObject *bpy_bm_utils_vert_collapse_edge(PyObject * /*self*/, PyObject * return nullptr; } -PyDoc_STRVAR(bpy_bm_utils_vert_collapse_faces_doc, - ".. method:: vert_collapse_faces(vert, edge, fac, join_faces)\n" - "\n" - " Collapses a vertex that has only two manifold edges onto a vertex it shares an " - "edge with.\n" - "\n" - " :arg vert: The vert that will be collapsed.\n" - " :type vert: :class:`bmesh.types.BMVert`\n" - " :arg edge: The edge to collapse into.\n" - " :type edge: :class:`bmesh.types.BMEdge`\n" - " :arg fac: The factor to use when merging customdata [0 - 1].\n" - " :type fac: float\n" - " :arg join_faces: When true the faces around the vertex will be joined otherwise " - "collapse the vertex by merging the 2 edges this vertex connects to into one.\n" - " :type join_faces: bool\n" - " :return: The resulting edge from the collapse operation.\n" - " :rtype: :class:`bmesh.types.BMEdge`\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bm_utils_vert_collapse_faces_doc, + ".. method:: vert_collapse_faces(vert, edge, fac, join_faces)\n" + "\n" + " Collapses a vertex that has only two manifold edges onto a vertex it shares an " + "edge with.\n" + "\n" + " :arg vert: The vert that will be collapsed.\n" + " :type vert: :class:`bmesh.types.BMVert`\n" + " :arg edge: The edge to collapse into.\n" + " :type edge: :class:`bmesh.types.BMEdge`\n" + " :arg fac: The factor to use when merging customdata [0 - 1].\n" + " :type fac: float\n" + " :arg join_faces: When true the faces around the vertex will be joined otherwise " + "collapse the vertex by merging the 2 edges this vertex connects to into one.\n" + " :type join_faces: bool\n" + " :return: The resulting edge from the collapse operation.\n" + " :rtype: :class:`bmesh.types.BMEdge`\n"); static PyObject *bpy_bm_utils_vert_collapse_faces(PyObject * /*self*/, PyObject *args) { BPy_BMEdge *py_edge; @@ -149,15 +153,17 @@ static PyObject *bpy_bm_utils_vert_collapse_faces(PyObject * /*self*/, PyObject return nullptr; } -PyDoc_STRVAR(bpy_bm_utils_vert_dissolve_doc, - ".. method:: vert_dissolve(vert)\n" - "\n" - " Dissolve this vertex (will be removed).\n" - "\n" - " :arg vert: The vert to be dissolved.\n" - " :type vert: :class:`bmesh.types.BMVert`\n" - " :return: True when the vertex dissolve is successful.\n" - " :rtype: boolean\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bm_utils_vert_dissolve_doc, + ".. method:: vert_dissolve(vert)\n" + "\n" + " Dissolve this vertex (will be removed).\n" + "\n" + " :arg vert: The vert to be dissolved.\n" + " :type vert: :class:`bmesh.types.BMVert`\n" + " :return: True when the vertex dissolve is successful.\n" + " :rtype: boolean\n"); static PyObject *bpy_bm_utils_vert_dissolve(PyObject * /*self*/, PyObject *args) { BPy_BMVert *py_vert; @@ -175,17 +181,19 @@ static PyObject *bpy_bm_utils_vert_dissolve(PyObject * /*self*/, PyObject *args) return PyBool_FromLong(BM_vert_dissolve(bm, py_vert->v)); } -PyDoc_STRVAR(bpy_bm_utils_vert_splice_doc, - ".. method:: vert_splice(vert, vert_target)\n" - "\n" - " Splice vert into vert_target.\n" - "\n" - " :arg vert: The vertex to be removed.\n" - " :type vert: :class:`bmesh.types.BMVert`\n" - " :arg vert_target: The vertex to use.\n" - " :type vert_target: :class:`bmesh.types.BMVert`\n" - "\n" - " .. note:: The verts mustn't share an edge or face.\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bm_utils_vert_splice_doc, + ".. method:: vert_splice(vert, vert_target)\n" + "\n" + " Splice vert into vert_target.\n" + "\n" + " :arg vert: The vertex to be removed.\n" + " :type vert: :class:`bmesh.types.BMVert`\n" + " :arg vert_target: The vertex to use.\n" + " :type vert_target: :class:`bmesh.types.BMVert`\n" + "\n" + " .. note:: The verts mustn't share an edge or face.\n"); static PyObject *bpy_bm_utils_vert_splice(PyObject * /*self*/, PyObject *args) { BPy_BMVert *py_vert; @@ -230,17 +238,19 @@ static PyObject *bpy_bm_utils_vert_splice(PyObject * /*self*/, PyObject *args) Py_RETURN_NONE; } -PyDoc_STRVAR(bpy_bm_utils_vert_separate_doc, - ".. method:: vert_separate(vert, edges)\n" - "\n" - " Separate this vertex at every edge.\n" - "\n" - " :arg vert: The vert to be separated.\n" - " :type vert: :class:`bmesh.types.BMVert`\n" - " :arg edges: The edges to separated.\n" - " :type edges: :class:`bmesh.types.BMEdge`\n" - " :return: The newly separated verts (including the vertex passed).\n" - " :rtype: tuple of :class:`bmesh.types.BMVert`\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bm_utils_vert_separate_doc, + ".. method:: vert_separate(vert, edges)\n" + "\n" + " Separate this vertex at every edge.\n" + "\n" + " :arg vert: The vert to be separated.\n" + " :type vert: :class:`bmesh.types.BMVert`\n" + " :arg edges: The edges to separated.\n" + " :type edges: :class:`bmesh.types.BMEdge`\n" + " :return: The newly separated verts (including the vertex passed).\n" + " :rtype: tuple of :class:`bmesh.types.BMVert`\n"); static PyObject *bpy_bm_utils_vert_separate(PyObject * /*self*/, PyObject *args) { BPy_BMVert *py_vert; @@ -288,19 +298,21 @@ static PyObject *bpy_bm_utils_vert_separate(PyObject * /*self*/, PyObject *args) return ret; } -PyDoc_STRVAR(bpy_bm_utils_edge_split_doc, - ".. method:: edge_split(edge, vert, fac)\n" - "\n" - " Split an edge, return the newly created data.\n" - "\n" - " :arg edge: The edge to split.\n" - " :type edge: :class:`bmesh.types.BMEdge`\n" - " :arg vert: One of the verts on the edge, defines the split direction.\n" - " :type vert: :class:`bmesh.types.BMVert`\n" - " :arg fac: The point on the edge where the new vert will be created [0 - 1].\n" - " :type fac: float\n" - " :return: The newly created (edge, vert) pair.\n" - " :rtype: tuple\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bm_utils_edge_split_doc, + ".. method:: edge_split(edge, vert, fac)\n" + "\n" + " Split an edge, return the newly created data.\n" + "\n" + " :arg edge: The edge to split.\n" + " :type edge: :class:`bmesh.types.BMEdge`\n" + " :arg vert: One of the verts on the edge, defines the split direction.\n" + " :type vert: :class:`bmesh.types.BMVert`\n" + " :arg fac: The point on the edge where the new vert will be created [0 - 1].\n" + " :type fac: float\n" + " :return: The newly created (edge, vert) pair.\n" + " :rtype: tuple\n"); static PyObject *bpy_bm_utils_edge_split(PyObject * /*self*/, PyObject *args) { BPy_BMEdge *py_edge; @@ -343,18 +355,20 @@ static PyObject *bpy_bm_utils_edge_split(PyObject * /*self*/, PyObject *args) return nullptr; } -PyDoc_STRVAR(bpy_bm_utils_edge_rotate_doc, - ".. method:: edge_rotate(edge, ccw=False)\n" - "\n" - " Rotate the edge and return the newly created edge.\n" - " If rotating the edge fails, None will be returned.\n" - "\n" - " :arg edge: The edge to rotate.\n" - " :type edge: :class:`bmesh.types.BMEdge`\n" - " :arg ccw: When True the edge will be rotated counter clockwise.\n" - " :type ccw: boolean\n" - " :return: The newly rotated edge.\n" - " :rtype: :class:`bmesh.types.BMEdge`\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bm_utils_edge_rotate_doc, + ".. method:: edge_rotate(edge, ccw=False)\n" + "\n" + " Rotate the edge and return the newly created edge.\n" + " If rotating the edge fails, None will be returned.\n" + "\n" + " :arg edge: The edge to rotate.\n" + " :type edge: :class:`bmesh.types.BMEdge`\n" + " :arg ccw: When True the edge will be rotated counter clockwise.\n" + " :type ccw: boolean\n" + " :return: The newly rotated edge.\n" + " :rtype: :class:`bmesh.types.BMEdge`\n"); static PyObject *bpy_bm_utils_edge_rotate(PyObject * /*self*/, PyObject *args) { BPy_BMEdge *py_edge; @@ -383,6 +397,7 @@ static PyObject *bpy_bm_utils_edge_rotate(PyObject * /*self*/, PyObject *args) } PyDoc_STRVAR( + /* Wrap. */ bpy_bm_utils_face_split_doc, ".. method:: face_split(face, vert_a, vert_b, coords=(), use_exist=True, example=None)\n" "\n" @@ -517,24 +532,26 @@ static PyObject *bpy_bm_utils_face_split(PyObject * /*self*/, PyObject *args, Py return nullptr; } -PyDoc_STRVAR(bpy_bm_utils_face_split_edgenet_doc, - ".. method:: face_split_edgenet(face, edgenet)\n" - "\n" - " Splits a face into any number of regions defined by an edgenet.\n" - "\n" - " :arg face: The face to split.\n" - " :type face: :class:`bmesh.types.BMFace`\n" - " :arg face: The face to split.\n" - " :type face: :class:`bmesh.types.BMFace`\n" - " :arg edgenet: Sequence of edges.\n" - " :type edgenet: :class:`bmesh.types.BMEdge`\n" - " :return: The newly created faces.\n" - " :rtype: tuple of (:class:`bmesh.types.BMFace`)\n" - "\n" - " .. note::\n" - "\n" - " Regions defined by edges need to connect to the face, otherwise they're " - "ignored as loose edges.\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bm_utils_face_split_edgenet_doc, + ".. method:: face_split_edgenet(face, edgenet)\n" + "\n" + " Splits a face into any number of regions defined by an edgenet.\n" + "\n" + " :arg face: The face to split.\n" + " :type face: :class:`bmesh.types.BMFace`\n" + " :arg face: The face to split.\n" + " :type face: :class:`bmesh.types.BMFace`\n" + " :arg edgenet: Sequence of edges.\n" + " :type edgenet: :class:`bmesh.types.BMEdge`\n" + " :return: The newly created faces.\n" + " :rtype: tuple of (:class:`bmesh.types.BMFace`)\n" + "\n" + " .. note::\n" + "\n" + " Regions defined by edges need to connect to the face, otherwise they're " + "ignored as loose edges.\n"); static PyObject *bpy_bm_utils_face_split_edgenet(PyObject * /*self*/, PyObject *args, PyObject *kw) { static const char *kwlist[] = {"face", "edgenet", nullptr}; @@ -599,17 +616,19 @@ static PyObject *bpy_bm_utils_face_split_edgenet(PyObject * /*self*/, PyObject * return nullptr; } -PyDoc_STRVAR(bpy_bm_utils_face_join_doc, - ".. method:: face_join(faces, remove=True)\n" - "\n" - " Joins a sequence of faces.\n" - "\n" - " :arg faces: Sequence of faces.\n" - " :type faces: :class:`bmesh.types.BMFace`\n" - " :arg remove: Remove the edges and vertices between the faces.\n" - " :type remove: boolean\n" - " :return: The newly created face or None on failure.\n" - " :rtype: :class:`bmesh.types.BMFace`\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bm_utils_face_join_doc, + ".. method:: face_join(faces, remove=True)\n" + "\n" + " Joins a sequence of faces.\n" + "\n" + " :arg faces: Sequence of faces.\n" + " :type faces: :class:`bmesh.types.BMFace`\n" + " :arg remove: Remove the edges and vertices between the faces.\n" + " :type remove: boolean\n" + " :return: The newly created face or None on failure.\n" + " :rtype: :class:`bmesh.types.BMFace`\n"); static PyObject *bpy_bm_utils_face_join(PyObject * /*self*/, PyObject *args) { BMesh *bm = nullptr; @@ -651,6 +670,7 @@ static PyObject *bpy_bm_utils_face_join(PyObject * /*self*/, PyObject *args) } PyDoc_STRVAR( + /* Wrap. */ bpy_bm_utils_face_vert_separate_doc, ".. method:: face_vert_separate(face, vert)\n" "\n" @@ -703,13 +723,15 @@ static PyObject *bpy_bm_utils_face_vert_separate(PyObject * /*self*/, PyObject * Py_RETURN_NONE; } -PyDoc_STRVAR(bpy_bm_utils_face_flip_doc, - ".. method:: face_flip(faces)\n" - "\n" - " Flip the faces direction.\n" - "\n" - " :arg face: Face to flip.\n" - " :type face: :class:`bmesh.types.BMFace`\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bm_utils_face_flip_doc, + ".. method:: face_flip(faces)\n" + "\n" + " Flip the faces direction.\n" + "\n" + " :arg face: Face to flip.\n" + " :type face: :class:`bmesh.types.BMFace`\n"); static PyObject *bpy_bm_utils_face_flip(PyObject * /*self*/, BPy_BMFace *value) { if (!BPy_BMFace_Check(value)) { @@ -726,15 +748,17 @@ static PyObject *bpy_bm_utils_face_flip(PyObject * /*self*/, BPy_BMFace *value) Py_RETURN_NONE; } -PyDoc_STRVAR(bpy_bm_utils_loop_separate_doc, - ".. method:: loop_separate(loop)\n" - "\n" - " Rip a vertex in a face away and add a new vertex.\n" - "\n" - " :arg loop: The loop to separate.\n" - " :type loop: :class:`bmesh.types.BMLoop`\n" - " :return vert: The newly created vertex or None on failure.\n" - " :rtype vert: :class:`bmesh.types.BMVert`\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_bm_utils_loop_separate_doc, + ".. method:: loop_separate(loop)\n" + "\n" + " Rip a vertex in a face away and add a new vertex.\n" + "\n" + " :arg loop: The loop to separate.\n" + " :type loop: :class:`bmesh.types.BMLoop`\n" + " :return vert: The newly created vertex or None on failure.\n" + " :rtype vert: :class:`bmesh.types.BMVert`\n"); static PyObject *bpy_bm_utils_loop_separate(PyObject * /*self*/, BPy_BMLoop *value) { BMesh *bm; @@ -822,7 +846,10 @@ static PyMethodDef BPy_BM_utils_methods[] = { # pragma GCC diagnostic pop #endif -PyDoc_STRVAR(BPy_BM_utils_doc, "This module provides access to blenders bmesh data structures."); +PyDoc_STRVAR( + /* Wrap. */ + BPy_BM_utils_doc, + "This module provides access to blenders bmesh data structures."); static PyModuleDef BPy_BM_utils_module_def = { /*m_base*/ PyModuleDef_HEAD_INIT, /*m_name*/ "bmesh.utils", diff --git a/source/blender/python/generic/bl_math_py_api.cc b/source/blender/python/generic/bl_math_py_api.cc index f14c64c5baf..6a2556e231e 100644 --- a/source/blender/python/generic/bl_math_py_api.cc +++ b/source/blender/python/generic/bl_math_py_api.cc @@ -21,7 +21,10 @@ /** \name Module Doc String * \{ */ -PyDoc_STRVAR(M_bl_math_doc, "Miscellaneous math utilities module"); +PyDoc_STRVAR( + /* Wrap. */ + M_bl_math_doc, + "Miscellaneous math utilities module"); /** \} */ @@ -29,20 +32,22 @@ PyDoc_STRVAR(M_bl_math_doc, "Miscellaneous math utilities module"); /** \name Python Functions * \{ */ -PyDoc_STRVAR(py_bl_math_clamp_doc, - ".. function:: clamp(value, min=0, max=1)\n" - "\n" - " Clamps the float value between minimum and maximum. To avoid\n" - " confusion, any call must use either one or all three arguments.\n" - "\n" - " :arg value: The value to clamp.\n" - " :type value: float\n" - " :arg min: The minimum value, defaults to 0.\n" - " :type min: float\n" - " :arg max: The maximum value, defaults to 1.\n" - " :type max: float\n" - " :return: The clamped value.\n" - " :rtype: float\n"); +PyDoc_STRVAR( + /* Wrap. */ + py_bl_math_clamp_doc, + ".. function:: clamp(value, min=0, max=1)\n" + "\n" + " Clamps the float value between minimum and maximum. To avoid\n" + " confusion, any call must use either one or all three arguments.\n" + "\n" + " :arg value: The value to clamp.\n" + " :type value: float\n" + " :arg min: The minimum value, defaults to 0.\n" + " :type min: float\n" + " :arg max: The maximum value, defaults to 1.\n" + " :type max: float\n" + " :return: The clamped value.\n" + " :rtype: float\n"); static PyObject *py_bl_math_clamp(PyObject * /*self*/, PyObject *args) { double x, minv = 0.0, maxv = 1.0; @@ -63,19 +68,21 @@ static PyObject *py_bl_math_clamp(PyObject * /*self*/, PyObject *args) return PyFloat_FromDouble(x); } -PyDoc_STRVAR(py_bl_math_lerp_doc, - ".. function:: lerp(from_value, to_value, factor)\n" - "\n" - " Linearly interpolate between two float values based on factor.\n" - "\n" - " :arg from_value: The value to return when factor is 0.\n" - " :type from_value: float\n" - " :arg to_value: The value to return when factor is 1.\n" - " :type to_value: float\n" - " :arg factor: The interpolation value, normally in [0.0, 1.0].\n" - " :type factor: float\n" - " :return: The interpolated value.\n" - " :rtype: float\n"); +PyDoc_STRVAR( + /* Wrap. */ + py_bl_math_lerp_doc, + ".. function:: lerp(from_value, to_value, factor)\n" + "\n" + " Linearly interpolate between two float values based on factor.\n" + "\n" + " :arg from_value: The value to return when factor is 0.\n" + " :type from_value: float\n" + " :arg to_value: The value to return when factor is 1.\n" + " :type to_value: float\n" + " :arg factor: The interpolation value, normally in [0.0, 1.0].\n" + " :type factor: float\n" + " :return: The interpolated value.\n" + " :rtype: float\n"); static PyObject *py_bl_math_lerp(PyObject * /*self*/, PyObject *args) { double a, b, x; @@ -86,21 +93,23 @@ static PyObject *py_bl_math_lerp(PyObject * /*self*/, PyObject *args) return PyFloat_FromDouble(a * (1.0 - x) + b * x); } -PyDoc_STRVAR(py_bl_math_smoothstep_doc, - ".. function:: smoothstep(from_value, to_value, value)\n" - "\n" - " Performs smooth interpolation between 0 and 1 as value changes between from and " - "to values.\n" - " Outside the range the function returns the same value as the nearest edge.\n" - "\n" - " :arg from_value: The edge value where the result is 0.\n" - " :type from_value: float\n" - " :arg to_value: The edge value where the result is 1.\n" - " :type to_value: float\n" - " :arg factor: The interpolation value.\n" - " :type factor: float\n" - " :return: The interpolated value in [0.0, 1.0].\n" - " :rtype: float\n"); +PyDoc_STRVAR( + /* Wrap. */ + py_bl_math_smoothstep_doc, + ".. function:: smoothstep(from_value, to_value, value)\n" + "\n" + " Performs smooth interpolation between 0 and 1 as value changes between from and " + "to values.\n" + " Outside the range the function returns the same value as the nearest edge.\n" + "\n" + " :arg from_value: The edge value where the result is 0.\n" + " :type from_value: float\n" + " :arg to_value: The edge value where the result is 1.\n" + " :type to_value: float\n" + " :arg factor: The interpolation value.\n" + " :type factor: float\n" + " :return: The interpolated value in [0.0, 1.0].\n" + " :rtype: float\n"); static PyObject *py_bl_math_smoothstep(PyObject * /*self*/, PyObject *args) { double a, b, x; diff --git a/source/blender/python/generic/blf_py_api.cc b/source/blender/python/generic/blf_py_api.cc index 7df20ac0725..9923bbc213c 100644 --- a/source/blender/python/generic/blf_py_api.cc +++ b/source/blender/python/generic/blf_py_api.cc @@ -23,20 +23,22 @@ #include "python_utildefines.h" -PyDoc_STRVAR(py_blf_position_doc, - ".. function:: position(fontid, x, y, z)\n" - "\n" - " Set the position for drawing text.\n" - "\n" - " :arg fontid: The id of the typeface as returned by :func:`blf.load`, for default " - "font use 0.\n" - " :type fontid: int\n" - " :arg x: X axis position to draw the text.\n" - " :type x: float\n" - " :arg y: Y axis position to draw the text.\n" - " :type y: float\n" - " :arg z: Z axis position to draw the text.\n" - " :type z: float\n"); +PyDoc_STRVAR( + /* Wrap. */ + py_blf_position_doc, + ".. function:: position(fontid, x, y, z)\n" + "\n" + " Set the position for drawing text.\n" + "\n" + " :arg fontid: The id of the typeface as returned by :func:`blf.load`, for default " + "font use 0.\n" + " :type fontid: int\n" + " :arg x: X axis position to draw the text.\n" + " :type x: float\n" + " :arg y: Y axis position to draw the text.\n" + " :type y: float\n" + " :arg z: Z axis position to draw the text.\n" + " :type z: float\n"); static PyObject *py_blf_position(PyObject * /*self*/, PyObject *args) { @@ -52,16 +54,18 @@ static PyObject *py_blf_position(PyObject * /*self*/, PyObject *args) Py_RETURN_NONE; } -PyDoc_STRVAR(py_blf_size_doc, - ".. function:: size(fontid, size)\n" - "\n" - " Set the size for drawing text.\n" - "\n" - " :arg fontid: The id of the typeface as returned by :func:`blf.load`, for default " - "font use 0.\n" - " :type fontid: int\n" - " :arg size: Point size of the font.\n" - " :type size: float\n"); +PyDoc_STRVAR( + /* Wrap. */ + py_blf_size_doc, + ".. function:: size(fontid, size)\n" + "\n" + " Set the size for drawing text.\n" + "\n" + " :arg fontid: The id of the typeface as returned by :func:`blf.load`, for default " + "font use 0.\n" + " :type fontid: int\n" + " :arg size: Point size of the font.\n" + " :type size: float\n"); static PyObject *py_blf_size(PyObject * /*self*/, PyObject *args) { int fontid; @@ -76,16 +80,18 @@ static PyObject *py_blf_size(PyObject * /*self*/, PyObject *args) Py_RETURN_NONE; } -PyDoc_STRVAR(py_blf_aspect_doc, - ".. function:: aspect(fontid, aspect)\n" - "\n" - " Set the aspect for drawing text.\n" - "\n" - " :arg fontid: The id of the typeface as returned by :func:`blf.load`, for default " - "font use 0.\n" - " :type fontid: int\n" - " :arg aspect: The aspect ratio for text drawing to use.\n" - " :type aspect: float\n"); +PyDoc_STRVAR( + /* Wrap. */ + py_blf_aspect_doc, + ".. function:: aspect(fontid, aspect)\n" + "\n" + " Set the aspect for drawing text.\n" + "\n" + " :arg fontid: The id of the typeface as returned by :func:`blf.load`, for default " + "font use 0.\n" + " :type fontid: int\n" + " :arg aspect: The aspect ratio for text drawing to use.\n" + " :type aspect: float\n"); static PyObject *py_blf_aspect(PyObject * /*self*/, PyObject *args) { float aspect; @@ -100,22 +106,24 @@ static PyObject *py_blf_aspect(PyObject * /*self*/, PyObject *args) Py_RETURN_NONE; } -PyDoc_STRVAR(py_blf_color_doc, - ".. function:: color(fontid, r, g, b, a)\n" - "\n" - " Set the color for drawing text.\n" - "\n" - " :arg fontid: The id of the typeface as returned by :func:`blf.load`, for default " - "font use 0.\n" - " :type fontid: int\n" - " :arg r: red channel 0.0 - 1.0.\n" - " :type r: float\n" - " :arg g: green channel 0.0 - 1.0.\n" - " :type g: float\n" - " :arg b: blue channel 0.0 - 1.0.\n" - " :type b: float\n" - " :arg a: alpha channel 0.0 - 1.0.\n" - " :type a: float\n"); +PyDoc_STRVAR( + /* Wrap. */ + py_blf_color_doc, + ".. function:: color(fontid, r, g, b, a)\n" + "\n" + " Set the color for drawing text.\n" + "\n" + " :arg fontid: The id of the typeface as returned by :func:`blf.load`, for default " + "font use 0.\n" + " :type fontid: int\n" + " :arg r: red channel 0.0 - 1.0.\n" + " :type r: float\n" + " :arg g: green channel 0.0 - 1.0.\n" + " :type g: float\n" + " :arg b: blue channel 0.0 - 1.0.\n" + " :type b: float\n" + " :arg a: alpha channel 0.0 - 1.0.\n" + " :type a: float\n"); static PyObject *py_blf_color(PyObject * /*self*/, PyObject *args) { int fontid; @@ -132,16 +140,18 @@ static PyObject *py_blf_color(PyObject * /*self*/, PyObject *args) } #if BLF_BLUR_ENABLE -PyDoc_STRVAR(py_blf_blur_doc, - ".. function:: blur(fontid, radius)\n" - "\n" - " Set the blur radius for drawing text.\n" - "\n" - " :arg fontid: The id of the typeface as returned by :func:`blf.load`, for default " - "font use 0.\n" - " :type fontid: int\n" - " :arg radius: The radius for blurring text (in pixels).\n" - " :type radius: int\n"); +PyDoc_STRVAR( + /* Wrap. */ + py_blf_blur_doc, + ".. function:: blur(fontid, radius)\n" + "\n" + " Set the blur radius for drawing text.\n" + "\n" + " :arg fontid: The id of the typeface as returned by :func:`blf.load`, for default " + "font use 0.\n" + " :type fontid: int\n" + " :arg radius: The radius for blurring text (in pixels).\n" + " :type radius: int\n"); static PyObject *py_blf_blur(PyObject * /*self*/, PyObject *args) { int blur, fontid; @@ -156,16 +166,18 @@ static PyObject *py_blf_blur(PyObject * /*self*/, PyObject *args) } #endif -PyDoc_STRVAR(py_blf_draw_doc, - ".. function:: draw(fontid, text)\n" - "\n" - " Draw text in the current context.\n" - "\n" - " :arg fontid: The id of the typeface as returned by :func:`blf.load`, for default " - "font use 0.\n" - " :type fontid: int\n" - " :arg text: the text to draw.\n" - " :type text: string\n"); +PyDoc_STRVAR( + /* Wrap. */ + py_blf_draw_doc, + ".. function:: draw(fontid, text)\n" + "\n" + " Draw text in the current context.\n" + "\n" + " :arg fontid: The id of the typeface as returned by :func:`blf.load`, for default " + "font use 0.\n" + " :type fontid: int\n" + " :arg text: the text to draw.\n" + " :type text: string\n"); static PyObject *py_blf_draw(PyObject * /*self*/, PyObject *args) { const char *text; @@ -181,18 +193,20 @@ static PyObject *py_blf_draw(PyObject * /*self*/, PyObject *args) Py_RETURN_NONE; } -PyDoc_STRVAR(py_blf_dimensions_doc, - ".. function:: dimensions(fontid, text)\n" - "\n" - " Return the width and height of the text.\n" - "\n" - " :arg fontid: The id of the typeface as returned by :func:`blf.load`, for default " - "font use 0.\n" - " :type fontid: int\n" - " :arg text: the text to draw.\n" - " :type text: string\n" - " :return: the width and height of the text.\n" - " :rtype: tuple of 2 floats\n"); +PyDoc_STRVAR( + /* Wrap. */ + py_blf_dimensions_doc, + ".. function:: dimensions(fontid, text)\n" + "\n" + " Return the width and height of the text.\n" + "\n" + " :arg fontid: The id of the typeface as returned by :func:`blf.load`, for default " + "font use 0.\n" + " :type fontid: int\n" + " :arg text: the text to draw.\n" + " :type text: string\n" + " :return: the width and height of the text.\n" + " :rtype: tuple of 2 floats\n"); static PyObject *py_blf_dimensions(PyObject * /*self*/, PyObject *args) { const char *text; @@ -211,22 +225,24 @@ static PyObject *py_blf_dimensions(PyObject * /*self*/, PyObject *args) return ret; } -PyDoc_STRVAR(py_blf_clipping_doc, - ".. function:: clipping(fontid, xmin, ymin, xmax, ymax)\n" - "\n" - " Set the clipping, enable/disable using CLIPPING.\n" - "\n" - " :arg fontid: The id of the typeface as returned by :func:`blf.load`, for default " - "font use 0.\n" - " :type fontid: int\n" - " :arg xmin: Clip the drawing area by these bounds.\n" - " :type xmin: float\n" - " :arg ymin: Clip the drawing area by these bounds.\n" - " :type ymin: float\n" - " :arg xmax: Clip the drawing area by these bounds.\n" - " :type xmax: float\n" - " :arg ymax: Clip the drawing area by these bounds.\n" - " :type ymax: float\n"); +PyDoc_STRVAR( + /* Wrap. */ + py_blf_clipping_doc, + ".. function:: clipping(fontid, xmin, ymin, xmax, ymax)\n" + "\n" + " Set the clipping, enable/disable using CLIPPING.\n" + "\n" + " :arg fontid: The id of the typeface as returned by :func:`blf.load`, for default " + "font use 0.\n" + " :type fontid: int\n" + " :arg xmin: Clip the drawing area by these bounds.\n" + " :type xmin: float\n" + " :arg ymin: Clip the drawing area by these bounds.\n" + " :type ymin: float\n" + " :arg xmax: Clip the drawing area by these bounds.\n" + " :type xmax: float\n" + " :arg ymax: Clip the drawing area by these bounds.\n" + " :type ymax: float\n"); static PyObject *py_blf_clipping(PyObject * /*self*/, PyObject *args) { float xmin, ymin, xmax, ymax; @@ -241,16 +257,18 @@ static PyObject *py_blf_clipping(PyObject * /*self*/, PyObject *args) Py_RETURN_NONE; } -PyDoc_STRVAR(py_blf_word_wrap_doc, - ".. function:: word_wrap(fontid, wrap_width)\n" - "\n" - " Set the wrap width, enable/disable using WORD_WRAP.\n" - "\n" - " :arg fontid: The id of the typeface as returned by :func:`blf.load`, for default " - "font use 0.\n" - " :type fontid: int\n" - " :arg wrap_width: The width (in pixels) to wrap words at.\n" - " :type wrap_width: int\n"); +PyDoc_STRVAR( + /* Wrap. */ + py_blf_word_wrap_doc, + ".. function:: word_wrap(fontid, wrap_width)\n" + "\n" + " Set the wrap width, enable/disable using WORD_WRAP.\n" + "\n" + " :arg fontid: The id of the typeface as returned by :func:`blf.load`, for default " + "font use 0.\n" + " :type fontid: int\n" + " :arg wrap_width: The width (in pixels) to wrap words at.\n" + " :type wrap_width: int\n"); static PyObject *py_blf_word_wrap(PyObject * /*self*/, PyObject *args) { int wrap_width; @@ -265,16 +283,18 @@ static PyObject *py_blf_word_wrap(PyObject * /*self*/, PyObject *args) Py_RETURN_NONE; } -PyDoc_STRVAR(py_blf_disable_doc, - ".. function:: disable(fontid, option)\n" - "\n" - " Disable option.\n" - "\n" - " :arg fontid: The id of the typeface as returned by :func:`blf.load`, for default " - "font use 0.\n" - " :type fontid: int\n" - " :arg option: One of ROTATION, CLIPPING, SHADOW or KERNING_DEFAULT.\n" - " :type option: int\n"); +PyDoc_STRVAR( + /* Wrap. */ + py_blf_disable_doc, + ".. function:: disable(fontid, option)\n" + "\n" + " Disable option.\n" + "\n" + " :arg fontid: The id of the typeface as returned by :func:`blf.load`, for default " + "font use 0.\n" + " :type fontid: int\n" + " :arg option: One of ROTATION, CLIPPING, SHADOW or KERNING_DEFAULT.\n" + " :type option: int\n"); static PyObject *py_blf_disable(PyObject * /*self*/, PyObject *args) { int option, fontid; @@ -288,16 +308,18 @@ static PyObject *py_blf_disable(PyObject * /*self*/, PyObject *args) Py_RETURN_NONE; } -PyDoc_STRVAR(py_blf_enable_doc, - ".. function:: enable(fontid, option)\n" - "\n" - " Enable option.\n" - "\n" - " :arg fontid: The id of the typeface as returned by :func:`blf.load`, for default " - "font use 0.\n" - " :type fontid: int\n" - " :arg option: One of ROTATION, CLIPPING, SHADOW or KERNING_DEFAULT.\n" - " :type option: int\n"); +PyDoc_STRVAR( + /* Wrap. */ + py_blf_enable_doc, + ".. function:: enable(fontid, option)\n" + "\n" + " Enable option.\n" + "\n" + " :arg fontid: The id of the typeface as returned by :func:`blf.load`, for default " + "font use 0.\n" + " :type fontid: int\n" + " :arg option: One of ROTATION, CLIPPING, SHADOW or KERNING_DEFAULT.\n" + " :type option: int\n"); static PyObject *py_blf_enable(PyObject * /*self*/, PyObject *args) { int option, fontid; @@ -311,16 +333,18 @@ static PyObject *py_blf_enable(PyObject * /*self*/, PyObject *args) Py_RETURN_NONE; } -PyDoc_STRVAR(py_blf_rotation_doc, - ".. function:: rotation(fontid, angle)\n" - "\n" - " Set the text rotation angle, enable/disable using ROTATION.\n" - "\n" - " :arg fontid: The id of the typeface as returned by :func:`blf.load`, for default " - "font use 0.\n" - " :type fontid: int\n" - " :arg angle: The angle for text drawing to use.\n" - " :type angle: float\n"); +PyDoc_STRVAR( + /* Wrap. */ + py_blf_rotation_doc, + ".. function:: rotation(fontid, angle)\n" + "\n" + " Set the text rotation angle, enable/disable using ROTATION.\n" + "\n" + " :arg fontid: The id of the typeface as returned by :func:`blf.load`, for default " + "font use 0.\n" + " :type fontid: int\n" + " :arg angle: The angle for text drawing to use.\n" + " :type angle: float\n"); static PyObject *py_blf_rotation(PyObject * /*self*/, PyObject *args) { float angle; @@ -335,24 +359,26 @@ static PyObject *py_blf_rotation(PyObject * /*self*/, PyObject *args) Py_RETURN_NONE; } -PyDoc_STRVAR(py_blf_shadow_doc, - ".. function:: shadow(fontid, level, r, g, b, a)\n" - "\n" - " Shadow options, enable/disable using SHADOW .\n" - "\n" - " :arg fontid: The id of the typeface as returned by :func:`blf.load`, for default " - "font use 0.\n" - " :type fontid: int\n" - " :arg level: The blur level, can be 3, 5 or 0.\n" - " :type level: int\n" - " :arg r: Shadow color (red channel 0.0 - 1.0).\n" - " :type r: float\n" - " :arg g: Shadow color (green channel 0.0 - 1.0).\n" - " :type g: float\n" - " :arg b: Shadow color (blue channel 0.0 - 1.0).\n" - " :type b: float\n" - " :arg a: Shadow color (alpha channel 0.0 - 1.0).\n" - " :type a: float\n"); +PyDoc_STRVAR( + /* Wrap. */ + py_blf_shadow_doc, + ".. function:: shadow(fontid, level, r, g, b, a)\n" + "\n" + " Shadow options, enable/disable using SHADOW .\n" + "\n" + " :arg fontid: The id of the typeface as returned by :func:`blf.load`, for default " + "font use 0.\n" + " :type fontid: int\n" + " :arg level: The blur level, can be 3, 5 or 0.\n" + " :type level: int\n" + " :arg r: Shadow color (red channel 0.0 - 1.0).\n" + " :type r: float\n" + " :arg g: Shadow color (green channel 0.0 - 1.0).\n" + " :type g: float\n" + " :arg b: Shadow color (blue channel 0.0 - 1.0).\n" + " :type b: float\n" + " :arg a: Shadow color (alpha channel 0.0 - 1.0).\n" + " :type a: float\n"); static PyObject *py_blf_shadow(PyObject * /*self*/, PyObject *args) { int level, fontid; @@ -374,18 +400,20 @@ static PyObject *py_blf_shadow(PyObject * /*self*/, PyObject *args) Py_RETURN_NONE; } -PyDoc_STRVAR(py_blf_shadow_offset_doc, - ".. function:: shadow_offset(fontid, x, y)\n" - "\n" - " Set the offset for shadow text.\n" - "\n" - " :arg fontid: The id of the typeface as returned by :func:`blf.load`, for default " - "font use 0.\n" - " :type fontid: int\n" - " :arg x: Vertical shadow offset value in pixels.\n" - " :type x: float\n" - " :arg y: Horizontal shadow offset value in pixels.\n" - " :type y: float\n"); +PyDoc_STRVAR( + /* Wrap. */ + py_blf_shadow_offset_doc, + ".. function:: shadow_offset(fontid, x, y)\n" + "\n" + " Set the offset for shadow text.\n" + "\n" + " :arg fontid: The id of the typeface as returned by :func:`blf.load`, for default " + "font use 0.\n" + " :type fontid: int\n" + " :arg x: Vertical shadow offset value in pixels.\n" + " :type x: float\n" + " :arg y: Horizontal shadow offset value in pixels.\n" + " :type y: float\n"); static PyObject *py_blf_shadow_offset(PyObject * /*self*/, PyObject *args) { int x, y, fontid; @@ -399,15 +427,17 @@ static PyObject *py_blf_shadow_offset(PyObject * /*self*/, PyObject *args) Py_RETURN_NONE; } -PyDoc_STRVAR(py_blf_load_doc, - ".. function:: load(filepath)\n" - "\n" - " Load a new font.\n" - "\n" - " :arg filepath: the filepath of the font.\n" - " :type filepath: string or bytes\n" - " :return: the new font's fontid or -1 if there was an error.\n" - " :rtype: integer\n"); +PyDoc_STRVAR( + /* Wrap. */ + py_blf_load_doc, + ".. function:: load(filepath)\n" + "\n" + " Load a new font.\n" + "\n" + " :arg filepath: the filepath of the font.\n" + " :type filepath: string or bytes\n" + " :return: the new font's fontid or -1 if there was an error.\n" + " :rtype: integer\n"); static PyObject *py_blf_load(PyObject * /*self*/, PyObject *args) { PyC_UnicodeAsBytesAndSize_Data filepath_data = {nullptr}; @@ -425,13 +455,15 @@ static PyObject *py_blf_load(PyObject * /*self*/, PyObject *args) return PyLong_FromLong(font_id); } -PyDoc_STRVAR(py_blf_unload_doc, - ".. function:: unload(filepath)\n" - "\n" - " Unload an existing font.\n" - "\n" - " :arg filepath: the filepath of the font.\n" - " :type filepath: string or bytes\n"); +PyDoc_STRVAR( + /* Wrap. */ + py_blf_unload_doc, + ".. function:: unload(filepath)\n" + "\n" + " Unload an existing font.\n" + "\n" + " :arg filepath: the filepath of the font.\n" + " :type filepath: string or bytes\n"); static PyObject *py_blf_unload(PyObject * /*self*/, PyObject *args) { PyC_UnicodeAsBytesAndSize_Data filepath_data = {nullptr}; @@ -473,7 +505,10 @@ static PyMethodDef BLF_methods[] = { {nullptr, nullptr, 0, nullptr}, }; -PyDoc_STRVAR(BLF_doc, "This module provides access to Blender's text drawing functions."); +PyDoc_STRVAR( + /* Wrap. */ + BLF_doc, + "This module provides access to Blender's text drawing functions."); static PyModuleDef BLF_module_def = { /*m_base*/ PyModuleDef_HEAD_INIT, /*m_name*/ "blf", diff --git a/source/blender/python/generic/idprop_py_api.cc b/source/blender/python/generic/idprop_py_api.cc index 99c0f5a3f90..85d98cecbd0 100644 --- a/source/blender/python/generic/idprop_py_api.cc +++ b/source/blender/python/generic/idprop_py_api.cc @@ -1259,8 +1259,10 @@ static PySequenceMethods BPy_IDGroup_ViewItems_as_sequence = { /* Methods. */ -PyDoc_STRVAR(BPy_IDGroup_View_reversed_doc, - "Return a reverse iterator over the ID Property keys values or items."); +PyDoc_STRVAR( + /* Wrap. */ + BPy_IDGroup_View_reversed_doc, + "Return a reverse iterator over the ID Property keys values or items."); static PyObject *BPy_IDGroup_View_reversed(BPy_IDGroup_View *self, PyObject * /*ignored*/) { @@ -1327,6 +1329,7 @@ static void IDGroup_View_init_type() * \{ */ PyDoc_STRVAR( + /* Wrap. */ BPy_IDGroup_pop_doc, ".. method:: pop(key, default)\n" "\n" @@ -1484,28 +1487,34 @@ PyObject *BPy_Wrap_GetItems_View_WithID(ID *id, IDProperty *prop) return ret; } -PyDoc_STRVAR(BPy_IDGroup_keys_doc, - ".. method:: keys()\n" - "\n" - " Return the keys associated with this group as a list of strings.\n"); +PyDoc_STRVAR( + /* Wrap. */ + BPy_IDGroup_keys_doc, + ".. method:: keys()\n" + "\n" + " Return the keys associated with this group as a list of strings.\n"); static PyObject *BPy_IDGroup_keys(BPy_IDProperty *self) { return BPy_IDGroup_ViewKeys_CreatePyObject(self); } -PyDoc_STRVAR(BPy_IDGroup_values_doc, - ".. method:: values()\n" - "\n" - " Return the values associated with this group.\n"); +PyDoc_STRVAR( + /* Wrap. */ + BPy_IDGroup_values_doc, + ".. method:: values()\n" + "\n" + " Return the values associated with this group.\n"); static PyObject *BPy_IDGroup_values(BPy_IDProperty *self) { return BPy_IDGroup_ViewValues_CreatePyObject(self); } -PyDoc_STRVAR(BPy_IDGroup_items_doc, - ".. method:: items()\n" - "\n" - " Iterate through the items in the dict; behaves like dictionary method items.\n"); +PyDoc_STRVAR( + /* Wrap. */ + BPy_IDGroup_items_doc, + ".. method:: items()\n" + "\n" + " Iterate through the items in the dict; behaves like dictionary method items.\n"); static PyObject *BPy_IDGroup_items(BPy_IDProperty *self) { return BPy_IDGroup_ViewItems_CreatePyObject(self); @@ -1523,13 +1532,15 @@ static int BPy_IDGroup_Contains(BPy_IDProperty *self, PyObject *value) return IDP_GetPropertyFromGroup(self->prop, name) ? 1 : 0; } -PyDoc_STRVAR(BPy_IDGroup_update_doc, - ".. method:: update(other)\n" - "\n" - " Update key, values.\n" - "\n" - " :arg other: Updates the values in the group with this.\n" - " :type other: :class:`IDPropertyGroup` or dict\n"); +PyDoc_STRVAR( + /* Wrap. */ + BPy_IDGroup_update_doc, + ".. method:: update(other)\n" + "\n" + " Update key, values.\n" + "\n" + " :arg other: Updates the values in the group with this.\n" + " :type other: :class:`IDPropertyGroup` or dict\n"); static PyObject *BPy_IDGroup_update(BPy_IDProperty *self, PyObject *value) { PyObject *pkey, *pval; @@ -1562,29 +1573,35 @@ static PyObject *BPy_IDGroup_update(BPy_IDProperty *self, PyObject *value) Py_RETURN_NONE; } -PyDoc_STRVAR(BPy_IDGroup_to_dict_doc, - ".. method:: to_dict()\n" - "\n" - " Return a purely Python version of the group.\n"); +PyDoc_STRVAR( + /* Wrap. */ + BPy_IDGroup_to_dict_doc, + ".. method:: to_dict()\n" + "\n" + " Return a purely Python version of the group.\n"); static PyObject *BPy_IDGroup_to_dict(BPy_IDProperty *self) { return BPy_IDGroup_MapDataToPy(self->prop); } -PyDoc_STRVAR(BPy_IDGroup_clear_doc, - ".. method:: clear()\n" - "\n" - " Clear all members from this group.\n"); +PyDoc_STRVAR( + /* Wrap. */ + BPy_IDGroup_clear_doc, + ".. method:: clear()\n" + "\n" + " Clear all members from this group.\n"); static PyObject *BPy_IDGroup_clear(BPy_IDProperty *self) { IDP_ClearProperty(self->prop); Py_RETURN_NONE; } -PyDoc_STRVAR(BPy_IDGroup_get_doc, - ".. method:: get(key, default=None)\n" - "\n" - " Return the value for key, if it exists, else default.\n"); +PyDoc_STRVAR( + /* Wrap. */ + BPy_IDGroup_get_doc, + ".. method:: get(key, default=None)\n" + "\n" + " Return the value for key, if it exists, else default.\n"); static PyObject *BPy_IDGroup_get(BPy_IDProperty *self, PyObject *args) { IDProperty *idprop; @@ -1739,8 +1756,10 @@ static PyObject *BPy_IDArray_repr(BPy_IDArray *self) return PyUnicode_FromFormat("", self->prop->len); } -PyDoc_STRVAR(BPy_IDArray_get_typecode_doc, - "The type of the data in the array {'f': float, 'd': double, 'i': int, 'b': bool}."); +PyDoc_STRVAR( + /* Wrap. */ + BPy_IDArray_get_typecode_doc, + "The type of the data in the array {'f': float, 'd': double, 'i': int, 'b': bool}."); static PyObject *BPy_IDArray_get_typecode(BPy_IDArray *self, void * /*closure*/) { const char *typecode; @@ -1779,10 +1798,12 @@ static PyGetSetDef BPy_IDArray_getseters[] = { {nullptr, nullptr, nullptr, nullptr, nullptr}, }; -PyDoc_STRVAR(BPy_IDArray_to_list_doc, - ".. method:: to_list()\n" - "\n" - " Return the array as a list.\n"); +PyDoc_STRVAR( + /* Wrap. */ + BPy_IDArray_to_list_doc, + ".. method:: to_list()\n" + "\n" + " Return the array as a list.\n"); static PyObject *BPy_IDArray_to_list(BPy_IDArray *self) { return BPy_IDGroup_MapDataToPy(self->prop); @@ -2264,8 +2285,10 @@ static PyMethodDef IDProp_methods[] = { {nullptr, nullptr, 0, nullptr}, }; -PyDoc_STRVAR(IDProp_module_doc, - "This module provides access id property types (currently mainly for docs)."); +PyDoc_STRVAR( + /* Wrap. */ + IDProp_module_doc, + "This module provides access id property types (currently mainly for docs)."); static PyModuleDef IDProp_module_def = { /*m_base*/ PyModuleDef_HEAD_INIT, /*m_name*/ "idprop", diff --git a/source/blender/python/generic/idprop_py_ui_api.cc b/source/blender/python/generic/idprop_py_ui_api.cc index 75fe1ddbfb8..539bc3bd30e 100644 --- a/source/blender/python/generic/idprop_py_ui_api.cc +++ b/source/blender/python/generic/idprop_py_ui_api.cc @@ -608,23 +608,25 @@ static bool idprop_ui_data_update_id(IDProperty *idprop, PyObject *args, PyObjec return true; } -PyDoc_STRVAR(BPy_IDPropertyUIManager_update_doc, - ".. method:: update( " - "subtype=None, " - "min=None, " - "max=None, " - "soft_min=None, " - "soft_max=None, " - "precision=None, " - "step=None, " - "default=None, " - "id_type=None, " - "items=None, " - "description=None)\n" - "\n" - " Update the RNA information of the IDProperty used for interaction and\n" - " display in the user interface. The required types for many of the keyword\n" - " arguments depend on the type of the property.\n "); +PyDoc_STRVAR( + /* Wrap. */ + BPy_IDPropertyUIManager_update_doc, + ".. method:: update( " + "subtype=None, " + "min=None, " + "max=None, " + "soft_min=None, " + "soft_max=None, " + "precision=None, " + "step=None, " + "default=None, " + "id_type=None, " + "items=None, " + "description=None)\n" + "\n" + " Update the RNA information of the IDProperty used for interaction and\n" + " display in the user interface. The required types for many of the keyword\n" + " arguments depend on the type of the property.\n "); static PyObject *BPy_IDPropertyUIManager_update(BPy_IDPropertyUIManager *self, PyObject *args, PyObject *kwargs) @@ -813,11 +815,13 @@ static void idprop_ui_data_to_dict_id(IDProperty *property, PyObject *dict) Py_DECREF(item); } -PyDoc_STRVAR(BPy_IDPropertyUIManager_as_dict_doc, - ".. method:: as_dict()\n" - "\n" - " Return a dictionary of the property's RNA UI data. The fields in the\n" - " returned dictionary and their types will depend on the property's type.\n"); +PyDoc_STRVAR( + /* Wrap. */ + BPy_IDPropertyUIManager_as_dict_doc, + ".. method:: as_dict()\n" + "\n" + " Return a dictionary of the property's RNA UI data. The fields in the\n" + " returned dictionary and their types will depend on the property's type.\n"); static PyObject *BPy_IDIDPropertyUIManager_as_dict(BPy_IDPropertyUIManager *self) { IDProperty *property = self->property; @@ -874,10 +878,12 @@ static PyObject *BPy_IDIDPropertyUIManager_as_dict(BPy_IDPropertyUIManager *self /** \name UI Data Clear * \{ */ -PyDoc_STRVAR(BPy_IDPropertyUIManager_clear_doc, - ".. method:: clear()\n" - "\n" - " Remove the RNA UI data from this IDProperty.\n"); +PyDoc_STRVAR( + /* Wrap. */ + BPy_IDPropertyUIManager_clear_doc, + ".. method:: clear()\n" + "\n" + " Remove the RNA UI data from this IDProperty.\n"); static PyObject *BPy_IDPropertyUIManager_clear(BPy_IDPropertyUIManager *self) { IDProperty *property = self->property; @@ -903,6 +909,7 @@ static PyObject *BPy_IDPropertyUIManager_clear(BPy_IDPropertyUIManager *self) * \{ */ PyDoc_STRVAR( + /* Wrap. */ BPy_IDPropertyUIManager_update_from_doc, ".. method:: update_from(ui_manager_source)\n" "\n" diff --git a/source/blender/python/generic/imbuf_py_api.cc b/source/blender/python/generic/imbuf_py_api.cc index 2bc256cda2d..297a5d3a968 100644 --- a/source/blender/python/generic/imbuf_py_api.cc +++ b/source/blender/python/generic/imbuf_py_api.cc @@ -71,15 +71,17 @@ static int py_imbuf_valid_check(Py_ImBuf *self) /** \name Methods * \{ */ -PyDoc_STRVAR(py_imbuf_resize_doc, - ".. method:: resize(size, method='FAST')\n" - "\n" - " Resize the image.\n" - "\n" - " :arg size: New size.\n" - " :type size: pair of ints\n" - " :arg method: Method of resizing ('FAST', 'BILINEAR')\n" - " :type method: str\n"); +PyDoc_STRVAR( + /* Wrap. */ + py_imbuf_resize_doc, + ".. method:: resize(size, method='FAST')\n" + "\n" + " Resize the image.\n" + "\n" + " :arg size: New size.\n" + " :type size: pair of ints\n" + " :arg method: Method of resizing ('FAST', 'BILINEAR')\n" + " :type method: str\n"); static PyObject *py_imbuf_resize(Py_ImBuf *self, PyObject *args, PyObject *kw) { PY_IMBUF_CHECK_OBJ(self); @@ -126,15 +128,17 @@ static PyObject *py_imbuf_resize(Py_ImBuf *self, PyObject *args, PyObject *kw) Py_RETURN_NONE; } -PyDoc_STRVAR(py_imbuf_crop_doc, - ".. method:: crop(min, max)\n" - "\n" - " Crop the image.\n" - "\n" - " :arg min: X, Y minimum.\n" - " :type min: pair of ints\n" - " :arg max: X, Y maximum.\n" - " :type max: pair of ints\n"); +PyDoc_STRVAR( + /* Wrap. */ + py_imbuf_crop_doc, + ".. method:: crop(min, max)\n" + "\n" + " Crop the image.\n" + "\n" + " :arg min: X, Y minimum.\n" + " :type min: pair of ints\n" + " :arg max: X, Y maximum.\n" + " :type max: pair of ints\n"); static PyObject *py_imbuf_crop(Py_ImBuf *self, PyObject *args, PyObject *kw) { PY_IMBUF_CHECK_OBJ(self); @@ -172,11 +176,13 @@ static PyObject *py_imbuf_crop(Py_ImBuf *self, PyObject *args, PyObject *kw) Py_RETURN_NONE; } -PyDoc_STRVAR(py_imbuf_copy_doc, - ".. method:: copy()\n" - "\n" - " :return: A copy of the image.\n" - " :rtype: :class:`ImBuf`\n"); +PyDoc_STRVAR( + /* Wrap. */ + py_imbuf_copy_doc, + ".. method:: copy()\n" + "\n" + " :return: A copy of the image.\n" + " :rtype: :class:`ImBuf`\n"); static PyObject *py_imbuf_copy(Py_ImBuf *self) { PY_IMBUF_CHECK_OBJ(self); @@ -199,10 +205,12 @@ static PyObject *py_imbuf_deepcopy(Py_ImBuf *self, PyObject *args) return py_imbuf_copy(self); } -PyDoc_STRVAR(py_imbuf_free_doc, - ".. method:: free()\n" - "\n" - " Clear image data immediately (causing an error on re-use).\n"); +PyDoc_STRVAR( + /* Wrap. */ + py_imbuf_free_doc, + ".. method:: free()\n" + "\n" + " Clear image data immediately (causing an error on re-use).\n"); static PyObject *py_imbuf_free(Py_ImBuf *self) { if (self->ibuf) { @@ -237,7 +245,12 @@ static PyMethodDef Py_ImBuf_methods[] = { /** \name Attributes * \{ */ -PyDoc_STRVAR(py_imbuf_size_doc, "size of the image in pixels.\n\n:type: pair of ints"); +PyDoc_STRVAR( + /* Wrap. */ + py_imbuf_size_doc, + "size of the image in pixels.\n" + "\n" + ":type: pair of ints"); static PyObject *py_imbuf_size_get(Py_ImBuf *self, void * /*closure*/) { PY_IMBUF_CHECK_OBJ(self); @@ -245,7 +258,12 @@ static PyObject *py_imbuf_size_get(Py_ImBuf *self, void * /*closure*/) return PyC_Tuple_Pack_I32({ibuf->x, ibuf->y}); } -PyDoc_STRVAR(py_imbuf_ppm_doc, "pixels per meter.\n\n:type: pair of floats"); +PyDoc_STRVAR( + /* Wrap. */ + py_imbuf_ppm_doc, + "pixels per meter.\n" + "\n" + ":type: pair of floats"); static PyObject *py_imbuf_ppm_get(Py_ImBuf *self, void * /*closure*/) { PY_IMBUF_CHECK_OBJ(self); @@ -273,7 +291,12 @@ static int py_imbuf_ppm_set(Py_ImBuf *self, PyObject *value, void * /*closure*/) return 0; } -PyDoc_STRVAR(py_imbuf_filepath_doc, "filepath associated with this image.\n\n:type: string"); +PyDoc_STRVAR( + /* Wrap. */ + py_imbuf_filepath_doc, + "filepath associated with this image.\n" + "\n" + ":type: string"); static PyObject *py_imbuf_filepath_get(Py_ImBuf *self, void * /*closure*/) { PY_IMBUF_CHECK_OBJ(self); @@ -302,7 +325,12 @@ static int py_imbuf_filepath_set(Py_ImBuf *self, PyObject *value, void * /*closu return 0; } -PyDoc_STRVAR(py_imbuf_planes_doc, "Number of bits associated with this image.\n\n:type: int"); +PyDoc_STRVAR( + /* Wrap. */ + py_imbuf_planes_doc, + "Number of bits associated with this image.\n" + "\n" + ":type: int"); static PyObject *py_imbuf_planes_get(Py_ImBuf *self, void * /*closure*/) { PY_IMBUF_CHECK_OBJ(self); @@ -310,7 +338,12 @@ static PyObject *py_imbuf_planes_get(Py_ImBuf *self, void * /*closure*/) return PyLong_FromLong(imbuf->planes); } -PyDoc_STRVAR(py_imbuf_channels_doc, "Number of bit-planes.\n\n:type: int"); +PyDoc_STRVAR( + /* Wrap. */ + py_imbuf_channels_doc, + "Number of bit-planes.\n" + "\n" + ":type: int"); static PyObject *py_imbuf_channels_get(Py_ImBuf *self, void * /*closure*/) { PY_IMBUF_CHECK_OBJ(self); @@ -431,15 +464,17 @@ static PyObject *Py_ImBuf_CreatePyObject(ImBuf *ibuf) /** \name Module Functions * \{ */ -PyDoc_STRVAR(M_imbuf_new_doc, - ".. function:: new(size)\n" - "\n" - " Load a new image.\n" - "\n" - " :arg size: The size of the image in pixels.\n" - " :type size: pair of ints\n" - " :return: the newly loaded image.\n" - " :rtype: :class:`ImBuf`\n"); +PyDoc_STRVAR( + /* Wrap. */ + M_imbuf_new_doc, + ".. function:: new(size)\n" + "\n" + " Load a new image.\n" + "\n" + " :arg size: The size of the image in pixels.\n" + " :type size: pair of ints\n" + " :return: the newly loaded image.\n" + " :rtype: :class:`ImBuf`\n"); static PyObject *M_imbuf_new(PyObject * /*self*/, PyObject *args, PyObject *kw) { int size[2]; @@ -494,15 +529,17 @@ static PyObject *imbuf_load_impl(const char *filepath) return Py_ImBuf_CreatePyObject(ibuf); } -PyDoc_STRVAR(M_imbuf_load_doc, - ".. function:: load(filepath)\n" - "\n" - " Load an image from a file.\n" - "\n" - " :arg filepath: the filepath of the image.\n" - " :type filepath: string or bytes\n" - " :return: the newly loaded image.\n" - " :rtype: :class:`ImBuf`\n"); +PyDoc_STRVAR( + /* Wrap. */ + M_imbuf_load_doc, + ".. function:: load(filepath)\n" + "\n" + " Load an image from a file.\n" + "\n" + " :arg filepath: the filepath of the image.\n" + " :type filepath: string or bytes\n" + " :return: the newly loaded image.\n" + " :rtype: :class:`ImBuf`\n"); static PyObject *M_imbuf_load(PyObject * /*self*/, PyObject *args, PyObject *kw) { PyC_UnicodeAsBytesAndSize_Data filepath_data = {nullptr}; @@ -538,6 +575,7 @@ static PyObject *imbuf_write_impl(ImBuf *ibuf, const char *filepath) } PyDoc_STRVAR( + /* Wrap. */ M_imbuf_write_doc, ".. function:: write(image, filepath=image.filepath)\n" "\n" @@ -605,11 +643,13 @@ static PyMethodDef IMB_methods[] = { # pragma GCC diagnostic pop #endif -PyDoc_STRVAR(IMB_doc, - "This module provides access to Blender's image manipulation API.\n" - "\n" - "It provides access to image buffers outside of Blender's\n" - ":class:`bpy.types.Image` data-block context.\n"); +PyDoc_STRVAR( + /* Wrap. */ + IMB_doc, + "This module provides access to Blender's image manipulation API.\n" + "\n" + "It provides access to image buffers outside of Blender's\n" + ":class:`bpy.types.Image` data-block context.\n"); static PyModuleDef IMB_module_def = { /*m_base*/ PyModuleDef_HEAD_INIT, /*m_name*/ "imbuf", @@ -646,13 +686,15 @@ PyObject *BPyInit_imbuf() * for docs and the ability to use with built-ins such as `isinstance`, `issubclass`. * \{ */ -PyDoc_STRVAR(IMB_types_doc, - "This module provides access to image buffer types.\n" - "\n" - ".. note::\n" - "\n" - " Image buffer is also the structure used by :class:`bpy.types.Image`\n" - " ID type to store and manipulate image data at runtime.\n"); +PyDoc_STRVAR( + /* Wrap. */ + IMB_types_doc, + "This module provides access to image buffer types.\n" + "\n" + ".. note::\n" + "\n" + " Image buffer is also the structure used by :class:`bpy.types.Image`\n" + " ID type to store and manipulate image data at runtime.\n"); static PyModuleDef IMB_types_module_def = { /*m_base*/ PyModuleDef_HEAD_INIT, diff --git a/source/blender/python/gpu/gpu_py_api.cc b/source/blender/python/gpu/gpu_py_api.cc index 1c292176e9b..402acc7eb54 100644 --- a/source/blender/python/gpu/gpu_py_api.cc +++ b/source/blender/python/gpu/gpu_py_api.cc @@ -31,9 +31,11 @@ /** \name GPU Module * \{ */ -PyDoc_STRVAR(pygpu_doc, - "This module provides Python wrappers for the GPU implementation in Blender.\n" - "Some higher level functions can be found in the `gpu_extras` module."); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_doc, + "This module provides Python wrappers for the GPU implementation in Blender.\n" + "Some higher level functions can be found in the `gpu_extras` module."); static PyModuleDef pygpu_module_def = { /*m_base*/ PyModuleDef_HEAD_INIT, /*m_name*/ "gpu", diff --git a/source/blender/python/gpu/gpu_py_batch.cc b/source/blender/python/gpu/gpu_py_batch.cc index eac6a414398..98e1bf62e4a 100644 --- a/source/blender/python/gpu/gpu_py_batch.cc +++ b/source/blender/python/gpu/gpu_py_batch.cc @@ -121,7 +121,9 @@ static PyObject *pygpu_batch__tp_new(PyTypeObject * /*type*/, PyObject *args, Py return (PyObject *)ret; } -PyDoc_STRVAR(pygpu_batch_vertbuf_add_doc, ".. method:: vertbuf_add(buf)\n" +PyDoc_STRVAR( + /* Wrap. */ + pygpu_batch_vertbuf_add_doc, ".. method:: vertbuf_add(buf)\n" "\n" " Add another vertex buffer to the Batch.\n" " It is not possible to add more vertices to the batch using this method.\n" @@ -166,6 +168,7 @@ static PyObject *pygpu_batch_vertbuf_add(BPyGPUBatch *self, BPyGPUVertBuf *py_bu } PyDoc_STRVAR( + /* Wrap. */ pygpu_batch_program_set_doc, ".. method:: program_set(program)\n" "\n" @@ -207,14 +210,16 @@ static PyObject *pygpu_batch_program_set(BPyGPUBatch *self, BPyGPUShader *py_sha Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_batch_draw_doc, - ".. method:: draw(program=None)\n" - "\n" - " Run the drawing program with the parameters assigned to the batch.\n" - "\n" - " :arg program: Program that performs the drawing operations.\n" - " If ``None`` is passed, the last program set to this batch will run.\n" - " :type program: :class:`gpu.types.GPUShader`\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_batch_draw_doc, + ".. method:: draw(program=None)\n" + "\n" + " Run the drawing program with the parameters assigned to the batch.\n" + "\n" + " :arg program: Program that performs the drawing operations.\n" + " If ``None`` is passed, the last program set to this batch will run.\n" + " :type program: :class:`gpu.types.GPUShader`\n"); static PyObject *pygpu_batch_draw(BPyGPUBatch *self, PyObject *args) { BPyGPUShader *py_program = nullptr; @@ -236,6 +241,7 @@ static PyObject *pygpu_batch_draw(BPyGPUBatch *self, PyObject *args) } PyDoc_STRVAR( + /* Wrap. */ pygpu_batch_draw_instanced_doc, ".. method:: draw_instanced(program, *, instance_start=0, instance_count=0)\n" "\n" @@ -279,21 +285,23 @@ static PyObject *pygpu_batch_draw_instanced(BPyGPUBatch *self, PyObject *args, P Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_batch_draw_range_doc, - ".. method:: draw_range(program, *, elem_start=0, elem_count=0)\n" - "\n" - " Run the drawing program with the parameters assigned to the batch. Only draw\n" - " the `elem_count` elements of the index buffer starting at `elem_start` \n" - "\n" - " :arg program: Program that performs the drawing operations.\n" - " :type program: :class:`gpu.types.GPUShader`\n" - " :arg elem_start: First index to draw. When not provided or set to 0 drawing\n" - " will start from the first element of the index buffer.\n" - " :type elem_start: int\n" - " :arg elem_count: Number of elements of the index buffer to draw. When not\n" - " provided or set to 0 all elements from `elem_start` to the end of the\n" - " index buffer will be drawn.\n" - " :type elem_count: int\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_batch_draw_range_doc, + ".. method:: draw_range(program, *, elem_start=0, elem_count=0)\n" + "\n" + " Run the drawing program with the parameters assigned to the batch. Only draw\n" + " the `elem_count` elements of the index buffer starting at `elem_start` \n" + "\n" + " :arg program: Program that performs the drawing operations.\n" + " :type program: :class:`gpu.types.GPUShader`\n" + " :arg elem_start: First index to draw. When not provided or set to 0 drawing\n" + " will start from the first element of the index buffer.\n" + " :type elem_start: int\n" + " :arg elem_count: Number of elements of the index buffer to draw. When not\n" + " provided or set to 0 all elements from `elem_start` to the end of the\n" + " index buffer will be drawn.\n" + " :type elem_count: int\n"); static PyObject *pygpu_batch_draw_range(BPyGPUBatch *self, PyObject *args, PyObject *kw) { BPyGPUShader *py_program = nullptr; @@ -403,6 +411,7 @@ static void pygpu_batch__tp_dealloc(BPyGPUBatch *self) } PyDoc_STRVAR( + /* Wrap. */ pygpu_batch__tp_doc, ".. class:: GPUBatch(type, buf, elem=None)\n" "\n" diff --git a/source/blender/python/gpu/gpu_py_buffer.cc b/source/blender/python/gpu/gpu_py_buffer.cc index 28fa29fd8fe..0e011971b12 100644 --- a/source/blender/python/gpu/gpu_py_buffer.cc +++ b/source/blender/python/gpu/gpu_py_buffer.cc @@ -670,6 +670,7 @@ static PyBufferProcs pygpu_buffer__tp_as_buffer = { #endif PyDoc_STRVAR( + /* Wrap. */ pygpu_buffer__tp_doc, ".. class:: Buffer(format, dimensions, data)\n" "\n" diff --git a/source/blender/python/gpu/gpu_py_capabilities.cc b/source/blender/python/gpu/gpu_py_capabilities.cc index 115d3dd1778..555945999f6 100644 --- a/source/blender/python/gpu/gpu_py_capabilities.cc +++ b/source/blender/python/gpu/gpu_py_capabilities.cc @@ -22,166 +22,192 @@ /** \name Functions * \{ */ -PyDoc_STRVAR(pygpu_max_texture_size_get_doc, - ".. function:: max_texture_size_get()\n" - "\n" - " Get estimated maximum texture size to be able to handle.\n" - "\n" - " :return: Texture size.\n" - " :rtype: int\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_max_texture_size_get_doc, + ".. function:: max_texture_size_get()\n" + "\n" + " Get estimated maximum texture size to be able to handle.\n" + "\n" + " :return: Texture size.\n" + " :rtype: int\n"); static PyObject *pygpu_max_texture_size_get(PyObject * /*self*/) { return PyLong_FromLong(GPU_max_texture_size()); } -PyDoc_STRVAR(pygpu_max_texture_layers_get_doc, - ".. function:: max_texture_layers_get()\n" - "\n" - " Get maximum number of layers in texture.\n" - "\n" - " :return: Number of layers.\n" - " :rtype: int\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_max_texture_layers_get_doc, + ".. function:: max_texture_layers_get()\n" + "\n" + " Get maximum number of layers in texture.\n" + "\n" + " :return: Number of layers.\n" + " :rtype: int\n"); static PyObject *pygpu_max_texture_layers_get(PyObject * /*self*/) { return PyLong_FromLong(GPU_max_texture_layers()); } -PyDoc_STRVAR(pygpu_max_textures_get_doc, - ".. function:: max_textures_get()\n" - "\n" - " Get maximum supported texture image units used for\n" - " accessing texture maps from the vertex shader and the\n" - " fragment processor.\n" - "\n" - " :return: Texture image units.\n" - " :rtype: int\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_max_textures_get_doc, + ".. function:: max_textures_get()\n" + "\n" + " Get maximum supported texture image units used for\n" + " accessing texture maps from the vertex shader and the\n" + " fragment processor.\n" + "\n" + " :return: Texture image units.\n" + " :rtype: int\n"); static PyObject *pygpu_max_textures_get(PyObject * /*self*/) { return PyLong_FromLong(GPU_max_textures()); } -PyDoc_STRVAR(pygpu_max_textures_vert_get_doc, - ".. function:: max_textures_vert_get()\n" - "\n" - " Get maximum supported texture image units used for\n" - " accessing texture maps from the vertex shader.\n" - "\n" - " :return: Texture image units.\n" - " :rtype: int\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_max_textures_vert_get_doc, + ".. function:: max_textures_vert_get()\n" + "\n" + " Get maximum supported texture image units used for\n" + " accessing texture maps from the vertex shader.\n" + "\n" + " :return: Texture image units.\n" + " :rtype: int\n"); static PyObject *pygpu_max_textures_vert_get(PyObject * /*self*/) { return PyLong_FromLong(GPU_max_textures_vert()); } -PyDoc_STRVAR(pygpu_max_textures_geom_get_doc, - ".. function:: max_textures_geom_get()\n" - "\n" - " Get maximum supported texture image units used for\n" - " accessing texture maps from the geometry shader.\n" - "\n" - " :return: Texture image units.\n" - " :rtype: int\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_max_textures_geom_get_doc, + ".. function:: max_textures_geom_get()\n" + "\n" + " Get maximum supported texture image units used for\n" + " accessing texture maps from the geometry shader.\n" + "\n" + " :return: Texture image units.\n" + " :rtype: int\n"); static PyObject *pygpu_max_textures_geom_get(PyObject * /*self*/) { return PyLong_FromLong(GPU_max_textures_geom()); } -PyDoc_STRVAR(pygpu_max_textures_frag_get_doc, - ".. function:: max_textures_frag_get()\n" - "\n" - " Get maximum supported texture image units used for\n" - " accessing texture maps from the fragment shader.\n" - "\n" - " :return: Texture image units.\n" - " :rtype: int\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_max_textures_frag_get_doc, + ".. function:: max_textures_frag_get()\n" + "\n" + " Get maximum supported texture image units used for\n" + " accessing texture maps from the fragment shader.\n" + "\n" + " :return: Texture image units.\n" + " :rtype: int\n"); static PyObject *pygpu_max_textures_frag_get(PyObject * /*self*/) { return PyLong_FromLong(GPU_max_textures_frag()); } -PyDoc_STRVAR(pygpu_max_uniforms_vert_get_doc, - ".. function:: max_uniforms_vert_get()\n" - "\n" - " Get maximum number of values held in uniform variable\n" - " storage for a vertex shader.\n" - "\n" - " :return: Number of values.\n" - " :rtype: int\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_max_uniforms_vert_get_doc, + ".. function:: max_uniforms_vert_get()\n" + "\n" + " Get maximum number of values held in uniform variable\n" + " storage for a vertex shader.\n" + "\n" + " :return: Number of values.\n" + " :rtype: int\n"); static PyObject *pygpu_max_uniforms_vert_get(PyObject * /*self*/) { return PyLong_FromLong(GPU_max_uniforms_vert()); } -PyDoc_STRVAR(pygpu_max_uniforms_frag_get_doc, - ".. function:: max_uniforms_frag_get()\n" - "\n" - " Get maximum number of values held in uniform variable\n" - " storage for a fragment shader.\n" - "\n" - " :return: Number of values.\n" - " :rtype: int\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_max_uniforms_frag_get_doc, + ".. function:: max_uniforms_frag_get()\n" + "\n" + " Get maximum number of values held in uniform variable\n" + " storage for a fragment shader.\n" + "\n" + " :return: Number of values.\n" + " :rtype: int\n"); static PyObject *pygpu_max_uniforms_frag_get(PyObject * /*self*/) { return PyLong_FromLong(GPU_max_uniforms_frag()); } -PyDoc_STRVAR(pygpu_max_batch_indices_get_doc, - ".. function:: max_batch_indices_get()\n" - "\n" - " Get maximum number of vertex array indices.\n" - "\n" - " :return: Number of indices.\n" - " :rtype: int\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_max_batch_indices_get_doc, + ".. function:: max_batch_indices_get()\n" + "\n" + " Get maximum number of vertex array indices.\n" + "\n" + " :return: Number of indices.\n" + " :rtype: int\n"); static PyObject *pygpu_max_batch_indices_get(PyObject * /*self*/) { return PyLong_FromLong(GPU_max_batch_indices()); } -PyDoc_STRVAR(pygpu_max_batch_vertices_get_doc, - ".. function:: max_batch_vertices_get()\n" - "\n" - " Get maximum number of vertex array vertices.\n" - "\n" - " :return: Number of vertices.\n" - " :rtype: int\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_max_batch_vertices_get_doc, + ".. function:: max_batch_vertices_get()\n" + "\n" + " Get maximum number of vertex array vertices.\n" + "\n" + " :return: Number of vertices.\n" + " :rtype: int\n"); static PyObject *pygpu_max_batch_vertices_get(PyObject * /*self*/) { return PyLong_FromLong(GPU_max_batch_vertices()); } -PyDoc_STRVAR(pygpu_max_vertex_attribs_get_doc, - ".. function:: max_vertex_attribs_get()\n" - "\n" - " Get maximum number of vertex attributes accessible to\n" - " a vertex shader.\n" - "\n" - " :return: Number of attributes.\n" - " :rtype: int\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_max_vertex_attribs_get_doc, + ".. function:: max_vertex_attribs_get()\n" + "\n" + " Get maximum number of vertex attributes accessible to\n" + " a vertex shader.\n" + "\n" + " :return: Number of attributes.\n" + " :rtype: int\n"); static PyObject *pygpu_max_vertex_attribs_get(PyObject * /*self*/) { return PyLong_FromLong(GPU_max_vertex_attribs()); } -PyDoc_STRVAR(pygpu_max_varying_floats_get_doc, - ".. function:: max_varying_floats_get()\n" - "\n" - " Get maximum number of varying variables used by\n" - " vertex and fragment shaders.\n" - "\n" - " :return: Number of variables.\n" - " :rtype: int\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_max_varying_floats_get_doc, + ".. function:: max_varying_floats_get()\n" + "\n" + " Get maximum number of varying variables used by\n" + " vertex and fragment shaders.\n" + "\n" + " :return: Number of variables.\n" + " :rtype: int\n"); static PyObject *pygpu_max_varying_floats_get(PyObject * /*self*/) { return PyLong_FromLong(GPU_max_varying_floats()); } -PyDoc_STRVAR(pygpu_extensions_get_doc, - ".. function:: extensions_get()\n" - "\n" - " Get supported extensions in the current context.\n" - "\n" - " :return: Extensions.\n" - " :rtype: tuple of string\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_extensions_get_doc, + ".. function:: extensions_get()\n" + "\n" + " Get supported extensions in the current context.\n" + "\n" + " :return: Extensions.\n" + " :rtype: tuple of string\n"); static PyObject *pygpu_extensions_get(PyObject * /*self*/) { int extensions_len = GPU_extensions_len(); @@ -194,51 +220,59 @@ static PyObject *pygpu_extensions_get(PyObject * /*self*/) return ret; } -PyDoc_STRVAR(pygpu_compute_shader_support_get_doc, - ".. function:: compute_shader_support_get()\n" - "\n" - " Are compute shaders supported.\n" - "\n" - " :return: True when supported, False when not supported.\n" - " :rtype: bool\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_compute_shader_support_get_doc, + ".. function:: compute_shader_support_get()\n" + "\n" + " Are compute shaders supported.\n" + "\n" + " :return: True when supported, False when not supported.\n" + " :rtype: bool\n"); static PyObject *pygpu_compute_shader_support_get(PyObject * /*self*/) { return PyBool_FromLong(GPU_compute_shader_support()); } -PyDoc_STRVAR(pygpu_shader_image_load_store_support_get_doc, - ".. function:: shader_image_load_store_support_get()\n" - "\n" - " Is image load/store supported.\n" - "\n" - " :return: True when supported, False when not supported.\n" - " :rtype: bool\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_shader_image_load_store_support_get_doc, + ".. function:: shader_image_load_store_support_get()\n" + "\n" + " Is image load/store supported.\n" + "\n" + " :return: True when supported, False when not supported.\n" + " :rtype: bool\n"); static PyObject *pygpu_shader_image_load_store_support_get(PyObject * /*self*/) { return PyBool_FromLong(GPU_shader_image_load_store_support()); } -PyDoc_STRVAR(pygpu_hdr_support_get_doc, - ".. function:: hdr_support_get()\n" - "\n" - " Return whether GPU backend supports High Dynamic range for viewport.\n" - "\n" - " :return: HDR support available.\n" - " :rtype: bool\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_hdr_support_get_doc, + ".. function:: hdr_support_get()\n" + "\n" + " Return whether GPU backend supports High Dynamic range for viewport.\n" + "\n" + " :return: HDR support available.\n" + " :rtype: bool\n"); static PyObject *pygpu_hdr_support_get(PyObject * /*self*/) { return PyBool_FromLong(GPU_hdr_support()); } -PyDoc_STRVAR(pygpu_max_work_group_count_get_doc, - ".. function:: max_work_group_count_get(index)\n" - "\n" - " Get maximum number of work groups that may be dispatched to a compute shader.\n" - "\n" - " :arg index: Index of the dimension.\n" - " :type index: int\n" - " :return: Maximum number of work groups for the queried dimension.\n" - " :rtype: int\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_max_work_group_count_get_doc, + ".. function:: max_work_group_count_get(index)\n" + "\n" + " Get maximum number of work groups that may be dispatched to a compute shader.\n" + "\n" + " :arg index: Index of the dimension.\n" + " :type index: int\n" + " :return: Maximum number of work groups for the queried dimension.\n" + " :rtype: int\n"); static PyObject *pygpu_max_work_group_count_get(PyObject * /*self*/, PyObject *args) { int index; @@ -251,15 +285,17 @@ static PyObject *pygpu_max_work_group_count_get(PyObject * /*self*/, PyObject *a return PyLong_FromLong(max_work_group_count); } -PyDoc_STRVAR(pygpu_max_work_group_size_get_doc, - ".. function:: max_work_group_size_get(index)\n" - "\n" - " Get maximum size of a work group that may be dispatched to a compute shader.\n" - "\n" - " :arg index: Index of the dimension.\n" - " :type index: int\n" - " :return: Maximum size of a work group for the queried dimension.\n" - " :rtype: int\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_max_work_group_size_get_doc, + ".. function:: max_work_group_size_get(index)\n" + "\n" + " Get maximum size of a work group that may be dispatched to a compute shader.\n" + "\n" + " :arg index: Index of the dimension.\n" + " :type index: int\n" + " :return: Maximum size of a work group for the queried dimension.\n" + " :rtype: int\n"); static PyObject *pygpu_max_work_group_size_get(PyObject * /*self*/, PyObject *args) { int index; @@ -365,7 +401,10 @@ static PyMethodDef pygpu_capabilities__tp_methods[] = { # pragma GCC diagnostic pop #endif -PyDoc_STRVAR(pygpu_capabilities__tp_doc, "This module provides access to the GPU capabilities."); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_capabilities__tp_doc, + "This module provides access to the GPU capabilities."); static PyModuleDef pygpu_capabilities_module_def = { /*m_base*/ PyModuleDef_HEAD_INIT, /*m_name*/ "gpu.capabilities", diff --git a/source/blender/python/gpu/gpu_py_compute.cc b/source/blender/python/gpu/gpu_py_compute.cc index c50894777d2..62662242485 100644 --- a/source/blender/python/gpu/gpu_py_compute.cc +++ b/source/blender/python/gpu/gpu_py_compute.cc @@ -33,21 +33,23 @@ #include "gpu_py_uniformbuffer.h" #include "gpu_py_vertex_format.h" -PyDoc_STRVAR(pygpu_compute_dispatch_doc, - ".. function:: dispatch(shader, groups_x_len, groups_y_len, groups_z_len)\n" - "\n" - " Dispatches GPU compute.\n" - "\n" - " :arg shader: The shader that you want to dispatch.\n" - " :type shader: :class:`gpu.types.GPUShader`\n" - " :arg groups_x_len: Int for group x length:\n" - " :type groups_x_len: int\n" - " :arg groups_y_len: Int for group y length:\n" - " :type groups_y_len: int\n" - " :arg groups_z_len: Int for group z length:\n" - " :type groups_z_len: int\n" - " :return: Shader object.\n" - " :rtype: :class:`bpy.types.GPUShader`\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_compute_dispatch_doc, + ".. function:: dispatch(shader, groups_x_len, groups_y_len, groups_z_len)\n" + "\n" + " Dispatches GPU compute.\n" + "\n" + " :arg shader: The shader that you want to dispatch.\n" + " :type shader: :class:`gpu.types.GPUShader`\n" + " :arg groups_x_len: Int for group x length:\n" + " :type groups_x_len: int\n" + " :arg groups_y_len: Int for group y length:\n" + " :type groups_y_len: int\n" + " :arg groups_z_len: Int for group z length:\n" + " :type groups_z_len: int\n" + " :return: Shader object.\n" + " :rtype: :class:`bpy.types.GPUShader`\n"); static PyObject *pygpu_compute_dispatch(PyObject * /*self*/, PyObject *args, PyObject *kwds) { BPyGPUShader *py_shader; @@ -127,8 +129,10 @@ static PyMethodDef pygpu_compute__tp_methods[] = { # pragma GCC diagnostic pop #endif -PyDoc_STRVAR(pygpu_compute__tp_doc, - "This module provides access to the global GPU compute functions"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_compute__tp_doc, + "This module provides access to the global GPU compute functions"); static PyModuleDef pygpu_compute_module_def = { /*m_base*/ PyModuleDef_HEAD_INIT, /*m_name*/ "gpu.compute", diff --git a/source/blender/python/gpu/gpu_py_element.cc b/source/blender/python/gpu/gpu_py_element.cc index 67b10e030ef..4e19649e544 100644 --- a/source/blender/python/gpu/gpu_py_element.cc +++ b/source/blender/python/gpu/gpu_py_element.cc @@ -175,18 +175,20 @@ static void pygpu_IndexBuf__tp_dealloc(BPyGPUIndexBuf *self) Py_TYPE(self)->tp_free(self); } -PyDoc_STRVAR(pygpu_IndexBuf__tp_doc, - ".. class:: GPUIndexBuf(type, seq)\n" - "\n" - " Contains an index buffer.\n" - "\n" - " :arg type: The primitive type this index buffer is composed of.\n" - " Possible values are `POINTS`, `LINES`, `TRIS` and `LINE_STRIP_ADJ`.\n" - " :type type: str\n" - " :arg seq: Indices this index buffer will contain.\n" - " Whether a 1D or 2D sequence is required depends on the type.\n" - " Optionally the sequence can support the buffer protocol.\n" - " :type seq: 1D or 2D sequence\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_IndexBuf__tp_doc, + ".. class:: GPUIndexBuf(type, seq)\n" + "\n" + " Contains an index buffer.\n" + "\n" + " :arg type: The primitive type this index buffer is composed of.\n" + " Possible values are `POINTS`, `LINES`, `TRIS` and `LINE_STRIP_ADJ`.\n" + " :type type: str\n" + " :arg seq: Indices this index buffer will contain.\n" + " Whether a 1D or 2D sequence is required depends on the type.\n" + " Optionally the sequence can support the buffer protocol.\n" + " :type seq: 1D or 2D sequence\n"); PyTypeObject BPyGPUIndexBuf_Type = { /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0) /*tp_name*/ "GPUIndexBuf", diff --git a/source/blender/python/gpu/gpu_py_framebuffer.cc b/source/blender/python/gpu/gpu_py_framebuffer.cc index d224f79315b..5adbd54b6af 100644 --- a/source/blender/python/gpu/gpu_py_framebuffer.cc +++ b/source/blender/python/gpu/gpu_py_framebuffer.cc @@ -236,10 +236,12 @@ static PyTypeObject FramebufferStackContext_Type = { /*tp_vectorcall*/ nullptr, }; -PyDoc_STRVAR(pygpu_framebuffer_bind_doc, - ".. function:: bind()\n" - "\n" - " Context manager to ensure balanced bind calls, even in the case of an error.\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_framebuffer_bind_doc, + ".. function:: bind()\n" + "\n" + " Context manager to ensure balanced bind calls, even in the case of an error.\n"); static PyObject *pygpu_framebuffer_bind(BPyGPUFrameBuffer *self) { PyFrameBufferStackContext *ret = PyObject_New(PyFrameBufferStackContext, @@ -392,26 +394,30 @@ static PyObject *pygpu_framebuffer__tp_new(PyTypeObject * /*self*/, PyObject *ar return BPyGPUFrameBuffer_CreatePyObject(fb_python, false); } -PyDoc_STRVAR(pygpu_framebuffer_is_bound_doc, - "Checks if this is the active framebuffer in the context."); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_framebuffer_is_bound_doc, + "Checks if this is the active framebuffer in the context."); static PyObject *pygpu_framebuffer_is_bound(BPyGPUFrameBuffer *self, void * /*type*/) { PYGPU_FRAMEBUFFER_CHECK_OBJ(self); return PyBool_FromLong(GPU_framebuffer_bound(self->fb)); } -PyDoc_STRVAR(pygpu_framebuffer_clear_doc, - ".. method:: clear(color=None, depth=None, stencil=None)\n" - "\n" - " Fill color, depth and stencil textures with specific value.\n" - " Common values: color=(0.0, 0.0, 0.0, 1.0), depth=1.0, stencil=0.\n" - "\n" - " :arg color: float sequence each representing ``(r, g, b, a)``.\n" - " :type color: sequence of 3 or 4 floats\n" - " :arg depth: depth value.\n" - " :type depth: float\n" - " :arg stencil: stencil value.\n" - " :type stencil: int\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_framebuffer_clear_doc, + ".. method:: clear(color=None, depth=None, stencil=None)\n" + "\n" + " Fill color, depth and stencil textures with specific value.\n" + " Common values: color=(0.0, 0.0, 0.0, 1.0), depth=1.0, stencil=0.\n" + "\n" + " :arg color: float sequence each representing ``(r, g, b, a)``.\n" + " :type color: sequence of 3 or 4 floats\n" + " :arg depth: depth value.\n" + " :type depth: float\n" + " :arg stencil: stencil value.\n" + " :type stencil: int\n"); static PyObject *pygpu_framebuffer_clear(BPyGPUFrameBuffer *self, PyObject *args, PyObject *kwds) { PYGPU_FRAMEBUFFER_CHECK_OBJ(self); @@ -472,16 +478,18 @@ static PyObject *pygpu_framebuffer_clear(BPyGPUFrameBuffer *self, PyObject *args Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_framebuffer_viewport_set_doc, - ".. function:: viewport_set(x, y, xsize, ysize)\n" - "\n" - " Set the viewport for this framebuffer object.\n" - " Note: The viewport state is not saved upon framebuffer rebind.\n" - "\n" - " :arg x, y: lower left corner of the viewport_set rectangle, in pixels.\n" - " :type x, y: int\n" - " :arg xsize, ysize: width and height of the viewport_set.\n" - " :type xsize, ysize: int\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_framebuffer_viewport_set_doc, + ".. function:: viewport_set(x, y, xsize, ysize)\n" + "\n" + " Set the viewport for this framebuffer object.\n" + " Note: The viewport state is not saved upon framebuffer rebind.\n" + "\n" + " :arg x, y: lower left corner of the viewport_set rectangle, in pixels.\n" + " :type x, y: int\n" + " :arg xsize, ysize: width and height of the viewport_set.\n" + " :type xsize, ysize: int\n"); static PyObject *pygpu_framebuffer_viewport_set(BPyGPUFrameBuffer *self, PyObject *args, void * /*type*/) @@ -495,10 +503,12 @@ static PyObject *pygpu_framebuffer_viewport_set(BPyGPUFrameBuffer *self, Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_framebuffer_viewport_get_doc, - ".. function:: viewport_get()\n" - "\n" - " Returns position and dimension to current viewport.\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_framebuffer_viewport_get_doc, + ".. function:: viewport_get()\n" + "\n" + " Returns position and dimension to current viewport.\n"); static PyObject *pygpu_framebuffer_viewport_get(BPyGPUFrameBuffer *self, void * /*type*/) { PYGPU_FRAMEBUFFER_CHECK_OBJ(self); @@ -515,6 +525,7 @@ static PyObject *pygpu_framebuffer_viewport_get(BPyGPUFrameBuffer *self, void * } PyDoc_STRVAR( + /* Wrap. */ pygpu_framebuffer_read_color_doc, ".. function:: read_color(x, y, xsize, ysize, channels, slot, format, data=data)\n" "\n" @@ -626,19 +637,21 @@ static PyObject *pygpu_framebuffer_read_color(BPyGPUFrameBuffer *self, return (PyObject *)py_buffer; } -PyDoc_STRVAR(pygpu_framebuffer_read_depth_doc, - ".. function:: read_depth(x, y, xsize, ysize, data=data)\n" - "\n" - " Read a pixel depth block from the frame buffer.\n" - "\n" - " :arg x, y: Lower left corner of a rectangular block of pixels.\n" - " :type x, y: int\n" - " :arg xsize, ysize: Dimensions of the pixel rectangle.\n" - " :type xsize, ysize: int\n" - " :arg data: Optional Buffer object to fill with the pixels values.\n" - " :type data: :class:`gpu.types.Buffer`\n" - " :return: The Buffer with the read pixels.\n" - " :rtype: :class:`gpu.types.Buffer`\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_framebuffer_read_depth_doc, + ".. function:: read_depth(x, y, xsize, ysize, data=data)\n" + "\n" + " Read a pixel depth block from the frame buffer.\n" + "\n" + " :arg x, y: Lower left corner of a rectangular block of pixels.\n" + " :type x, y: int\n" + " :arg xsize, ysize: Dimensions of the pixel rectangle.\n" + " :type xsize, ysize: int\n" + " :arg data: Optional Buffer object to fill with the pixels values.\n" + " :type data: :class:`gpu.types.Buffer`\n" + " :return: The Buffer with the read pixels.\n" + " :rtype: :class:`gpu.types.Buffer`\n"); static PyObject *pygpu_framebuffer_read_depth(BPyGPUFrameBuffer *self, PyObject *args, PyObject *kwds) @@ -693,11 +706,13 @@ static PyObject *pygpu_framebuffer_read_depth(BPyGPUFrameBuffer *self, } #ifdef BPYGPU_USE_GPUOBJ_FREE_METHOD -PyDoc_STRVAR(pygpu_framebuffer_free_doc, - ".. method:: free()\n" - "\n" - " Free the framebuffer object.\n" - " The framebuffer will no longer be accessible.\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_framebuffer_free_doc, + ".. method:: free()\n" + "\n" + " Free the framebuffer object.\n" + " The framebuffer will no longer be accessible.\n"); static PyObject *pygpu_framebuffer_free(BPyGPUFrameBuffer *self) { PYGPU_FRAMEBUFFER_CHECK_OBJ(self); @@ -758,20 +773,22 @@ static PyMethodDef pygpu_framebuffer__tp_methods[] = { # pragma GCC diagnostic pop #endif -PyDoc_STRVAR(pygpu_framebuffer__tp_doc, - ".. class:: GPUFrameBuffer(depth_slot=None, color_slots=None)\n" - "\n" - " This object gives access to framebuffer functionalities.\n" - " When a 'layer' is specified in a argument, a single layer of a 3D or array " - "texture is attached to the frame-buffer.\n" - " For cube map textures, layer is translated into a cube map face.\n" - "\n" - " :arg depth_slot: GPUTexture to attach or a `dict` containing keywords: " - "'texture', 'layer' and 'mip'.\n" - " :type depth_slot: :class:`gpu.types.GPUTexture`, dict or Nonetype\n" - " :arg color_slots: Tuple where each item can be a GPUTexture or a `dict` " - "containing keywords: 'texture', 'layer' and 'mip'.\n" - " :type color_slots: tuple or Nonetype\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_framebuffer__tp_doc, + ".. class:: GPUFrameBuffer(depth_slot=None, color_slots=None)\n" + "\n" + " This object gives access to framebuffer functionalities.\n" + " When a 'layer' is specified in a argument, a single layer of a 3D or array " + "texture is attached to the frame-buffer.\n" + " For cube map textures, layer is translated into a cube map face.\n" + "\n" + " :arg depth_slot: GPUTexture to attach or a `dict` containing keywords: " + "'texture', 'layer' and 'mip'.\n" + " :type depth_slot: :class:`gpu.types.GPUTexture`, dict or Nonetype\n" + " :arg color_slots: Tuple where each item can be a GPUTexture or a `dict` " + "containing keywords: 'texture', 'layer' and 'mip'.\n" + " :type color_slots: tuple or Nonetype\n"); PyTypeObject BPyGPUFrameBuffer_Type = { /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0) /*tp_name*/ "GPUFrameBuffer", diff --git a/source/blender/python/gpu/gpu_py_matrix.cc b/source/blender/python/gpu/gpu_py_matrix.cc index fd7c8a7bcfa..0ead1a16ebc 100644 --- a/source/blender/python/gpu/gpu_py_matrix.cc +++ b/source/blender/python/gpu/gpu_py_matrix.cc @@ -79,10 +79,12 @@ static bool pygpu_stack_is_pop_projection_ok_or_error() /** \name Manage Stack * \{ */ -PyDoc_STRVAR(pygpu_matrix_push_doc, - ".. function:: push()\n" - "\n" - " Add to the model-view matrix stack.\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_matrix_push_doc, + ".. function:: push()\n" + "\n" + " Add to the model-view matrix stack.\n"); static PyObject *pygpu_matrix_push(PyObject * /*self*/) { if (!pygpu_stack_is_push_model_view_ok_or_error()) { @@ -92,10 +94,12 @@ static PyObject *pygpu_matrix_push(PyObject * /*self*/) Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_matrix_pop_doc, - ".. function:: pop()\n" - "\n" - " Remove the last model-view matrix from the stack.\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_matrix_pop_doc, + ".. function:: pop()\n" + "\n" + " Remove the last model-view matrix from the stack.\n"); static PyObject *pygpu_matrix_pop(PyObject * /*self*/) { if (!pygpu_stack_is_pop_model_view_ok_or_error()) { @@ -105,10 +109,12 @@ static PyObject *pygpu_matrix_pop(PyObject * /*self*/) Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_matrix_push_projection_doc, - ".. function:: push_projection()\n" - "\n" - " Add to the projection matrix stack.\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_matrix_push_projection_doc, + ".. function:: push_projection()\n" + "\n" + " Add to the projection matrix stack.\n"); static PyObject *pygpu_matrix_push_projection(PyObject * /*self*/) { if (!pygpu_stack_is_push_projection_ok_or_error()) { @@ -118,10 +124,12 @@ static PyObject *pygpu_matrix_push_projection(PyObject * /*self*/) Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_matrix_pop_projection_doc, - ".. function:: pop_projection()\n" - "\n" - " Remove the last projection matrix from the stack.\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_matrix_pop_projection_doc, + ".. function:: pop_projection()\n" + "\n" + " Remove the last projection matrix from the stack.\n"); static PyObject *pygpu_matrix_pop_projection(PyObject * /*self*/) { if (!pygpu_stack_is_pop_projection_ok_or_error()) { @@ -293,6 +301,7 @@ static PyObject *pygpu_matrix_push_pop_impl(int type) } PyDoc_STRVAR( + /* Wrap. */ pygpu_matrix_push_pop_doc, ".. function:: push_pop()\n" "\n" @@ -303,6 +312,7 @@ static PyObject *pygpu_matrix_push_pop(PyObject * /*self*/) } PyDoc_STRVAR( + /* Wrap. */ pygpu_matrix_push_pop_projection_doc, ".. function:: push_pop_projection()\n" "\n" @@ -318,13 +328,15 @@ static PyObject *pygpu_matrix_push_pop_projection(PyObject * /*self*/) /** \name Manipulate State * \{ */ -PyDoc_STRVAR(pygpu_matrix_multiply_matrix_doc, - ".. function:: multiply_matrix(matrix)\n" - "\n" - " Multiply the current stack matrix.\n" - "\n" - " :arg matrix: A 4x4 matrix.\n" - " :type matrix: :class:`mathutils.Matrix`\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_matrix_multiply_matrix_doc, + ".. function:: multiply_matrix(matrix)\n" + "\n" + " Multiply the current stack matrix.\n" + "\n" + " :arg matrix: A 4x4 matrix.\n" + " :type matrix: :class:`mathutils.Matrix`\n"); static PyObject *pygpu_matrix_multiply_matrix(PyObject * /*self*/, PyObject *value) { MatrixObject *pymat; @@ -335,13 +347,15 @@ static PyObject *pygpu_matrix_multiply_matrix(PyObject * /*self*/, PyObject *val Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_matrix_scale_doc, - ".. function:: scale(scale)\n" - "\n" - " Scale the current stack matrix.\n" - "\n" - " :arg scale: Scale the current stack matrix.\n" - " :type scale: sequence of 2 or 3 floats\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_matrix_scale_doc, + ".. function:: scale(scale)\n" + "\n" + " Scale the current stack matrix.\n" + "\n" + " :arg scale: Scale the current stack matrix.\n" + " :type scale: sequence of 2 or 3 floats\n"); static PyObject *pygpu_matrix_scale(PyObject * /*self*/, PyObject *value) { float scale[3]; @@ -360,11 +374,13 @@ static PyObject *pygpu_matrix_scale(PyObject * /*self*/, PyObject *value) Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_matrix_scale_uniform_doc, - ".. function:: scale_uniform(scale)\n" - "\n" - " :arg scale: Scale the current stack matrix.\n" - " :type scale: float\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_matrix_scale_uniform_doc, + ".. function:: scale_uniform(scale)\n" + "\n" + " :arg scale: Scale the current stack matrix.\n" + " :type scale: float\n"); static PyObject *pygpu_matrix_scale_uniform(PyObject * /*self*/, PyObject *value) { float scalar; @@ -376,13 +392,15 @@ static PyObject *pygpu_matrix_scale_uniform(PyObject * /*self*/, PyObject *value Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_matrix_translate_doc, - ".. function:: translate(offset)\n" - "\n" - " Scale the current stack matrix.\n" - "\n" - " :arg offset: Translate the current stack matrix.\n" - " :type offset: sequence of 2 or 3 floats\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_matrix_translate_doc, + ".. function:: translate(offset)\n" + "\n" + " Scale the current stack matrix.\n" + "\n" + " :arg offset: Translate the current stack matrix.\n" + " :type offset: sequence of 2 or 3 floats\n"); static PyObject *pygpu_matrix_translate(PyObject * /*self*/, PyObject *value) { float offset[3]; @@ -407,33 +425,39 @@ static PyObject *pygpu_matrix_translate(PyObject * /*self*/, PyObject *value) /** \name Write State * \{ */ -PyDoc_STRVAR(pygpu_matrix_reset_doc, - ".. function:: reset()\n" - "\n" - " Empty stack and set to identity.\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_matrix_reset_doc, + ".. function:: reset()\n" + "\n" + " Empty stack and set to identity.\n"); static PyObject *pygpu_matrix_reset(PyObject * /*self*/) { GPU_matrix_reset(); Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_matrix_load_identity_doc, - ".. function:: load_identity()\n" - "\n" - " Load an identity matrix into the stack.\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_matrix_load_identity_doc, + ".. function:: load_identity()\n" + "\n" + " Load an identity matrix into the stack.\n"); static PyObject *pygpu_matrix_load_identity(PyObject * /*self*/) { GPU_matrix_identity_set(); Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_matrix_load_matrix_doc, - ".. function:: load_matrix(matrix)\n" - "\n" - " Load a matrix into the stack.\n" - "\n" - " :arg matrix: A 4x4 matrix.\n" - " :type matrix: :class:`mathutils.Matrix`\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_matrix_load_matrix_doc, + ".. function:: load_matrix(matrix)\n" + "\n" + " Load a matrix into the stack.\n" + "\n" + " :arg matrix: A 4x4 matrix.\n" + " :type matrix: :class:`mathutils.Matrix`\n"); static PyObject *pygpu_matrix_load_matrix(PyObject * /*self*/, PyObject *value) { MatrixObject *pymat; @@ -444,13 +468,15 @@ static PyObject *pygpu_matrix_load_matrix(PyObject * /*self*/, PyObject *value) Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_matrix_load_projection_matrix_doc, - ".. function:: load_projection_matrix(matrix)\n" - "\n" - " Load a projection matrix into the stack.\n" - "\n" - " :arg matrix: A 4x4 matrix.\n" - " :type matrix: :class:`mathutils.Matrix`\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_matrix_load_projection_matrix_doc, + ".. function:: load_projection_matrix(matrix)\n" + "\n" + " Load a projection matrix into the stack.\n" + "\n" + " :arg matrix: A 4x4 matrix.\n" + " :type matrix: :class:`mathutils.Matrix`\n"); static PyObject *pygpu_matrix_load_projection_matrix(PyObject * /*self*/, PyObject *value) { MatrixObject *pymat; @@ -467,13 +493,15 @@ static PyObject *pygpu_matrix_load_projection_matrix(PyObject * /*self*/, PyObje /** \name Read State * \{ */ -PyDoc_STRVAR(pygpu_matrix_get_projection_matrix_doc, - ".. function:: get_projection_matrix()\n" - "\n" - " Return a copy of the projection matrix.\n" - "\n" - " :return: A 4x4 projection matrix.\n" - " :rtype: :class:`mathutils.Matrix`\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_matrix_get_projection_matrix_doc, + ".. function:: get_projection_matrix()\n" + "\n" + " Return a copy of the projection matrix.\n" + "\n" + " :return: A 4x4 projection matrix.\n" + " :rtype: :class:`mathutils.Matrix`\n"); static PyObject *pygpu_matrix_get_projection_matrix(PyObject * /*self*/) { float matrix[4][4]; @@ -481,13 +509,15 @@ static PyObject *pygpu_matrix_get_projection_matrix(PyObject * /*self*/) return Matrix_CreatePyObject(&matrix[0][0], 4, 4, nullptr); } -PyDoc_STRVAR(pygpu_matrix_get_model_view_matrix_doc, - ".. function:: get_model_view_matrix()\n" - "\n" - " Return a copy of the model-view matrix.\n" - "\n" - " :return: A 4x4 view matrix.\n" - " :rtype: :class:`mathutils.Matrix`\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_matrix_get_model_view_matrix_doc, + ".. function:: get_model_view_matrix()\n" + "\n" + " Return a copy of the model-view matrix.\n" + "\n" + " :return: A 4x4 view matrix.\n" + " :rtype: :class:`mathutils.Matrix`\n"); static PyObject *pygpu_matrix_get_model_view_matrix(PyObject * /*self*/) { float matrix[4][4]; @@ -495,13 +525,15 @@ static PyObject *pygpu_matrix_get_model_view_matrix(PyObject * /*self*/) return Matrix_CreatePyObject(&matrix[0][0], 4, 4, nullptr); } -PyDoc_STRVAR(pygpu_matrix_get_normal_matrix_doc, - ".. function:: get_normal_matrix()\n" - "\n" - " Return a copy of the normal matrix.\n" - "\n" - " :return: A 3x3 normal matrix.\n" - " :rtype: :class:`mathutils.Matrix`\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_matrix_get_normal_matrix_doc, + ".. function:: get_normal_matrix()\n" + "\n" + " Return a copy of the normal matrix.\n" + "\n" + " :return: A 3x3 normal matrix.\n" + " :rtype: :class:`mathutils.Matrix`\n"); static PyObject *pygpu_matrix_get_normal_matrix(PyObject * /*self*/) { float matrix[3][3]; @@ -593,7 +625,10 @@ static PyMethodDef pygpu_matrix__tp_methods[] = { # pragma GCC diagnostic pop #endif -PyDoc_STRVAR(pygpu_matrix__tp_doc, "This module provides access to the matrix stack."); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_matrix__tp_doc, + "This module provides access to the matrix stack."); static PyModuleDef pygpu_matrix_module_def = { /*m_base*/ PyModuleDef_HEAD_INIT, /*m_name*/ "gpu.matrix", diff --git a/source/blender/python/gpu/gpu_py_offscreen.cc b/source/blender/python/gpu/gpu_py_offscreen.cc index 62bc93c94be..fc79873387f 100644 --- a/source/blender/python/gpu/gpu_py_offscreen.cc +++ b/source/blender/python/gpu/gpu_py_offscreen.cc @@ -206,10 +206,12 @@ static PyTypeObject PyGPUOffscreenStackContext_Type = { /*tp_vectorcall*/ nullptr, }; -PyDoc_STRVAR(pygpu_offscreen_bind_doc, - ".. function:: bind()\n" - "\n" - " Context manager to ensure balanced bind calls, even in the case of an error.\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_offscreen_bind_doc, + ".. function:: bind()\n" + "\n" + " Context manager to ensure balanced bind calls, even in the case of an error.\n"); static PyObject *pygpu_offscreen_bind(BPyGPUOffScreen *self) { OffScreenStackContext *ret = PyObject_New(OffScreenStackContext, @@ -225,14 +227,16 @@ static PyObject *pygpu_offscreen_bind(BPyGPUOffScreen *self) return (PyObject *)ret; } -PyDoc_STRVAR(pygpu_offscreen_unbind_doc, - ".. method:: unbind(restore=True)\n" - "\n" - " Unbind the offscreen object.\n" - "\n" - " :arg restore: Restore the OpenGL state, can only be used when the state has been " - "saved before.\n" - " :type restore: bool\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_offscreen_unbind_doc, + ".. method:: unbind(restore=True)\n" + "\n" + " Unbind the offscreen object.\n" + "\n" + " :arg restore: Restore the OpenGL state, can only be used when the state has been " + "saved before.\n" + " :type restore: bool\n"); static PyObject *pygpu_offscreen_unbind(BPyGPUOffScreen *self, PyObject *args, PyObject *kwds) { bool restore = true; @@ -309,22 +313,36 @@ static PyObject *pygpu_offscreen__tp_new(PyTypeObject * /*self*/, PyObject *args return BPyGPUOffScreen_CreatePyObject(ofs); } -PyDoc_STRVAR(pygpu_offscreen_width_doc, "Width of the texture.\n\n:type: `int`"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_offscreen_width_doc, + "Width of the texture.\n" + "\n" + ":type: `int`"); static PyObject *pygpu_offscreen_width_get(BPyGPUOffScreen *self, void * /*type*/) { BPY_GPU_OFFSCREEN_CHECK_OBJ(self); return PyLong_FromLong(GPU_offscreen_width(self->ofs)); } -PyDoc_STRVAR(pygpu_offscreen_height_doc, "Height of the texture.\n\n:type: `int`"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_offscreen_height_doc, + "Height of the texture.\n" + "\n" + ":type: `int`"); static PyObject *pygpu_offscreen_height_get(BPyGPUOffScreen *self, void * /*type*/) { BPY_GPU_OFFSCREEN_CHECK_OBJ(self); return PyLong_FromLong(GPU_offscreen_height(self->ofs)); } -PyDoc_STRVAR(pygpu_offscreen_color_texture_doc, - "OpenGL bindcode for the color texture.\n\n:type: `int`"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_offscreen_color_texture_doc, + "OpenGL bindcode for the color texture.\n" + "\n" + ":type: `int`"); static PyObject *pygpu_offscreen_color_texture_get(BPyGPUOffScreen *self, void * /*type*/) { BPY_GPU_OFFSCREEN_CHECK_OBJ(self); @@ -332,10 +350,12 @@ static PyObject *pygpu_offscreen_color_texture_get(BPyGPUOffScreen *self, void * return PyLong_FromLong(GPU_texture_opengl_bindcode(texture)); } -PyDoc_STRVAR(pygpu_offscreen_texture_color_doc, - "The color texture attached.\n" - "\n" - ":type: :class:`gpu.types.GPUTexture`"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_offscreen_texture_color_doc, + "The color texture attached.\n" + "\n" + ":type: :class:`gpu.types.GPUTexture`"); static PyObject *pygpu_offscreen_texture_color_get(BPyGPUOffScreen *self, void * /*type*/) { BPY_GPU_OFFSCREEN_CHECK_OBJ(self); @@ -344,6 +364,7 @@ static PyObject *pygpu_offscreen_texture_color_get(BPyGPUOffScreen *self, void * } PyDoc_STRVAR( + /* Wrap. */ pygpu_offscreen_draw_view3d_doc, ".. method:: draw_view3d(scene, view_layer, view3d, region, view_matrix, projection_matrix, " "do_color_management=False, draw_background=True)\n" @@ -479,11 +500,13 @@ static PyObject *pygpu_offscreen_draw_view3d(BPyGPUOffScreen *self, PyObject *ar } #ifdef BPYGPU_USE_GPUOBJ_FREE_METHOD -PyDoc_STRVAR(pygpu_offscreen_free_doc, - ".. method:: free()\n" - "\n" - " Free the offscreen object.\n" - " The framebuffer, texture and render objects will no longer be accessible.\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_offscreen_free_doc, + ".. method:: free()\n" + "\n" + " Free the offscreen object.\n" + " The framebuffer, texture and render objects will no longer be accessible.\n"); static PyObject *pygpu_offscreen_free(BPyGPUOffScreen *self) { BPY_GPU_OFFSCREEN_CHECK_OBJ(self); @@ -559,22 +582,24 @@ static PyMethodDef pygpu_offscreen__tp_methods[] = { # pragma GCC diagnostic pop #endif -PyDoc_STRVAR(pygpu_offscreen__tp_doc, - ".. class:: GPUOffScreen(width, height, *, format='RGBA8')\n" - "\n" - " This object gives access to off screen buffers.\n" - "\n" - " :arg width: Horizontal dimension of the buffer.\n" - " :type width: int\n" - " :arg height: Vertical dimension of the buffer.\n" - " :type height: int\n" - " :arg format: Internal data format inside GPU memory for color attachment " - "texture. Possible values are:\n" - " `RGBA8`,\n" - " `RGBA16`,\n" - " `RGBA16F`,\n" - " `RGBA32F`,\n" - " :type format: str\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_offscreen__tp_doc, + ".. class:: GPUOffScreen(width, height, *, format='RGBA8')\n" + "\n" + " This object gives access to off screen buffers.\n" + "\n" + " :arg width: Horizontal dimension of the buffer.\n" + " :type width: int\n" + " :arg height: Vertical dimension of the buffer.\n" + " :type height: int\n" + " :arg format: Internal data format inside GPU memory for color attachment " + "texture. Possible values are:\n" + " `RGBA8`,\n" + " `RGBA16`,\n" + " `RGBA16F`,\n" + " `RGBA32F`,\n" + " :type format: str\n"); PyTypeObject BPyGPUOffScreen_Type = { /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0) /*tp_name*/ "GPUOffScreen", diff --git a/source/blender/python/gpu/gpu_py_platform.cc b/source/blender/python/gpu/gpu_py_platform.cc index 308cc03b208..deb561c4676 100644 --- a/source/blender/python/gpu/gpu_py_platform.cc +++ b/source/blender/python/gpu/gpu_py_platform.cc @@ -23,50 +23,58 @@ /** \name Functions * \{ */ -PyDoc_STRVAR(pygpu_platform_vendor_get_doc, - ".. function:: vendor_get()\n" - "\n" - " Get GPU vendor.\n" - "\n" - " :return: Vendor name.\n" - " :rtype: str\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_platform_vendor_get_doc, + ".. function:: vendor_get()\n" + "\n" + " Get GPU vendor.\n" + "\n" + " :return: Vendor name.\n" + " :rtype: str\n"); static PyObject *pygpu_platform_vendor_get(PyObject * /*self*/) { return PyUnicode_FromString(GPU_platform_vendor()); } -PyDoc_STRVAR(pygpu_platform_renderer_get_doc, - ".. function:: renderer_get()\n" - "\n" - " Get GPU to be used for rendering.\n" - "\n" - " :return: GPU name.\n" - " :rtype: str\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_platform_renderer_get_doc, + ".. function:: renderer_get()\n" + "\n" + " Get GPU to be used for rendering.\n" + "\n" + " :return: GPU name.\n" + " :rtype: str\n"); static PyObject *pygpu_platform_renderer_get(PyObject * /*self*/) { return PyUnicode_FromString(GPU_platform_renderer()); } -PyDoc_STRVAR(pygpu_platform_version_get_doc, - ".. function:: version_get()\n" - "\n" - " Get GPU driver version.\n" - "\n" - " :return: Driver version.\n" - " :rtype: str\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_platform_version_get_doc, + ".. function:: version_get()\n" + "\n" + " Get GPU driver version.\n" + "\n" + " :return: Driver version.\n" + " :rtype: str\n"); static PyObject *pygpu_platform_version_get(PyObject * /*self*/) { return PyUnicode_FromString(GPU_platform_version()); } -PyDoc_STRVAR(pygpu_platform_device_type_get_doc, - ".. function:: device_type_get()\n" - "\n" - " Get GPU device type.\n" - "\n" - " :return: Device type ('APPLE', 'NVIDIA', 'AMD', 'INTEL', 'SOFTWARE', 'QUALCOMM', " - "'UNKNOWN').\n" - " :rtype: str\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_platform_device_type_get_doc, + ".. function:: device_type_get()\n" + "\n" + " Get GPU device type.\n" + "\n" + " :return: Device type ('APPLE', 'NVIDIA', 'AMD', 'INTEL', 'SOFTWARE', 'QUALCOMM', " + "'UNKNOWN').\n" + " :rtype: str\n"); static PyObject *pygpu_platform_device_type_get(PyObject * /*self*/) { const char *device; @@ -95,13 +103,15 @@ static PyObject *pygpu_platform_device_type_get(PyObject * /*self*/) return PyUnicode_FromString(device); } -PyDoc_STRVAR(pygpu_platform_backend_type_get_doc, - ".. function:: backend_type_get()\n" - "\n" - " Get actuve GPU backend.\n" - "\n" - " :return: Backend type ('OPENGL', 'VULKAN', 'METAL', 'NONE', 'UNKNOWN').\n" - " :rtype: str\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_platform_backend_type_get_doc, + ".. function:: backend_type_get()\n" + "\n" + " Get actuve GPU backend.\n" + "\n" + " :return: Backend type ('OPENGL', 'VULKAN', 'METAL', 'NONE', 'UNKNOWN').\n" + " :rtype: str\n"); static PyObject *pygpu_platform_backend_type_get(PyObject * /*self*/) { const char *backend = "UNKNOWN"; @@ -167,7 +177,10 @@ static PyMethodDef pygpu_platform__tp_methods[] = { # pragma GCC diagnostic pop #endif -PyDoc_STRVAR(pygpu_platform__tp_doc, "This module provides access to GPU Platform definitions."); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_platform__tp_doc, + "This module provides access to GPU Platform definitions."); static PyModuleDef pygpu_platform_module_def = { /*m_base*/ PyModuleDef_HEAD_INIT, /*m_name*/ "gpu.platform", diff --git a/source/blender/python/gpu/gpu_py_select.cc b/source/blender/python/gpu/gpu_py_select.cc index a1977434e5a..87fb1fe6df8 100644 --- a/source/blender/python/gpu/gpu_py_select.cc +++ b/source/blender/python/gpu/gpu_py_select.cc @@ -29,13 +29,15 @@ /** \name Methods * \{ */ -PyDoc_STRVAR(pygpu_select_load_id_doc, - ".. function:: load_id(id)\n" - "\n" - " Set the selection ID.\n" - "\n" - " :arg id: Number (32-bit uint).\n" - " :type select: int\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_select_load_id_doc, + ".. function:: load_id(id)\n" + "\n" + " Set the selection ID.\n" + "\n" + " :arg id: Number (32-bit uint).\n" + " :type select: int\n"); static PyObject *pygpu_select_load_id(PyObject * /*self*/, PyObject *value) { uint id; @@ -58,7 +60,10 @@ static PyMethodDef pygpu_select__tp_methods[] = { {nullptr, nullptr, 0, nullptr}, }; -PyDoc_STRVAR(pygpu_select__tp_doc, "This module provides access to selection."); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_select__tp_doc, + "This module provides access to selection."); static PyModuleDef pygpu_select_module_def = { /*m_base*/ PyModuleDef_HEAD_INIT, /*m_name*/ "gpu.select", diff --git a/source/blender/python/gpu/gpu_py_shader.cc b/source/blender/python/gpu/gpu_py_shader.cc index 43332424117..915cf5219c8 100644 --- a/source/blender/python/gpu/gpu_py_shader.cc +++ b/source/blender/python/gpu/gpu_py_shader.cc @@ -152,6 +152,7 @@ static PyObject *pygpu_shader__tp_new(PyTypeObject * /*type*/, PyObject *args, P } PyDoc_STRVAR( + /* Wrap. */ pygpu_shader_bind_doc, ".. method:: bind()\n" "\n" @@ -162,15 +163,17 @@ static PyObject *pygpu_shader_bind(BPyGPUShader *self) Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_shader_uniform_from_name_doc, - ".. method:: uniform_from_name(name)\n" - "\n" - " Get uniform location by name.\n" - "\n" - " :arg name: Name of the uniform variable whose location is to be queried.\n" - " :type name: str\n" - " :return: Location of the uniform variable.\n" - " :rtype: int\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_shader_uniform_from_name_doc, + ".. method:: uniform_from_name(name)\n" + "\n" + " Get uniform location by name.\n" + "\n" + " :arg name: Name of the uniform variable whose location is to be queried.\n" + " :type name: str\n" + " :return: Location of the uniform variable.\n" + " :rtype: int\n"); static PyObject *pygpu_shader_uniform_from_name(BPyGPUShader *self, PyObject *arg) { const char *name = PyUnicode_AsUTF8(arg); @@ -188,15 +191,17 @@ static PyObject *pygpu_shader_uniform_from_name(BPyGPUShader *self, PyObject *ar return PyLong_FromLong(uniform); } -PyDoc_STRVAR(pygpu_shader_uniform_block_from_name_doc, - ".. method:: uniform_block_from_name(name)\n" - "\n" - " Get uniform block location by name.\n" - "\n" - " :arg name: Name of the uniform block variable whose location is to be queried.\n" - " :type name: str\n" - " :return: The location of the uniform block variable.\n" - " :rtype: int\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_shader_uniform_block_from_name_doc, + ".. method:: uniform_block_from_name(name)\n" + "\n" + " Get uniform block location by name.\n" + "\n" + " :arg name: Name of the uniform block variable whose location is to be queried.\n" + " :type name: str\n" + " :return: The location of the uniform block variable.\n" + " :rtype: int\n"); static PyObject *pygpu_shader_uniform_block_from_name(BPyGPUShader *self, PyObject *arg) { const char *name = PyUnicode_AsUTF8(arg); @@ -244,26 +249,29 @@ static bool pygpu_shader_uniform_vector_impl(PyObject *args, return true; } -PyDoc_STRVAR(pygpu_shader_uniform_vector_float_doc, - ".. method:: uniform_vector_float(location, buffer, length, count)\n" - "\n" - " Set the buffer to fill the uniform.\n" - "\n" - " :arg location: Location of the uniform variable to be modified.\n" - " :type location: int\n" - " :arg buffer: The data that should be set. Can support the buffer protocol.\n" - " :type buffer: sequence of floats\n" - " :arg length: Size of the uniform data type:\n\n" - " - 1: float\n" - " - 2: vec2 or float[2]\n" - " - 3: vec3 or float[3]\n" - " - 4: vec4 or float[4]\n" - " - 9: mat3\n" - " - 16: mat4\n" - " :type length: int\n" - " :arg count: Specifies the number of elements, vector or matrices that are to " - "be modified.\n" - " :type count: int\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_shader_uniform_vector_float_doc, + ".. method:: uniform_vector_float(location, buffer, length, count)\n" + "\n" + " Set the buffer to fill the uniform.\n" + "\n" + " :arg location: Location of the uniform variable to be modified.\n" + " :type location: int\n" + " :arg buffer: The data that should be set. Can support the buffer protocol.\n" + " :type buffer: sequence of floats\n" + " :arg length: Size of the uniform data type:\n" + "\n" + " - 1: float\n" + " - 2: vec2 or float[2]\n" + " - 3: vec3 or float[3]\n" + " - 4: vec4 or float[4]\n" + " - 9: mat3\n" + " - 16: mat4\n" + " :type length: int\n" + " :arg count: Specifies the number of elements, vector or matrices that are to " + "be modified.\n" + " :type count: int\n"); static PyObject *pygpu_shader_uniform_vector_float(BPyGPUShader *self, PyObject *args) { int location, length, count; @@ -285,10 +293,12 @@ static PyObject *pygpu_shader_uniform_vector_float(BPyGPUShader *self, PyObject Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_shader_uniform_vector_int_doc, - ".. method:: uniform_vector_int(location, buffer, length, count)\n" - "\n" - " See GPUShader.uniform_vector_float(...) description.\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_shader_uniform_vector_int_doc, + ".. method:: uniform_vector_int(location, buffer, length, count)\n" + "\n" + " See GPUShader.uniform_vector_float(...) description.\n"); static PyObject *pygpu_shader_uniform_vector_int(BPyGPUShader *self, PyObject *args) { int location, length, count; @@ -309,15 +319,17 @@ static PyObject *pygpu_shader_uniform_vector_int(BPyGPUShader *self, PyObject *a Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_shader_uniform_bool_doc, - ".. method:: uniform_bool(name, value)\n" - "\n" - " Specify the value of a uniform variable for the current program object.\n" - "\n" - " :arg name: Name of the uniform variable whose value is to be changed.\n" - " :type name: str\n" - " :arg value: Value that will be used to update the specified uniform variable.\n" - " :type value: bool or sequence of bools\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_shader_uniform_bool_doc, + ".. method:: uniform_bool(name, value)\n" + "\n" + " Specify the value of a uniform variable for the current program object.\n" + "\n" + " :arg name: Name of the uniform variable whose value is to be changed.\n" + " :type name: str\n" + " :arg value: Value that will be used to update the specified uniform variable.\n" + " :type value: bool or sequence of bools\n"); static PyObject *pygpu_shader_uniform_bool(BPyGPUShader *self, PyObject *args) { const char *error_prefix = "GPUShader.uniform_bool"; @@ -382,15 +394,17 @@ static PyObject *pygpu_shader_uniform_bool(BPyGPUShader *self, PyObject *args) Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_shader_uniform_float_doc, - ".. method:: uniform_float(name, value)\n" - "\n" - " Specify the value of a uniform variable for the current program object.\n" - "\n" - " :arg name: Name of the uniform variable whose value is to be changed.\n" - " :type name: str\n" - " :arg value: Value that will be used to update the specified uniform variable.\n" - " :type value: single number or sequence of numbers\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_shader_uniform_float_doc, + ".. method:: uniform_float(name, value)\n" + "\n" + " Specify the value of a uniform variable for the current program object.\n" + "\n" + " :arg name: Name of the uniform variable whose value is to be changed.\n" + " :type name: str\n" + " :arg value: Value that will be used to update the specified uniform variable.\n" + " :type value: single number or sequence of numbers\n"); static PyObject *pygpu_shader_uniform_float(BPyGPUShader *self, PyObject *args) { const char *error_prefix = "GPUShader.uniform_float"; @@ -452,15 +466,17 @@ static PyObject *pygpu_shader_uniform_float(BPyGPUShader *self, PyObject *args) Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_shader_uniform_int_doc, - ".. method:: uniform_int(name, seq)\n" - "\n" - " Specify the value of a uniform variable for the current program object.\n" - "\n" - " :arg name: name of the uniform variable whose value is to be changed.\n" - " :type name: str\n" - " :arg seq: Value that will be used to update the specified uniform variable.\n" - " :type seq: sequence of numbers\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_shader_uniform_int_doc, + ".. method:: uniform_int(name, seq)\n" + "\n" + " Specify the value of a uniform variable for the current program object.\n" + "\n" + " :arg name: name of the uniform variable whose value is to be changed.\n" + " :type name: str\n" + " :arg seq: Value that will be used to update the specified uniform variable.\n" + " :type seq: sequence of numbers\n"); static PyObject *pygpu_shader_uniform_int(BPyGPUShader *self, PyObject *args) { const char *error_prefix = "GPUShader.uniform_int"; @@ -524,15 +540,17 @@ static PyObject *pygpu_shader_uniform_int(BPyGPUShader *self, PyObject *args) Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_shader_uniform_sampler_doc, - ".. method:: uniform_sampler(name, texture)\n" - "\n" - " Specify the value of a texture uniform variable for the current GPUShader.\n" - "\n" - " :arg name: name of the uniform variable whose texture is to be specified.\n" - " :type name: str\n" - " :arg texture: Texture to attach.\n" - " :type texture: :class:`gpu.types.GPUTexture`\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_shader_uniform_sampler_doc, + ".. method:: uniform_sampler(name, texture)\n" + "\n" + " Specify the value of a texture uniform variable for the current GPUShader.\n" + "\n" + " :arg name: name of the uniform variable whose texture is to be specified.\n" + " :type name: str\n" + " :arg texture: Texture to attach.\n" + " :type texture: :class:`gpu.types.GPUTexture`\n"); static PyObject *pygpu_shader_uniform_sampler(BPyGPUShader *self, PyObject *args) { const char *name; @@ -551,15 +569,17 @@ static PyObject *pygpu_shader_uniform_sampler(BPyGPUShader *self, PyObject *args Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_shader_image_doc, - ".. method:: image(name, texture)\n" - "\n" - " Specify the value of an image variable for the current GPUShader.\n" - "\n" - " :arg name: Name of the image variable to which the texture is to be bound.\n" - " :type name: str\n" - " :arg texture: Texture to attach.\n" - " :type texture: :class:`gpu.types.GPUTexture`\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_shader_image_doc, + ".. method:: image(name, texture)\n" + "\n" + " Specify the value of an image variable for the current GPUShader.\n" + "\n" + " :arg name: Name of the image variable to which the texture is to be bound.\n" + " :type name: str\n" + " :arg texture: Texture to attach.\n" + " :type texture: :class:`gpu.types.GPUTexture`\n"); static PyObject *pygpu_shader_image(BPyGPUShader *self, PyObject *args) { const char *name; @@ -581,6 +601,7 @@ static PyObject *pygpu_shader_image(BPyGPUShader *self, PyObject *args) } PyDoc_STRVAR( + /* Wrap. */ pygpu_shader_uniform_block_doc, ".. method:: uniform_block(name, ubo)\n" "\n" @@ -614,15 +635,17 @@ static PyObject *pygpu_shader_uniform_block(BPyGPUShader *self, PyObject *args) Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_shader_attr_from_name_doc, - ".. method:: attr_from_name(name)\n" - "\n" - " Get attribute location by name.\n" - "\n" - " :arg name: The name of the attribute variable whose location is to be queried.\n" - " :type name: str\n" - " :return: The location of an attribute variable.\n" - " :rtype: int\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_shader_attr_from_name_doc, + ".. method:: attr_from_name(name)\n" + "\n" + " Get attribute location by name.\n" + "\n" + " :arg name: The name of the attribute variable whose location is to be queried.\n" + " :type name: str\n" + " :return: The location of an attribute variable.\n" + " :rtype: int\n"); static PyObject *pygpu_shader_attr_from_name(BPyGPUShader *self, PyObject *arg) { const char *name = PyUnicode_AsUTF8(arg); @@ -640,13 +663,15 @@ static PyObject *pygpu_shader_attr_from_name(BPyGPUShader *self, PyObject *arg) return PyLong_FromLong(attr); } -PyDoc_STRVAR(pygpu_shader_format_calc_doc, - ".. method:: format_calc()\n" - "\n" - " Build a new format based on the attributes of the shader.\n" - "\n" - " :return: vertex attribute format for the shader\n" - " :rtype: :class:`gpu.types.GPUVertFormat`\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_shader_format_calc_doc, + ".. method:: format_calc()\n" + "\n" + " Build a new format based on the attributes of the shader.\n" + "\n" + " :return: vertex attribute format for the shader\n" + " :rtype: :class:`gpu.types.GPUVertFormat`\n"); static PyObject *pygpu_shader_format_calc(BPyGPUShader *self, PyObject * /*arg*/) { BPyGPUVertFormat *ret = (BPyGPUVertFormat *)BPyGPUVertFormat_CreatePyObject(nullptr); @@ -655,6 +680,7 @@ static PyObject *pygpu_shader_format_calc(BPyGPUShader *self, PyObject * /*arg*/ } PyDoc_STRVAR( + /* Wrap. */ pygpu_shader_attrs_info_get_doc, ".. method:: attrs_info_get()\n" "\n" @@ -755,16 +781,23 @@ static PyMethodDef pygpu_shader__tp_methods[] = { # pragma GCC diagnostic pop #endif -PyDoc_STRVAR(pygpu_shader_name_doc, - "The name of the shader object for debugging purposes (read-only).\n\n:type: str"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_shader_name_doc, + "The name of the shader object for debugging purposes (read-only).\n" + "\n" + ":type: str"); static PyObject *pygpu_shader_name(BPyGPUShader *self, void * /*closure*/) { return PyUnicode_FromString(GPU_shader_get_name(self->shader)); } PyDoc_STRVAR( + /* Wrap. */ pygpu_shader_program_doc, - "The name of the program object for use by the OpenGL API (read-only).\n\n:type: int"); + "The name of the program object for use by the OpenGL API (read-only).\n" + "\n" + ":type: int"); static PyObject *pygpu_shader_program_get(BPyGPUShader *self, void * /*closure*/) { return PyLong_FromLong(GPU_shader_get_program(self->shader)); @@ -789,6 +822,7 @@ static void pygpu_shader__tp_dealloc(BPyGPUShader *self) } PyDoc_STRVAR( + /* Wrap. */ pygpu_shader__tp_doc, ".. class:: GPUShader(vertexcode, fragcode, geocode=None, libcode=None, defines=None, " "name='pyGPUShader')\n" @@ -878,10 +912,12 @@ PyTypeObject BPyGPUShader_Type = { /** \name gpu.shader Module API * \{ */ -PyDoc_STRVAR(pygpu_shader_unbind_doc, - ".. function:: unbind()\n" - "\n" - " Unbind the bound shader object.\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_shader_unbind_doc, + ".. function:: unbind()\n" + "\n" + " Unbind the bound shader object.\n"); static PyObject *pygpu_shader_unbind(BPyGPUShader * /*self*/) { GPU_shader_unbind(); @@ -889,6 +925,7 @@ static PyObject *pygpu_shader_unbind(BPyGPUShader * /*self*/) } PyDoc_STRVAR( + /* Wrap. */ pygpu_shader_from_builtin_doc, ".. function:: from_builtin(shader_name, config='DEFAULT')\n" "\n" @@ -942,15 +979,17 @@ static PyObject *pygpu_shader_from_builtin(PyObject * /*self*/, PyObject *args, return BPyGPUShader_CreatePyObject(shader, true); } -PyDoc_STRVAR(pygpu_shader_create_from_info_doc, - ".. function:: create_from_info(shader_info)\n" - "\n" - " Create shader from a GPUShaderCreateInfo.\n" - "\n" - " :arg shader_info: GPUShaderCreateInfo\n" - " :type shader_info: :class:`bpy.types.GPUShaderCreateInfo`\n" - " :return: Shader object corresponding to the given name.\n" - " :rtype: :class:`bpy.types.GPUShader`\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_shader_create_from_info_doc, + ".. function:: create_from_info(shader_info)\n" + "\n" + " Create shader from a GPUShaderCreateInfo.\n" + "\n" + " :arg shader_info: GPUShaderCreateInfo\n" + " :type shader_info: :class:`bpy.types.GPUShaderCreateInfo`\n" + " :return: Shader object corresponding to the given name.\n" + " :rtype: :class:`bpy.types.GPUShader`\n"); static PyObject *pygpu_shader_create_from_info(BPyGPUShader * /*self*/, BPyGPUShaderCreateInfo *o) { if (!BPyGPUShaderCreateInfo_Check(o)) { @@ -995,17 +1034,19 @@ static PyMethodDef pygpu_shader_module__tp_methods[] = { # pragma GCC diagnostic pop #endif -PyDoc_STRVAR(pygpu_shader_module__tp_doc, - "This module provides access to GPUShader internal functions.\n" - "\n" - ".. _built-in-shaders:\n" - "\n" - ".. rubric:: Built-in shaders\n" - "\n" - "All built-in shaders have the ``mat4 ModelViewProjectionMatrix`` uniform.\n" - "\n" - "Its value must be modified using the :class:`gpu.matrix` module.\n" - "\n" PYDOC_BUILTIN_SHADER_DESCRIPTION); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_shader_module__tp_doc, + "This module provides access to GPUShader internal functions.\n" + "\n" + ".. _built-in-shaders:\n" + "\n" + ".. rubric:: Built-in shaders\n" + "\n" + "All built-in shaders have the ``mat4 ModelViewProjectionMatrix`` uniform.\n" + "\n" + "Its value must be modified using the :class:`gpu.matrix` module.\n" + "\n" PYDOC_BUILTIN_SHADER_DESCRIPTION); static PyModuleDef pygpu_shader_module_def = { /*m_base*/ PyModuleDef_HEAD_INIT, /*m_name*/ "gpu.shader", diff --git a/source/blender/python/gpu/gpu_py_shader_create_info.cc b/source/blender/python/gpu/gpu_py_shader_create_info.cc index 82ff5c8cb5e..0f18fb0164d 100644 --- a/source/blender/python/gpu/gpu_py_shader_create_info.cc +++ b/source/blender/python/gpu/gpu_py_shader_create_info.cc @@ -241,17 +241,19 @@ static bool pygpu_interface_info_get_args(BPyGPUStageInterfaceInfo *self, return true; } -PyDoc_STRVAR(pygpu_interface_info_smooth_doc, - ".. method:: smooth(type, name)\n" - "\n" - " Add an attribute with qualifier of type `smooth` to the interface block.\n" - "\n" - " :arg type: One of these types:\n" - "\n" PYDOC_TYPE_LIST - "\n" - " :type type: str\n" - " :arg name: name of the attribute.\n" - " :type name: str\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_interface_info_smooth_doc, + ".. method:: smooth(type, name)\n" + "\n" + " Add an attribute with qualifier of type `smooth` to the interface block.\n" + "\n" + " :arg type: One of these types:\n" + "\n" PYDOC_TYPE_LIST + "\n" + " :type type: str\n" + " :arg name: name of the attribute.\n" + " :type name: str\n"); static PyObject *pygpu_interface_info_smooth(BPyGPUStageInterfaceInfo *self, PyObject *args) { Type type; @@ -265,17 +267,19 @@ static PyObject *pygpu_interface_info_smooth(BPyGPUStageInterfaceInfo *self, PyO Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_interface_info_flat_doc, - ".. method:: flat(type, name)\n" - "\n" - " Add an attribute with qualifier of type `flat` to the interface block.\n" - "\n" - " :arg type: One of these types:\n" - "\n" PYDOC_TYPE_LIST - "\n" - " :type type: str\n" - " :arg name: name of the attribute.\n" - " :type name: str\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_interface_info_flat_doc, + ".. method:: flat(type, name)\n" + "\n" + " Add an attribute with qualifier of type `flat` to the interface block.\n" + "\n" + " :arg type: One of these types:\n" + "\n" PYDOC_TYPE_LIST + "\n" + " :type type: str\n" + " :arg name: name of the attribute.\n" + " :type name: str\n"); static PyObject *pygpu_interface_info_flat(BPyGPUStageInterfaceInfo *self, PyObject *args) { Type type; @@ -290,6 +294,7 @@ static PyObject *pygpu_interface_info_flat(BPyGPUStageInterfaceInfo *self, PyObj } PyDoc_STRVAR( + /* Wrap. */ pygpu_interface_info_no_perspective_doc, ".. method:: no_perspective(type, name)\n" "\n" @@ -334,10 +339,12 @@ static PyMethodDef pygpu_interface_info__tp_methods[] = { /** \name GPUStageInterfaceInfo Getters and Setters * \{ */ -PyDoc_STRVAR(pygpu_interface_info_name_doc, - "Name of the interface block.\n" - "\n" - ":type: str"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_interface_info_name_doc, + "Name of the interface block.\n" + "\n" + ":type: str"); static PyObject *pygpu_interface_info_name_get(BPyGPUStageInterfaceInfo *self, void * /*closure*/) { StageInterfaceInfo *interface = reinterpret_cast(self->interface); @@ -421,13 +428,15 @@ static void pygpu_interface_info__tp_dealloc(PyObject *self) Py_TYPE(self)->tp_free((PyObject *)self); } -PyDoc_STRVAR(pygpu_interface_info__tp_doc, - ".. class:: GPUStageInterfaceInfo(name)\n" - "\n" - " List of varyings between shader stages.\n\n" - "\n" - " :arg name: Name of the interface block.\n" - " :type value: str\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_interface_info__tp_doc, + ".. class:: GPUStageInterfaceInfo(name)\n" + "\n" + " List of varyings between shader stages.\n" + "\n" + " :arg name: Name of the interface block.\n" + " :type value: str\n"); PyTypeObject BPyGPUStageInterfaceInfo_Type = { /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0) /*tp_name*/ "GPUStageInterfaceInfo", @@ -498,19 +507,21 @@ PyTypeObject BPyGPUStageInterfaceInfo_Type = { /** \name GPUShaderCreateInfo Methods * \{ */ -PyDoc_STRVAR(pygpu_shader_info_vertex_in_doc, - ".. method:: vertex_in(slot, type, name)\n" - "\n" - " Add a vertex shader input attribute.\n" - "\n" - " :arg slot: The attribute index.\n" - " :type slot: int\n" - " :arg type: One of these types:\n" - "\n" PYDOC_TYPE_LIST - "\n" - " :type type: str\n" - " :arg name: name of the attribute.\n" - " :type name: str\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_shader_info_vertex_in_doc, + ".. method:: vertex_in(slot, type, name)\n" + "\n" + " Add a vertex shader input attribute.\n" + "\n" + " :arg slot: The attribute index.\n" + " :type slot: int\n" + " :arg type: One of these types:\n" + "\n" PYDOC_TYPE_LIST + "\n" + " :type type: str\n" + " :arg name: name of the attribute.\n" + " :type name: str\n"); static PyObject *pygpu_shader_info_vertex_in(BPyGPUShaderCreateInfo *self, PyObject *args) { int slot; @@ -531,13 +542,15 @@ static PyObject *pygpu_shader_info_vertex_in(BPyGPUShaderCreateInfo *self, PyObj Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_shader_info_vertex_out_doc, - ".. method:: vertex_out(interface)\n" - "\n" - " Add a vertex shader output interface block.\n" - "\n" - " :arg interface: Object describing the block.\n" - " :type interface: :class:`gpu.types.GPUStageInterfaceInfo`\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_shader_info_vertex_out_doc, + ".. method:: vertex_out(interface)\n" + "\n" + " Add a vertex shader output interface block.\n" + "\n" + " :arg interface: Object describing the block.\n" + " :type interface: :class:`gpu.types.GPUStageInterfaceInfo`\n"); static PyObject *pygpu_shader_info_vertex_out(BPyGPUShaderCreateInfo *self, BPyGPUStageInterfaceInfo *o) { @@ -557,21 +570,23 @@ static PyObject *pygpu_shader_info_vertex_out(BPyGPUShaderCreateInfo *self, Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_shader_info_fragment_out_doc, - ".. method:: fragment_out(slot, type, name, blend='NONE')\n" - "\n" - " Specify a fragment output corresponding to a framebuffer target slot.\n" - "\n" - " :arg slot: The attribute index.\n" - " :type slot: int\n" - " :arg type: One of these types:\n" - "\n" PYDOC_TYPE_LIST - "\n" - " :type type: str\n" - " :arg name: Name of the attribute.\n" - " :type name: str\n" - " :arg blend: Dual Source Blending Index. It can be 'NONE', 'SRC_0' or 'SRC_1'.\n" - " :type blend: str\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_shader_info_fragment_out_doc, + ".. method:: fragment_out(slot, type, name, blend='NONE')\n" + "\n" + " Specify a fragment output corresponding to a framebuffer target slot.\n" + "\n" + " :arg slot: The attribute index.\n" + " :type slot: int\n" + " :arg type: One of these types:\n" + "\n" PYDOC_TYPE_LIST + "\n" + " :type type: str\n" + " :arg name: Name of the attribute.\n" + " :type name: str\n" + " :arg blend: Dual Source Blending Index. It can be 'NONE', 'SRC_0' or 'SRC_1'.\n" + " :type blend: str\n"); static PyObject *pygpu_shader_info_fragment_out(BPyGPUShaderCreateInfo *self, PyObject *args, PyObject *kwds) @@ -618,6 +633,7 @@ static PyObject *pygpu_shader_info_fragment_out(BPyGPUShaderCreateInfo *self, } PyDoc_STRVAR( + /* Wrap. */ pygpu_shader_info_uniform_buf_doc, ".. method:: uniform_buf(slot, type_name, name)\n" "\n" @@ -653,6 +669,7 @@ static PyObject *pygpu_shader_info_uniform_buf(BPyGPUShaderCreateInfo *self, PyO #ifdef USE_PYGPU_SHADER_INFO_IMAGE_METHOD PyDoc_STRVAR( + /* Wrap. */ pygpu_shader_info_image_doc, ".. method:: image(slot, format, type, name, qualifiers={'NO_RESTRICT'})\n" "\n" @@ -736,6 +753,7 @@ static PyObject *pygpu_shader_info_image(BPyGPUShaderCreateInfo *self, #endif PyDoc_STRVAR( + /* Wrap. */ pygpu_shader_info_sampler_doc, ".. method:: sampler(slot, type, name)\n" "\n" @@ -859,20 +877,22 @@ static int constants_calc_size(ShaderCreateInfo *info) return size_prev + (size_prev % 16); } -PyDoc_STRVAR(pygpu_shader_info_push_constant_doc, - ".. method:: push_constant(type, name, size=0)\n" - "\n" - " Specify a global access constant.\n" - "\n" - " :arg type: One of these types:\n" - "\n" PYDOC_TYPE_LIST - "\n" - " :type type: str\n" - " :arg name: Name of the constant.\n" - " :type name: str\n" - " :arg size: If not zero, indicates that the constant is an array with the " - "specified size.\n" - " :type size: uint\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_shader_info_push_constant_doc, + ".. method:: push_constant(type, name, size=0)\n" + "\n" + " Specify a global access constant.\n" + "\n" + " :arg type: One of these types:\n" + "\n" PYDOC_TYPE_LIST + "\n" + " :type type: str\n" + " :arg name: Name of the constant.\n" + " :type name: str\n" + " :arg size: If not zero, indicates that the constant is an array with the " + "specified size.\n" + " :type size: uint\n"); static PyObject *pygpu_shader_info_push_constant(BPyGPUShaderCreateInfo *self, PyObject *args, PyObject *kwds) @@ -916,22 +936,24 @@ static PyObject *pygpu_shader_info_push_constant(BPyGPUShaderCreateInfo *self, Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_shader_info_vertex_source_doc, - ".. method:: vertex_source(source)\n" - "\n" - " Vertex shader source code written in GLSL.\n" - "\n" - " Example:\n" - "\n" - " .. code-block:: python\n" - "\n" - " \"void main {gl_Position = vec4(pos, 1.0);}\"\n" - "\n" - " :arg source: The vertex shader source code.\n" - " :type source: str\n" - "\n" - " .. seealso:: `GLSL Cross Compilation " - "`__\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_shader_info_vertex_source_doc, + ".. method:: vertex_source(source)\n" + "\n" + " Vertex shader source code written in GLSL.\n" + "\n" + " Example:\n" + "\n" + " .. code-block:: python\n" + "\n" + " \"void main {gl_Position = vec4(pos, 1.0);}\"\n" + "\n" + " :arg source: The vertex shader source code.\n" + " :type source: str\n" + "\n" + " .. seealso:: `GLSL Cross Compilation " + "`__\n"); static PyObject *pygpu_shader_info_vertex_source(BPyGPUShaderCreateInfo *self, PyObject *o) { const char *vertex_source = PyUnicode_AsUTF8(o); @@ -956,26 +978,28 @@ static PyObject *pygpu_shader_info_vertex_source(BPyGPUShaderCreateInfo *self, P Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_shader_info_compute_source_doc, - ".. method:: compute_source(source)\n" - "\n" - " compute shader source code written in GLSL.\n" - "\n" - " Example:\n" - "\n" - " .. code-block:: python\n" - "\n" - " \"\"\"void main() {\n" - " int2 index = int2(gl_GlobalInvocationID.xy);\n" - " vec4 color = vec4(0.0, 0.0, 0.0, 1.0);\n" - " imageStore(img_output, index, color);\n" - " }\"\"\"\n" - "\n" - " :arg source: The compute shader source code.\n" - " :type source: str\n" - "\n" - " .. seealso:: `GLSL Cross Compilation " - "`__\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_shader_info_compute_source_doc, + ".. method:: compute_source(source)\n" + "\n" + " compute shader source code written in GLSL.\n" + "\n" + " Example:\n" + "\n" + " .. code-block:: python\n" + "\n" + " \"\"\"void main() {\n" + " int2 index = int2(gl_GlobalInvocationID.xy);\n" + " vec4 color = vec4(0.0, 0.0, 0.0, 1.0);\n" + " imageStore(img_output, index, color);\n" + " }\"\"\"\n" + "\n" + " :arg source: The compute shader source code.\n" + " :type source: str\n" + "\n" + " .. seealso:: `GLSL Cross Compilation " + "`__\n"); static PyObject *pygpu_shader_info_compute_source(BPyGPUShaderCreateInfo *self, PyObject *o) { const char *compute_source = PyUnicode_AsUTF8(o); @@ -1000,22 +1024,24 @@ static PyObject *pygpu_shader_info_compute_source(BPyGPUShaderCreateInfo *self, Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_shader_info_fragment_source_doc, - ".. method:: fragment_source(source)\n" - "\n" - " Fragment shader source code written in GLSL.\n" - "\n" - " Example:\n" - "\n" - " .. code-block:: python\n" - "\n" - " \"void main {fragColor = vec4(0.0, 0.0, 0.0, 1.0);}\"\n" - "\n" - " :arg source: The fragment shader source code.\n" - " :type source: str\n" - "\n" - " .. seealso:: `GLSL Cross Compilation " - "`__\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_shader_info_fragment_source_doc, + ".. method:: fragment_source(source)\n" + "\n" + " Fragment shader source code written in GLSL.\n" + "\n" + " Example:\n" + "\n" + " .. code-block:: python\n" + "\n" + " \"void main {fragColor = vec4(0.0, 0.0, 0.0, 1.0);}\"\n" + "\n" + " :arg source: The fragment shader source code.\n" + " :type source: str\n" + "\n" + " .. seealso:: `GLSL Cross Compilation " + "`__\n"); static PyObject *pygpu_shader_info_fragment_source(BPyGPUShaderCreateInfo *self, PyObject *o) { const char *fragment_source = PyUnicode_AsUTF8(o); @@ -1040,20 +1066,22 @@ static PyObject *pygpu_shader_info_fragment_source(BPyGPUShaderCreateInfo *self, Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_shader_info_typedef_source_doc, - ".. method:: typedef_source(source)\n" - "\n" - " Source code included before resource declaration. " - "Useful for defining structs used by Uniform Buffers.\n" - "\n" - " Example:\n" - "\n" - ".. code-block:: python\n" - "\n" - " \"struct MyType {int foo; float bar;};\"\n" - "\n" - " :arg source: The source code defining types.\n" - " :type source: str\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_shader_info_typedef_source_doc, + ".. method:: typedef_source(source)\n" + "\n" + " Source code included before resource declaration. " + "Useful for defining structs used by Uniform Buffers.\n" + "\n" + " Example:\n" + "\n" + ".. code-block:: python\n" + "\n" + " \"struct MyType {int foo; float bar;};\"\n" + "\n" + " :arg source: The source code defining types.\n" + " :type source: str\n"); static PyObject *pygpu_shader_info_typedef_source(BPyGPUShaderCreateInfo *self, PyObject *o) { const char *typedef_source = PyUnicode_AsUTF8(o); @@ -1082,19 +1110,21 @@ static PyObject *pygpu_shader_info_typedef_source(BPyGPUShaderCreateInfo *self, Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_shader_info_define_doc, - ".. method:: define(name, value)\n" - "\n" - " Add a preprocessing define directive. In GLSL it would be something like:\n" - "\n" - ".. code-block:: glsl\n" - "\n" - " #define name value\n" - "\n" - " :arg name: Token name.\n" - " :type name: str\n" - " :arg value: Text that replaces token occurrences.\n" - " :type value: str\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_shader_info_define_doc, + ".. method:: define(name, value)\n" + "\n" + " Add a preprocessing define directive. In GLSL it would be something like:\n" + "\n" + ".. code-block:: glsl\n" + "\n" + " #define name value\n" + "\n" + " :arg name: Token name.\n" + " :type name: str\n" + " :arg value: Text that replaces token occurrences.\n" + " :type value: str\n"); static PyObject *pygpu_shader_info_define(BPyGPUShaderCreateInfo *self, PyObject *args) { const char *name; @@ -1122,17 +1152,19 @@ static PyObject *pygpu_shader_info_define(BPyGPUShaderCreateInfo *self, PyObject Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_shader_info_local_group_size_doc, - ".. method:: local_group_size(x, y=-1, z=-1)\n" - "\n" - " Specify the local group size for compute shaders.\n" - "\n" - " :arg x: The local group size in the x dimension.\n" - " :type x: int\n" - " :arg y: The local group size in the y dimension. Optional. Defaults to -1.\n" - " :type y: int\n" - " :arg z: The local group size in the z dimension. Optional. Defaults to -1.\n" - " :type z: int\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_shader_info_local_group_size_doc, + ".. method:: local_group_size(x, y=-1, z=-1)\n" + "\n" + " Specify the local group size for compute shaders.\n" + "\n" + " :arg x: The local group size in the x dimension.\n" + " :type x: int\n" + " :arg y: The local group size in the y dimension. Optional. Defaults to -1.\n" + " :type y: int\n" + " :arg z: The local group size in the z dimension. Optional. Defaults to -1.\n" + " :type z: int\n"); static PyObject *pygpu_shader_info_local_group_size(BPyGPUShaderCreateInfo *self, PyObject *args) { int x = -1, y = -1, z = -1; @@ -1266,10 +1298,12 @@ static void pygpu_shader_info__tp_dealloc(PyObject *self) Py_TYPE(self)->tp_free((PyObject *)self); } -PyDoc_STRVAR(pygpu_shader_info__tp_doc, - ".. class:: GPUShaderCreateInfo()\n" - "\n" - " Stores and describes types and variables that are used in shader sources.\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_shader_info__tp_doc, + ".. class:: GPUShaderCreateInfo()\n" + "\n" + " Stores and describes types and variables that are used in shader sources.\n"); PyTypeObject BPyGPUShaderCreateInfo_Type = { /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0) diff --git a/source/blender/python/gpu/gpu_py_state.cc b/source/blender/python/gpu/gpu_py_state.cc index 85e07a431b0..59851e872c4 100644 --- a/source/blender/python/gpu/gpu_py_state.cc +++ b/source/blender/python/gpu/gpu_py_state.cc @@ -70,6 +70,7 @@ static const PyC_StringEnumItems pygpu_state_faceculling_items[] = { * \{ */ PyDoc_STRVAR( + /* Wrap. */ pygpu_state_blend_set_doc, ".. function:: blend_set(mode)\n" "\n" @@ -101,24 +102,28 @@ static PyObject *pygpu_state_blend_set(PyObject * /*self*/, PyObject *value) Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_state_blend_get_doc, - ".. function:: blend_get()\n" - "\n" - " Current blending equation.\n" - "\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_state_blend_get_doc, + ".. function:: blend_get()\n" + "\n" + " Current blending equation.\n" + "\n"); static PyObject *pygpu_state_blend_get(PyObject * /*self*/) { eGPUBlend blend = GPU_blend_get(); return PyUnicode_FromString(PyC_StringEnum_FindIDFromValue(pygpu_state_blend_items, blend)); } -PyDoc_STRVAR(pygpu_state_clip_distances_set_doc, - ".. function:: clip_distances_set(distances_enabled)\n" - "\n" - " Sets the number of `gl_ClipDistance` planes used for clip geometry.\n" - "\n" - " :arg distances_enabled: Number of clip distances enabled.\n" - " :type distances_enabled: int\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_state_clip_distances_set_doc, + ".. function:: clip_distances_set(distances_enabled)\n" + "\n" + " Sets the number of `gl_ClipDistance` planes used for clip geometry.\n" + "\n" + " :arg distances_enabled: Number of clip distances enabled.\n" + " :type distances_enabled: int\n"); static PyObject *pygpu_state_clip_distances_set(PyObject * /*self*/, PyObject *value) { int distances_enabled = int(PyLong_AsUnsignedLong(value)); @@ -134,15 +139,17 @@ static PyObject *pygpu_state_clip_distances_set(PyObject * /*self*/, PyObject *v Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_state_depth_test_set_doc, - ".. function:: depth_test_set(mode)\n" - "\n" - " Defines the depth_test equation.\n" - "\n" - " :arg mode: The depth test equation name.\n" - " Possible values are `NONE`, `ALWAYS`, `LESS`, `LESS_EQUAL`, `EQUAL`, " - "`GREATER` and `GREATER_EQUAL`.\n" - " :type mode: str\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_state_depth_test_set_doc, + ".. function:: depth_test_set(mode)\n" + "\n" + " Defines the depth_test equation.\n" + "\n" + " :arg mode: The depth test equation name.\n" + " Possible values are `NONE`, `ALWAYS`, `LESS`, `LESS_EQUAL`, `EQUAL`, " + "`GREATER` and `GREATER_EQUAL`.\n" + " :type mode: str\n"); static PyObject *pygpu_state_depth_test_set(PyObject * /*self*/, PyObject *value) { PyC_StringEnum pygpu_depth_test = {pygpu_state_depthtest_items}; @@ -153,24 +160,28 @@ static PyObject *pygpu_state_depth_test_set(PyObject * /*self*/, PyObject *value Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_state_depth_test_get_doc, - ".. function:: depth_test_get()\n" - "\n" - " Current depth_test equation.\n" - "\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_state_depth_test_get_doc, + ".. function:: depth_test_get()\n" + "\n" + " Current depth_test equation.\n" + "\n"); static PyObject *pygpu_state_depth_test_get(PyObject * /*self*/) { eGPUDepthTest test = GPU_depth_test_get(); return PyUnicode_FromString(PyC_StringEnum_FindIDFromValue(pygpu_state_depthtest_items, test)); } -PyDoc_STRVAR(pygpu_state_depth_mask_set_doc, - ".. function:: depth_mask_set(value)\n" - "\n" - " Write to depth component.\n" - "\n" - " :arg value: True for writing to the depth component.\n" - " :type near: bool\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_state_depth_mask_set_doc, + ".. function:: depth_mask_set(value)\n" + "\n" + " Write to depth component.\n" + "\n" + " :arg value: True for writing to the depth component.\n" + " :type near: bool\n"); static PyObject *pygpu_state_depth_mask_set(PyObject * /*self*/, PyObject *value) { bool write_to_depth; @@ -181,25 +192,29 @@ static PyObject *pygpu_state_depth_mask_set(PyObject * /*self*/, PyObject *value Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_state_depth_mask_get_doc, - ".. function:: depth_mask_get()\n" - "\n" - " Writing status in the depth component.\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_state_depth_mask_get_doc, + ".. function:: depth_mask_get()\n" + "\n" + " Writing status in the depth component.\n"); static PyObject *pygpu_state_depth_mask_get(PyObject * /*self*/) { return PyBool_FromLong(GPU_depth_mask_get()); } -PyDoc_STRVAR(pygpu_state_viewport_set_doc, - ".. function:: viewport_set(x, y, xsize, ysize)\n" - "\n" - " Specifies the viewport of the active framebuffer.\n" - " Note: The viewport state is not saved upon framebuffer rebind.\n" - "\n" - " :arg x, y: lower left corner of the viewport_set rectangle, in pixels.\n" - " :type x, y: int\n" - " :arg xsize, ysize: width and height of the viewport_set.\n" - " :type xsize, ysize: int\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_state_viewport_set_doc, + ".. function:: viewport_set(x, y, xsize, ysize)\n" + "\n" + " Specifies the viewport of the active framebuffer.\n" + " Note: The viewport state is not saved upon framebuffer rebind.\n" + "\n" + " :arg x, y: lower left corner of the viewport_set rectangle, in pixels.\n" + " :type x, y: int\n" + " :arg xsize, ysize: width and height of the viewport_set.\n" + " :type xsize, ysize: int\n"); static PyObject *pygpu_state_viewport_set(PyObject * /*self*/, PyObject *args) { int x, y, xsize, ysize; @@ -211,10 +226,12 @@ static PyObject *pygpu_state_viewport_set(PyObject * /*self*/, PyObject *args) Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_state_viewport_get_doc, - ".. function:: viewport_get()\n" - "\n" - " Viewport of the active framebuffer.\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_state_viewport_get_doc, + ".. function:: viewport_get()\n" + "\n" + " Viewport of the active framebuffer.\n"); static PyObject *pygpu_state_viewport_get(PyObject * /*self*/, PyObject * /*args*/) { int viewport[4]; @@ -229,16 +246,18 @@ static PyObject *pygpu_state_viewport_get(PyObject * /*self*/, PyObject * /*args return ret; } -PyDoc_STRVAR(pygpu_state_scissor_set_doc, - ".. function:: scissor_set(x, y, xsize, ysize)\n" - "\n" - " Specifies the scissor area of the active framebuffer.\n" - " Note: The scissor state is not saved upon framebuffer rebind.\n" - "\n" - " :arg x, y: lower left corner of the scissor rectangle, in pixels.\n" - " :type x, y: int\n" - " :arg xsize, ysize: width and height of the scissor rectangle.\n" - " :type xsize, ysize: int\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_state_scissor_set_doc, + ".. function:: scissor_set(x, y, xsize, ysize)\n" + "\n" + " Specifies the scissor area of the active framebuffer.\n" + " Note: The scissor state is not saved upon framebuffer rebind.\n" + "\n" + " :arg x, y: lower left corner of the scissor rectangle, in pixels.\n" + " :type x, y: int\n" + " :arg xsize, ysize: width and height of the scissor rectangle.\n" + " :type xsize, ysize: int\n"); static PyObject *pygpu_state_scissor_set(PyObject * /*self*/, PyObject *args) { int x, y, xsize, ysize; @@ -250,17 +269,19 @@ static PyObject *pygpu_state_scissor_set(PyObject * /*self*/, PyObject *args) Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_state_scissor_get_doc, - ".. function:: scissor_get()\n" - "\n" - " Retrieve the scissors of the active framebuffer.\n" - " Note: Only valid between 'scissor_set' and a framebuffer rebind.\n" - "\n" - " :return: The scissor of the active framebuffer as a tuple\n" - " (x, y, xsize, ysize).\n" - " x, y: lower left corner of the scissor rectangle, in pixels.\n" - " xsize, ysize: width and height of the scissor rectangle.\n" - " :rtype: tuple(int, int, int, int)\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_state_scissor_get_doc, + ".. function:: scissor_get()\n" + "\n" + " Retrieve the scissors of the active framebuffer.\n" + " Note: Only valid between 'scissor_set' and a framebuffer rebind.\n" + "\n" + " :return: The scissor of the active framebuffer as a tuple\n" + " (x, y, xsize, ysize).\n" + " x, y: lower left corner of the scissor rectangle, in pixels.\n" + " xsize, ysize: width and height of the scissor rectangle.\n" + " :rtype: tuple(int, int, int, int)\n"); static PyObject *pygpu_state_scissor_get(PyObject * /*self*/, PyObject * /*args*/) { int scissor[4]; @@ -275,15 +296,17 @@ static PyObject *pygpu_state_scissor_get(PyObject * /*self*/, PyObject * /*args* return ret; } -PyDoc_STRVAR(pygpu_state_scissor_test_set_doc, - ".. function:: scissor_test_set(enable)\n" - "\n" - " Enable/disable scissor testing on the active framebuffer.\n" - "\n" - " :arg enable:\n" - " True - enable scissor testing.\n" - " False - disable scissor testing.\n" - " :type enable: bool\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_state_scissor_test_set_doc, + ".. function:: scissor_test_set(enable)\n" + "\n" + " Enable/disable scissor testing on the active framebuffer.\n" + "\n" + " :arg enable:\n" + " True - enable scissor testing.\n" + " False - disable scissor testing.\n" + " :type enable: bool\n"); static PyObject *pygpu_state_scissor_test_set(PyObject * /*self*/, PyObject *value) { bool enabled; @@ -295,13 +318,15 @@ static PyObject *pygpu_state_scissor_test_set(PyObject * /*self*/, PyObject *val Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_state_line_width_set_doc, - ".. function:: line_width_set(width)\n" - "\n" - " Specify the width of rasterized lines.\n" - "\n" - " :arg size: New width.\n" - " :type mode: float\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_state_line_width_set_doc, + ".. function:: line_width_set(width)\n" + "\n" + " Specify the width of rasterized lines.\n" + "\n" + " :arg size: New width.\n" + " :type mode: float\n"); static PyObject *pygpu_state_line_width_set(PyObject * /*self*/, PyObject *value) { float width = float(PyFloat_AsDouble(value)); @@ -313,23 +338,27 @@ static PyObject *pygpu_state_line_width_set(PyObject * /*self*/, PyObject *value Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_state_line_width_get_doc, - ".. function:: line_width_get()\n" - "\n" - " Current width of rasterized lines.\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_state_line_width_get_doc, + ".. function:: line_width_get()\n" + "\n" + " Current width of rasterized lines.\n"); static PyObject *pygpu_state_line_width_get(PyObject * /*self*/) { float width = GPU_line_width_get(); return PyFloat_FromDouble(double(width)); } -PyDoc_STRVAR(pygpu_state_point_size_set_doc, - ".. function:: point_size_set(size)\n" - "\n" - " Specify the diameter of rasterized points.\n" - "\n" - " :arg size: New diameter.\n" - " :type mode: float\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_state_point_size_set_doc, + ".. function:: point_size_set(size)\n" + "\n" + " Specify the diameter of rasterized points.\n" + "\n" + " :arg size: New diameter.\n" + " :type mode: float\n"); static PyObject *pygpu_state_point_size_set(PyObject * /*self*/, PyObject *value) { float size = float(PyFloat_AsDouble(value)); @@ -341,13 +370,15 @@ static PyObject *pygpu_state_point_size_set(PyObject * /*self*/, PyObject *value Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_state_color_mask_set_doc, - ".. function:: color_mask_set(r, g, b, a)\n" - "\n" - " Enable or disable writing of frame buffer color components.\n" - "\n" - " :arg r, g, b, a: components red, green, blue, and alpha.\n" - " :type r, g, b, a: bool\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_state_color_mask_set_doc, + ".. function:: color_mask_set(r, g, b, a)\n" + "\n" + " Enable or disable writing of frame buffer color components.\n" + "\n" + " :arg r, g, b, a: components red, green, blue, and alpha.\n" + " :type r, g, b, a: bool\n"); static PyObject *pygpu_state_color_mask_set(PyObject * /*self*/, PyObject *args) { int r, g, b, a; @@ -359,13 +390,15 @@ static PyObject *pygpu_state_color_mask_set(PyObject * /*self*/, PyObject *args) Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_state_face_culling_set_doc, - ".. function:: face_culling_set(culling)\n" - "\n" - " Specify whether none, front-facing or back-facing facets can be culled.\n" - "\n" - " :arg mode: `NONE`, `FRONT` or `BACK`.\n" - " :type mode: str\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_state_face_culling_set_doc, + ".. function:: face_culling_set(culling)\n" + "\n" + " Specify whether none, front-facing or back-facing facets can be culled.\n" + "\n" + " :arg mode: `NONE`, `FRONT` or `BACK`.\n" + " :type mode: str\n"); static PyObject *pygpu_state_face_culling_set(PyObject * /*self*/, PyObject *value) { PyC_StringEnum pygpu_faceculling = {pygpu_state_faceculling_items}; @@ -377,13 +410,15 @@ static PyObject *pygpu_state_face_culling_set(PyObject * /*self*/, PyObject *val Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_state_front_facing_set_doc, - ".. function:: front_facing_set(invert)\n" - "\n" - " Specifies the orientation of front-facing polygons.\n" - "\n" - " :arg invert: True for clockwise polygons as front-facing.\n" - " :type mode: bool\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_state_front_facing_set_doc, + ".. function:: front_facing_set(invert)\n" + "\n" + " Specifies the orientation of front-facing polygons.\n" + "\n" + " :arg invert: True for clockwise polygons as front-facing.\n" + " :type mode: bool\n"); static PyObject *pygpu_state_front_facing_set(PyObject * /*self*/, PyObject *value) { bool invert; @@ -395,14 +430,16 @@ static PyObject *pygpu_state_front_facing_set(PyObject * /*self*/, PyObject *val Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_state_program_point_size_set_doc, - ".. function:: program_point_size_set(enable)\n" - "\n" - " If enabled, the derived point size is taken from the (potentially clipped) " - "shader builtin gl_PointSize.\n" - "\n" - " :arg enable: True for shader builtin gl_PointSize.\n" - " :type enable: bool\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_state_program_point_size_set_doc, + ".. function:: program_point_size_set(enable)\n" + "\n" + " If enabled, the derived point size is taken from the (potentially clipped) " + "shader builtin gl_PointSize.\n" + "\n" + " :arg enable: True for shader builtin gl_PointSize.\n" + " :type enable: bool\n"); static PyObject *pygpu_state_program_point_size_set(PyObject * /*self*/, PyObject *value) { bool enable; @@ -414,10 +451,12 @@ static PyObject *pygpu_state_program_point_size_set(PyObject * /*self*/, PyObjec Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_state_framebuffer_active_get_doc, - ".. function:: framebuffer_active_get(enable)\n" - "\n" - " Return the active frame-buffer in context.\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_state_framebuffer_active_get_doc, + ".. function:: framebuffer_active_get(enable)\n" + "\n" + " Return the active frame-buffer in context.\n"); static PyObject *pygpu_state_framebuffer_active_get(PyObject * /*self*/) { GPUFrameBuffer *fb = GPU_framebuffer_active_get(); @@ -518,7 +557,10 @@ static PyMethodDef pygpu_state__tp_methods[] = { # pragma GCC diagnostic pop #endif -PyDoc_STRVAR(pygpu_state__tp_doc, "This module provides access to the gpu state."); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_state__tp_doc, + "This module provides access to the gpu state."); static PyModuleDef pygpu_state_module_def = { /*m_base*/ PyModuleDef_HEAD_INIT, /*m_name*/ "gpu.state", diff --git a/source/blender/python/gpu/gpu_py_texture.cc b/source/blender/python/gpu/gpu_py_texture.cc index e017340feb7..98cc85310e0 100644 --- a/source/blender/python/gpu/gpu_py_texture.cc +++ b/source/blender/python/gpu/gpu_py_texture.cc @@ -288,21 +288,36 @@ static PyObject *pygpu_texture__tp_new(PyTypeObject * /*self*/, PyObject *args, return BPyGPUTexture_CreatePyObject(tex, false); } -PyDoc_STRVAR(pygpu_texture_width_doc, "Width of the texture.\n\n:type: `int`"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_texture_width_doc, + "Width of the texture.\n" + "\n" + ":type: `int`"); static PyObject *pygpu_texture_width_get(BPyGPUTexture *self, void * /*type*/) { BPYGPU_TEXTURE_CHECK_OBJ(self); return PyLong_FromLong(GPU_texture_width(self->tex)); } -PyDoc_STRVAR(pygpu_texture_height_doc, "Height of the texture.\n\n:type: `int`"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_texture_height_doc, + "Height of the texture.\n" + "\n" + ":type: `int`"); static PyObject *pygpu_texture_height_get(BPyGPUTexture *self, void * /*type*/) { BPYGPU_TEXTURE_CHECK_OBJ(self); return PyLong_FromLong(GPU_texture_height(self->tex)); } -PyDoc_STRVAR(pygpu_texture_format_doc, "Format of the texture.\n\n:type: `str`"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_texture_format_doc, + "Format of the texture.\n" + "\n" + ":type: `str`"); static PyObject *pygpu_texture_format_get(BPyGPUTexture *self, void * /*type*/) { BPYGPU_TEXTURE_CHECK_OBJ(self); @@ -311,6 +326,7 @@ static PyObject *pygpu_texture_format_get(BPyGPUTexture *self, void * /*type*/) } PyDoc_STRVAR( + /* Wrap. */ pygpu_texture_clear_doc, ".. method:: clear(format='FLOAT', value=(0.0, 0.0, 0.0, 1.0))\n" "\n" @@ -390,11 +406,13 @@ static PyObject *pygpu_texture_clear(BPyGPUTexture *self, PyObject *args, PyObje Py_RETURN_NONE; } -PyDoc_STRVAR(pygpu_texture_read_doc, - ".. method:: read()\n" - "\n" - " Creates a buffer with the value of all pixels.\n" - "\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_texture_read_doc, + ".. method:: read()\n" + "\n" + " Creates a buffer with the value of all pixels.\n" + "\n"); static PyObject *pygpu_texture_read(BPyGPUTexture *self) { BPYGPU_TEXTURE_CHECK_OBJ(self); @@ -448,11 +466,13 @@ static PyObject *pygpu_texture_read(BPyGPUTexture *self) } #ifdef BPYGPU_USE_GPUOBJ_FREE_METHOD -PyDoc_STRVAR(pygpu_texture_free_doc, - ".. method:: free()\n" - "\n" - " Free the texture object.\n" - " The texture object will no longer be accessible.\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_texture_free_doc, + ".. method:: free()\n" + "\n" + " Free the texture object.\n" + " The texture object will no longer be accessible.\n"); static PyObject *pygpu_texture_free(BPyGPUTexture *self) { BPYGPU_TEXTURE_CHECK_OBJ(self); @@ -511,6 +531,7 @@ static PyMethodDef pygpu_texture__tp_methods[] = { #endif PyDoc_STRVAR( + /* Wrap. */ pygpu_texture__tp_doc, ".. class:: GPUTexture(size, layers=0, is_cubemap=False, format='RGBA8', data=None)\n" "\n" @@ -628,18 +649,20 @@ PyTypeObject BPyGPUTexture_Type = { /** \name GPU Texture module * \{ */ -PyDoc_STRVAR(pygpu_texture_from_image_doc, - ".. function:: from_image(image)\n" - "\n" - " Get GPUTexture corresponding to an Image datablock. The GPUTexture memory is " - "shared with Blender.\n" - " Note: Colors read from the texture will be in scene linear color space and have " - "premultiplied or straight alpha matching the image alpha mode.\n" - "\n" - " :arg image: The Image datablock.\n" - " :type image: :class:`bpy.types.Image`\n" - " :return: The GPUTexture used by the image.\n" - " :rtype: :class:`gpu.types.GPUTexture`\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_texture_from_image_doc, + ".. function:: from_image(image)\n" + "\n" + " Get GPUTexture corresponding to an Image datablock. The GPUTexture memory is " + "shared with Blender.\n" + " Note: Colors read from the texture will be in scene linear color space and have " + "premultiplied or straight alpha matching the image alpha mode.\n" + "\n" + " :arg image: The Image datablock.\n" + " :type image: :class:`bpy.types.Image`\n" + " :return: The GPUTexture used by the image.\n" + " :rtype: :class:`gpu.types.GPUTexture`\n"); static PyObject *pygpu_texture_from_image(PyObject * /*self*/, PyObject *arg) { Image *ima = static_cast(PyC_RNA_AsPointer(arg, "Image")); @@ -659,7 +682,10 @@ static PyMethodDef pygpu_texture__m_methods[] = { {nullptr, nullptr, 0, nullptr}, }; -PyDoc_STRVAR(pygpu_texture__m_doc, "This module provides utils for textures."); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_texture__m_doc, + "This module provides utils for textures."); static PyModuleDef pygpu_texture_module_def = { /*m_base*/ PyModuleDef_HEAD_INIT, /*m_name*/ "gpu.texture", diff --git a/source/blender/python/gpu/gpu_py_uniformbuffer.cc b/source/blender/python/gpu/gpu_py_uniformbuffer.cc index 5f9f06bbaee..e683be6778b 100644 --- a/source/blender/python/gpu/gpu_py_uniformbuffer.cc +++ b/source/blender/python/gpu/gpu_py_uniformbuffer.cc @@ -105,10 +105,12 @@ static PyObject *pygpu_uniformbuffer__tp_new(PyTypeObject * /*self*/, return BPyGPUUniformBuf_CreatePyObject(ubo); } -PyDoc_STRVAR(pygpu_uniformbuffer_update_doc, - ".. method:: update(data)\n" - "\n" - " Update the data of the uniform buffer object.\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_uniformbuffer_update_doc, + ".. method:: update(data)\n" + "\n" + " Update the data of the uniform buffer object.\n"); static PyObject *pygpu_uniformbuffer_update(BPyGPUUniformBuf *self, PyObject *obj) { BPYGPU_UNIFORMBUF_CHECK_OBJ(self); @@ -125,11 +127,13 @@ static PyObject *pygpu_uniformbuffer_update(BPyGPUUniformBuf *self, PyObject *ob } #ifdef BPYGPU_USE_GPUOBJ_FREE_METHOD -PyDoc_STRVAR(pygpu_uniformbuffer_free_doc, - ".. method::free()\n" - "\n" - " Free the uniform buffer object.\n" - " The uniform buffer object will no longer be accessible.\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_uniformbuffer_free_doc, + ".. method::free()\n" + "\n" + " Free the uniform buffer object.\n" + " The uniform buffer object will no longer be accessible.\n"); static PyObject *pygpu_uniformbuffer_free(BPyGPUUniformBuf *self) { BPYGPU_UNIFORMBUF_CHECK_OBJ(self); @@ -160,13 +164,15 @@ static PyMethodDef pygpu_uniformbuffer__tp_methods[] = { {nullptr, nullptr, 0, nullptr}, }; -PyDoc_STRVAR(pygpu_uniformbuffer__tp_doc, - ".. class:: GPUUniformBuf(data)\n" - "\n" - " This object gives access to off uniform buffers.\n" - "\n" - " :arg data: Data to fill the buffer.\n" - " :type data: object exposing buffer interface\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_uniformbuffer__tp_doc, + ".. class:: GPUUniformBuf(data)\n" + "\n" + " This object gives access to off uniform buffers.\n" + "\n" + " :arg data: Data to fill the buffer.\n" + " :type data: object exposing buffer interface\n"); PyTypeObject BPyGPUUniformBuf_Type = { /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0) /*tp_name*/ "GPUUniformBuf", diff --git a/source/blender/python/gpu/gpu_py_vertex_buffer.cc b/source/blender/python/gpu/gpu_py_vertex_buffer.cc index 49dad12df7c..e3b8f8c4126 100644 --- a/source/blender/python/gpu/gpu_py_vertex_buffer.cc +++ b/source/blender/python/gpu/gpu_py_vertex_buffer.cc @@ -259,15 +259,17 @@ static PyObject *pygpu_vertbuf__tp_new(PyTypeObject * /*type*/, PyObject *args, return BPyGPUVertBuf_CreatePyObject(vbo); } -PyDoc_STRVAR(pygpu_vertbuf_attr_fill_doc, - ".. method:: attr_fill(id, data)\n" - "\n" - " Insert data into the buffer for a single attribute.\n" - "\n" - " :arg id: Either the name or the id of the attribute.\n" - " :type id: int or str\n" - " :arg data: Sequence of data that should be stored in the buffer\n" - " :type data: sequence of floats, ints, vectors or matrices\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_vertbuf_attr_fill_doc, + ".. method:: attr_fill(id, data)\n" + "\n" + " Insert data into the buffer for a single attribute.\n" + "\n" + " :arg id: Either the name or the id of the attribute.\n" + " :type id: int or str\n" + " :arg data: Sequence of data that should be stored in the buffer\n" + " :type data: sequence of floats, ints, vectors or matrices\n"); static PyObject *pygpu_vertbuf_attr_fill(BPyGPUVertBuf *self, PyObject *args, PyObject *kwds) { PyObject *data; @@ -335,15 +337,17 @@ static void pygpu_vertbuf__tp_dealloc(BPyGPUVertBuf *self) Py_TYPE(self)->tp_free(self); } -PyDoc_STRVAR(pygpu_vertbuf__tp_doc, - ".. class:: GPUVertBuf(format, len)\n" - "\n" - " Contains a VBO.\n" - "\n" - " :arg format: Vertex format.\n" - " :type format: :class:`gpu.types.GPUVertFormat`\n" - " :arg len: Amount of vertices that will fit into this buffer.\n" - " :type len: int\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_vertbuf__tp_doc, + ".. class:: GPUVertBuf(format, len)\n" + "\n" + " Contains a VBO.\n" + "\n" + " :arg format: Vertex format.\n" + " :type format: :class:`gpu.types.GPUVertFormat`\n" + " :arg len: Amount of vertices that will fit into this buffer.\n" + " :type len: int\n"); PyTypeObject BPyGPUVertBuf_Type = { /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0) /*tp_name*/ "GPUVertBuf", diff --git a/source/blender/python/gpu/gpu_py_vertex_format.cc b/source/blender/python/gpu/gpu_py_vertex_format.cc index 6b2a327f896..53d6b27e4de 100644 --- a/source/blender/python/gpu/gpu_py_vertex_format.cc +++ b/source/blender/python/gpu/gpu_py_vertex_format.cc @@ -59,6 +59,7 @@ static PyObject *pygpu_vertformat__tp_new(PyTypeObject * /*type*/, PyObject *arg } PyDoc_STRVAR( + /* Wrap. */ pygpu_vertformat_attr_add_doc, ".. method:: attr_add(id, comp_type, len, fetch_mode)\n" "\n" @@ -145,10 +146,12 @@ static void pygpu_vertformat__tp_dealloc(BPyGPUVertFormat *self) Py_TYPE(self)->tp_free(self); } -PyDoc_STRVAR(pygpu_vertformat__tp_doc, - ".. class:: GPUVertFormat()\n" - "\n" - " This object contains information about the structure of a vertex buffer.\n"); +PyDoc_STRVAR( + /* Wrap. */ + pygpu_vertformat__tp_doc, + ".. class:: GPUVertFormat()\n" + "\n" + " This object contains information about the structure of a vertex buffer.\n"); PyTypeObject BPyGPUVertFormat_Type = { /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0) /*tp_name*/ "GPUVertFormat", diff --git a/source/blender/python/intern/bpy.cc b/source/blender/python/intern/bpy.cc index 650f6d5c55d..824c515aba1 100644 --- a/source/blender/python/intern/bpy.cc +++ b/source/blender/python/intern/bpy.cc @@ -63,13 +63,15 @@ PyObject *bpy_package_py = nullptr; -PyDoc_STRVAR(bpy_script_paths_doc, - ".. function:: script_paths()\n" - "\n" - " Return 2 paths to blender scripts directories.\n" - "\n" - " :return: (system, user) strings will be empty when not found.\n" - " :rtype: tuple of strings\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_script_paths_doc, + ".. function:: script_paths()\n" + "\n" + " Return 2 paths to blender scripts directories.\n" + "\n" + " :return: (system, user) strings will be empty when not found.\n" + " :rtype: tuple of strings\n"); static PyObject *bpy_script_paths(PyObject * /*self*/) { PyObject *ret = PyTuple_New(2); @@ -97,19 +99,21 @@ static bool bpy_blend_foreach_path_cb(BPathForeachPathData *bpath_data, return false; /* Never edits the path. */ } -PyDoc_STRVAR(bpy_blend_paths_doc, - ".. function:: blend_paths(absolute=False, packed=False, local=False)\n" - "\n" - " Returns a list of paths to external files referenced by the loaded .blend file.\n" - "\n" - " :arg absolute: When true the paths returned are made absolute.\n" - " :type absolute: boolean\n" - " :arg packed: When true skip file paths for packed data.\n" - " :type packed: boolean\n" - " :arg local: When true skip linked library paths.\n" - " :type local: boolean\n" - " :return: path list.\n" - " :rtype: list of strings\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_blend_paths_doc, + ".. function:: blend_paths(absolute=False, packed=False, local=False)\n" + "\n" + " Returns a list of paths to external files referenced by the loaded .blend file.\n" + "\n" + " :arg absolute: When true the paths returned are made absolute.\n" + " :type absolute: boolean\n" + " :arg packed: When true skip file paths for packed data.\n" + " :type packed: boolean\n" + " :arg local: When true skip linked library paths.\n" + " :type local: boolean\n" + " :return: path list.\n" + " :rtype: list of strings\n"); static PyObject *bpy_blend_paths(PyObject * /*self*/, PyObject *args, PyObject *kw) { eBPathForeachFlag flag = eBPathForeachFlag(0); @@ -165,18 +169,20 @@ static PyObject *bpy_blend_paths(PyObject * /*self*/, PyObject *args, PyObject * return list; } -PyDoc_STRVAR(bpy_flip_name_doc, - ".. function:: flip_name(name, strip_digits=False)\n" - "\n" - " Flip a name between left/right sides, useful for \n" - " mirroring bone names.\n" - "\n" - " :arg name: Bone name to flip.\n" - " :type name: string\n" - " :arg strip_digits: Whether to remove ``.###`` suffix.\n" - " :type strip_digits: bool\n" - " :return: The flipped name.\n" - " :rtype: string\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_flip_name_doc, + ".. function:: flip_name(name, strip_digits=False)\n" + "\n" + " Flip a name between left/right sides, useful for \n" + " mirroring bone names.\n" + "\n" + " :arg name: Bone name to flip.\n" + " :type name: string\n" + " :arg strip_digits: Whether to remove ``.###`` suffix.\n" + " :type strip_digits: bool\n" + " :return: The flipped name.\n" + " :rtype: string\n"); static PyObject *bpy_flip_name(PyObject * /*self*/, PyObject *args, PyObject *kw) { const char *name_src = nullptr; @@ -212,7 +218,7 @@ static PyObject *bpy_flip_name(PyObject * /*self*/, PyObject *args, PyObject *kw return result; } -// PyDoc_STRVAR(bpy_user_resource_doc[] = /* now in bpy/utils.py */ +/* `bpy_user_resource_doc`, Now in `bpy/utils.py`. */ static PyObject *bpy_user_resource(PyObject * /*self*/, PyObject *args, PyObject *kw) { const PyC_StringEnumItems type_items[] = { @@ -255,15 +261,17 @@ static PyObject *bpy_user_resource(PyObject * /*self*/, PyObject *args, PyObject return PyC_UnicodeFromBytes(path.has_value() ? path->c_str() : ""); } -PyDoc_STRVAR(bpy_system_resource_doc, - ".. function:: system_resource(type, path=\"\")\n" - "\n" - " Return a system resource path.\n" - "\n" - " :arg type: string in ['DATAFILES', 'SCRIPTS', 'PYTHON'].\n" - " :type type: string\n" - " :arg path: Optional subdirectory.\n" - " :type path: string or bytes\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_system_resource_doc, + ".. function:: system_resource(type, path=\"\")\n" + "\n" + " Return a system resource path.\n" + "\n" + " :arg type: string in ['DATAFILES', 'SCRIPTS', 'PYTHON'].\n" + " :type type: string\n" + " :arg path: Optional subdirectory.\n" + " :type path: string or bytes\n"); static PyObject *bpy_system_resource(PyObject * /*self*/, PyObject *args, PyObject *kw) { const PyC_StringEnumItems type_items[] = { @@ -304,6 +312,7 @@ static PyObject *bpy_system_resource(PyObject * /*self*/, PyObject *args, PyObje } PyDoc_STRVAR( + /* Wrap. */ bpy_resource_path_doc, ".. function:: resource_path(type, major=bpy.app.version[0], minor=bpy.app.version[1])\n" "\n" @@ -353,19 +362,21 @@ static PyObject *bpy_resource_path(PyObject * /*self*/, PyObject *args, PyObject } /* This is only exposed for tests, see: `tests/python/bl_pyapi_bpy_driver_secure_eval.py`. */ -PyDoc_STRVAR(bpy_driver_secure_code_test_doc, - ".. function:: _driver_secure_code_test(code)\n" - "\n" - " Test if the script should be considered trusted.\n" - "\n" - " :arg code: The code to test.\n" - " :type code: code\n" - " :arg namespace: The namespace of values which are allowed.\n" - " :type namespace: dict\n" - " :arg verbose: Print the reason for considering insecure to the ``stderr``.\n" - " :type verbose: bool\n" - " :return: True when the script is considered trusted.\n" - " :rtype: bool\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_driver_secure_code_test_doc, + ".. function:: _driver_secure_code_test(code)\n" + "\n" + " Test if the script should be considered trusted.\n" + "\n" + " :arg code: The code to test.\n" + " :type code: code\n" + " :arg namespace: The namespace of values which are allowed.\n" + " :type namespace: dict\n" + " :arg verbose: Print the reason for considering insecure to the ``stderr``.\n" + " :type verbose: bool\n" + " :return: True when the script is considered trusted.\n" + " :rtype: bool\n"); static PyObject *bpy_driver_secure_code_test(PyObject * /*self*/, PyObject *args, PyObject *kw) { PyObject *py_code; @@ -397,15 +408,17 @@ static PyObject *bpy_driver_secure_code_test(PyObject * /*self*/, PyObject *args return PyBool_FromLong(BPY_driver_secure_bytecode_test(py_code, py_namespace, verbose)); } -PyDoc_STRVAR(bpy_escape_identifier_doc, - ".. function:: escape_identifier(string)\n" - "\n" - " Simple string escaping function used for animation paths.\n" - "\n" - " :arg string: text\n" - " :type string: string\n" - " :return: The escaped string.\n" - " :rtype: string\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_escape_identifier_doc, + ".. function:: escape_identifier(string)\n" + "\n" + " Simple string escaping function used for animation paths.\n" + "\n" + " :arg string: text\n" + " :type string: string\n" + " :return: The escaped string.\n" + " :rtype: string\n"); static PyObject *bpy_escape_identifier(PyObject * /*self*/, PyObject *value) { Py_ssize_t value_str_len; @@ -434,16 +447,18 @@ static PyObject *bpy_escape_identifier(PyObject * /*self*/, PyObject *value) return value_escape; } -PyDoc_STRVAR(bpy_unescape_identifier_doc, - ".. function:: unescape_identifier(string)\n" - "\n" - " Simple string un-escape function used for animation paths.\n" - " This performs the reverse of `escape_identifier`.\n" - "\n" - " :arg string: text\n" - " :type string: string\n" - " :return: The un-escaped string.\n" - " :rtype: string\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_unescape_identifier_doc, + ".. function:: unescape_identifier(string)\n" + "\n" + " Simple string un-escape function used for animation paths.\n" + " This performs the reverse of `escape_identifier`.\n" + "\n" + " :arg string: text\n" + " :type string: string\n" + " :return: The un-escaped string.\n" + " :rtype: string\n"); static PyObject *bpy_unescape_identifier(PyObject * /*self*/, PyObject *value) { Py_ssize_t value_str_len; @@ -486,6 +501,7 @@ extern "C" const char *view3d_context_dir[]; * \note only exposed for generating documentation, see: `doc/python_api/sphinx_doc_gen.py`. */ PyDoc_STRVAR( + /* Wrap. */ bpy_context_members_doc, ".. function:: context_members()\n" "\n" @@ -532,12 +548,14 @@ static PyObject *bpy_context_members(PyObject * /*self*/) /** * \note only exposed for generating documentation, see: `doc/python_api/sphinx_doc_gen.py`. */ -PyDoc_STRVAR(bpy_rna_enum_items_static_doc, - ".. function:: rna_enum_items_static()\n" - "\n" - " :return: A dict where the key the name of the enum, the value is a tuple of " - ":class:`bpy.types.EnumPropertyItem`.\n" - " :rtype: dict of \n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_rna_enum_items_static_doc, + ".. function:: rna_enum_items_static()\n" + "\n" + " :return: A dict where the key the name of the enum, the value is a tuple of " + ":class:`bpy.types.EnumPropertyItem`.\n" + " :rtype: dict of \n"); static PyObject *bpy_rna_enum_items_static(PyObject * /*self*/) { #define DEF_ENUM(id) {STRINGIFY(id), id}, @@ -565,11 +583,13 @@ static PyObject *bpy_rna_enum_items_static(PyObject * /*self*/) } /* This is only exposed for (Unix/Linux), see: #GHOST_ISystem::getSystemBackend for details. */ -PyDoc_STRVAR(bpy_ghost_backend_doc, - ".. function:: _ghost_backend()\n" - "\n" - " :return: An identifier for the GHOST back-end.\n" - " :rtype: string\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_ghost_backend_doc, + ".. function:: _ghost_backend()\n" + "\n" + " :return: An identifier for the GHOST back-end.\n" + " :rtype: string\n"); static PyObject *bpy_ghost_backend(PyObject * /*self*/) { return PyUnicode_FromString(WM_ghost_backend()); diff --git a/source/blender/python/intern/bpy_app.cc b/source/blender/python/intern/bpy_app.cc index 6ebb94b5891..14c6178bd48 100644 --- a/source/blender/python/intern/bpy_app.cc +++ b/source/blender/python/intern/bpy_app.cc @@ -123,8 +123,10 @@ static PyStructSequence_Field app_info_fields[] = { {nullptr}, }; -PyDoc_STRVAR(bpy_app_doc, - "This module contains application values that remain unchanged during runtime."); +PyDoc_STRVAR( + /* Wrap. */ + bpy_app_doc, + "This module contains application values that remain unchanged during runtime."); static PyStructSequence_Desc app_info_desc = { "bpy.app", /* name */ @@ -220,9 +222,11 @@ static PyObject *make_app_info() /* a few getsets because it makes sense for them to be in bpy.app even though * they are not static */ -PyDoc_STRVAR(bpy_app_debug_doc, - "Boolean, for debug info " - "(started with ``--debug`` / ``--debug-*`` matching this attribute name)"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_app_debug_doc, + "Boolean, for debug info " + "(started with ``--debug`` / ``--debug-*`` matching this attribute name)"); static PyObject *bpy_app_debug_get(PyObject * /*self*/, void *closure) { const int flag = POINTER_AS_INT(closure); @@ -249,9 +253,11 @@ static int bpy_app_debug_set(PyObject * /*self*/, PyObject *value, void *closure return 0; } -PyDoc_STRVAR(bpy_app_global_flag_doc, - "Boolean, for application behavior " - "(started with ``--enable-*`` matching this attribute name)"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_app_global_flag_doc, + "Boolean, for application behavior " + "(started with ``--enable-*`` matching this attribute name)"); static PyObject *bpy_app_global_flag_get(PyObject * /*self*/, void *closure) { const int flag = POINTER_AS_INT(closure); @@ -290,8 +296,10 @@ static int bpy_app_global_flag_set__only_disable(PyObject * /*self*/, return bpy_app_global_flag_set(nullptr, value, closure); } -PyDoc_STRVAR(bpy_app_debug_value_doc, - "Short, number which can be set to non-zero values for testing purposes"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_app_debug_value_doc, + "Short, number which can be set to non-zero values for testing purposes"); static PyObject *bpy_app_debug_value_get(PyObject * /*self*/, void * /*closure*/) { return PyLong_FromLong(G.debug_value); @@ -314,13 +322,17 @@ static int bpy_app_debug_value_set(PyObject * /*self*/, PyObject *value, void * return 0; } -PyDoc_STRVAR(bpy_app_tempdir_doc, "String, the temp directory used by blender (read-only)"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_app_tempdir_doc, + "String, the temp directory used by blender (read-only)"); static PyObject *bpy_app_tempdir_get(PyObject * /*self*/, void * /*closure*/) { return PyC_UnicodeFromBytes(BKE_tempdir_session()); } PyDoc_STRVAR( + /* Wrap. */ bpy_app_driver_dict_doc, "Dictionary for drivers namespace, editable in-place, reset on file load (read-only)"); static PyObject *bpy_app_driver_dict_get(PyObject * /*self*/, void * /*closure*/) @@ -335,8 +347,10 @@ static PyObject *bpy_app_driver_dict_get(PyObject * /*self*/, void * /*closure*/ return Py_INCREF_RET(bpy_pydriver_Dict); } -PyDoc_STRVAR(bpy_app_preview_render_size_doc, - "Reference size for icon/preview renders (read-only)"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_app_preview_render_size_doc, + "Reference size for icon/preview renders (read-only)"); static PyObject *bpy_app_preview_render_size_get(PyObject * /*self*/, void *closure) { return PyLong_FromLong( @@ -348,10 +362,12 @@ static PyObject *bpy_app_autoexec_fail_message_get(PyObject * /*self*/, void * / return PyC_UnicodeFromBytes(G.autoexec_fail); } -PyDoc_STRVAR(bpy_app_binary_path_doc, - "The location of Blender's executable, useful for utilities that open new instances. " - "Read-only unless Blender is built as a Python module - in this case the value is " - "an empty string which script authors may point to a Blender binary."); +PyDoc_STRVAR( + /* Wrap. */ + bpy_app_binary_path_doc, + "The location of Blender's executable, useful for utilities that open new instances. " + "Read-only unless Blender is built as a Python module - in this case the value is " + "an empty string which script authors may point to a Blender binary."); static PyObject *bpy_app_binary_path_get(PyObject * /*self*/, void * /*closure*/) { return PyC_UnicodeFromBytes(BKE_appdir_program_path()); @@ -495,15 +511,17 @@ static PyGetSetDef bpy_app_getsets[] = { {nullptr, nullptr, nullptr, nullptr, nullptr}, }; -PyDoc_STRVAR(bpy_app_is_job_running_doc, - ".. staticmethod:: is_job_running(job_type)\n" - "\n" - " Check whether a job of the given type is running.\n" - "\n" - " :arg job_type: job type in :ref:`rna_enum_wm_job_type_items`.\n" - " :type job_type: str\n" - " :return: Whether a job of the given type is currently running.\n" - " :rtype: bool.\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_app_is_job_running_doc, + ".. staticmethod:: is_job_running(job_type)\n" + "\n" + " Check whether a job of the given type is running.\n" + "\n" + " :arg job_type: job type in :ref:`rna_enum_wm_job_type_items`.\n" + " :type job_type: str\n" + " :return: Whether a job of the given type is currently running.\n" + " :rtype: bool.\n"); static PyObject *bpy_app_is_job_running(PyObject * /*self*/, PyObject *args, PyObject *kwds) { BPy_EnumProperty_Parse job_type_enum{}; @@ -529,14 +547,16 @@ static PyObject *bpy_app_is_job_running(PyObject * /*self*/, PyObject *args, PyO char *(*BPY_python_app_help_text_fn)(bool all) = nullptr; -PyDoc_STRVAR(bpy_app_help_text_doc, - ".. staticmethod:: help_text(all=False)\n" - "\n" - " Return the help text as a string.\n" - "\n" - " :arg all: Return all arguments, " - "even those which aren't available for the current platform.\n" - " :type all: bool\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_app_help_text_doc, + ".. staticmethod:: help_text(all=False)\n" + "\n" + " Return the help text as a string.\n" + "\n" + " :arg all: Return all arguments, " + "even those which aren't available for the current platform.\n" + " :type all: bool\n"); static PyObject *bpy_app_help_text(PyObject * /*self*/, PyObject *args, PyObject *kwds) { bool all = false; diff --git a/source/blender/python/intern/bpy_app_icons.cc b/source/blender/python/intern/bpy_app_icons.cc index d7d4b6db2a6..0cec7308755 100644 --- a/source/blender/python/intern/bpy_app_icons.cc +++ b/source/blender/python/intern/bpy_app_icons.cc @@ -23,6 +23,7 @@ /* We may want to load direct from file. */ PyDoc_STRVAR( + /* Wrap. */ bpy_app_icons_new_triangles_doc, ".. function:: new_triangles(range, coords, colors)\n" "\n" @@ -88,15 +89,17 @@ static PyObject *bpy_app_icons_new_triangles(PyObject * /*self*/, PyObject *args return PyLong_FromLong(icon_id); } -PyDoc_STRVAR(bpy_app_icons_new_triangles_from_file_doc, - ".. function:: new_triangles_from_file(filepath)\n" - "\n" - " Create a new icon from triangle geometry.\n" - "\n" - " :arg filepath: File path.\n" - " :type filepath: string or bytes.\n" - " :return: Unique icon value (pass to interface ``icon_value`` argument).\n" - " :rtype: int\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_app_icons_new_triangles_from_file_doc, + ".. function:: new_triangles_from_file(filepath)\n" + "\n" + " Create a new icon from triangle geometry.\n" + "\n" + " :arg filepath: File path.\n" + " :type filepath: string or bytes.\n" + " :return: Unique icon value (pass to interface ``icon_value`` argument).\n" + " :rtype: int\n"); static PyObject *bpy_app_icons_new_triangles_from_file(PyObject * /*self*/, PyObject *args, PyObject *kw) @@ -128,10 +131,12 @@ static PyObject *bpy_app_icons_new_triangles_from_file(PyObject * /*self*/, return PyLong_FromLong(icon_id); } -PyDoc_STRVAR(bpy_app_icons_release_doc, - ".. function:: release(icon_id)\n" - "\n" - " Release the icon.\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_app_icons_release_doc, + ".. function:: release(icon_id)\n" + "\n" + " Release the icon.\n"); static PyObject *bpy_app_icons_release(PyObject * /*self*/, PyObject *args, PyObject *kw) { int icon_id; diff --git a/source/blender/python/intern/bpy_app_timers.cc b/source/blender/python/intern/bpy_app_timers.cc index b1fa37bff13..094b563902b 100644 --- a/source/blender/python/intern/bpy_app_timers.cc +++ b/source/blender/python/intern/bpy_app_timers.cc @@ -75,6 +75,7 @@ static void py_timer_free(uintptr_t /*uuid*/, void *user_data) } PyDoc_STRVAR( + /* Wrap. */ bpy_app_timers_register_doc, ".. function:: register(function, first_interval=0, persistent=False)\n" "\n" @@ -124,13 +125,15 @@ static PyObject *bpy_app_timers_register(PyObject * /*self*/, PyObject *args, Py Py_RETURN_NONE; } -PyDoc_STRVAR(bpy_app_timers_unregister_doc, - ".. function:: unregister(function)\n" - "\n" - " Unregister timer.\n" - "\n" - " :arg function: Function to unregister.\n" - " :type function: function\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_app_timers_unregister_doc, + ".. function:: unregister(function)\n" + "\n" + " Unregister timer.\n" + "\n" + " :arg function: Function to unregister.\n" + " :type function: function\n"); static PyObject *bpy_app_timers_unregister(PyObject * /*self*/, PyObject *function) { if (!BLI_timer_unregister(intptr_t(function))) { @@ -140,15 +143,17 @@ static PyObject *bpy_app_timers_unregister(PyObject * /*self*/, PyObject *functi Py_RETURN_NONE; } -PyDoc_STRVAR(bpy_app_timers_is_registered_doc, - ".. function:: is_registered(function)\n" - "\n" - " Check if this function is registered as a timer.\n" - "\n" - " :arg function: Function to check.\n" - " :type function: int\n" - " :return: True when this function is registered, otherwise False.\n" - " :rtype: bool\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_app_timers_is_registered_doc, + ".. function:: is_registered(function)\n" + "\n" + " Check if this function is registered as a timer.\n" + "\n" + " :arg function: Function to check.\n" + " :type function: int\n" + " :return: True when this function is registered, otherwise False.\n" + " :rtype: bool\n"); static PyObject *bpy_app_timers_is_registered(PyObject * /*self*/, PyObject *function) { const bool ret = BLI_timer_is_registered(intptr_t(function)); diff --git a/source/blender/python/intern/bpy_app_translations.cc b/source/blender/python/intern/bpy_app_translations.cc index 5ba843ff8df..b51746b295f 100644 --- a/source/blender/python/intern/bpy_app_translations.cc +++ b/source/blender/python/intern/bpy_app_translations.cc @@ -297,20 +297,22 @@ const char *BPY_app_translations_py_pgettext(const char *msgctxt, const char *ms #endif /* WITH_INTERNATIONAL */ -PyDoc_STRVAR(app_translations_py_messages_register_doc, - ".. method:: register(module_name, translations_dict)\n" - "\n" - " Registers an addon's UI translations.\n" - "\n" - " .. note::\n" - " Does nothing when Blender is built without internationalization support.\n" - "\n" - " :arg module_name: The name identifying the addon.\n" - " :type module_name: string\n" - " :arg translations_dict: A dictionary built like that:\n" - " ``{locale: {msg_key: msg_translation, ...}, ...}``\n" - " :type translations_dict: dict\n" - "\n"); +PyDoc_STRVAR( + /* Wrap. */ + app_translations_py_messages_register_doc, + ".. method:: register(module_name, translations_dict)\n" + "\n" + " Registers an addon's UI translations.\n" + "\n" + " .. note::\n" + " Does nothing when Blender is built without internationalization support.\n" + "\n" + " :arg module_name: The name identifying the addon.\n" + " :type module_name: string\n" + " :arg translations_dict: A dictionary built like that:\n" + " ``{locale: {msg_key: msg_translation, ...}, ...}``\n" + " :type translations_dict: dict\n" + "\n"); static PyObject *app_translations_py_messages_register(BlenderAppTranslations *self, PyObject *args, PyObject *kw) @@ -354,17 +356,19 @@ static PyObject *app_translations_py_messages_register(BlenderAppTranslations *s Py_RETURN_NONE; } -PyDoc_STRVAR(app_translations_py_messages_unregister_doc, - ".. method:: unregister(module_name)\n" - "\n" - " Unregisters an addon's UI translations.\n" - "\n" - " .. note::\n" - " Does nothing when Blender is built without internationalization support.\n" - "\n" - " :arg module_name: The name identifying the addon.\n" - " :type module_name: string\n" - "\n"); +PyDoc_STRVAR( + /* Wrap. */ + app_translations_py_messages_unregister_doc, + ".. method:: unregister(module_name)\n" + "\n" + " Unregisters an addon's UI translations.\n" + "\n" + " .. note::\n" + " Does nothing when Blender is built without internationalization support.\n" + "\n" + " :arg module_name: The name identifying the addon.\n" + " :type module_name: string\n" + "\n"); static PyObject *app_translations_py_messages_unregister(BlenderAppTranslations *self, PyObject *args, PyObject *kw) @@ -460,16 +464,20 @@ static PyObject *app_translations_contexts_make() /** \name Main #BlenderAppTranslations #PyObject Definition * \{ */ -PyDoc_STRVAR(app_translations_contexts_doc, - "A named tuple containing all predefined translation contexts.\n" - "\n" - ".. warning::\n" - " Never use a (new) context starting with \"" BLT_I18NCONTEXT_DEFAULT_BPYRNA - "\", it would be internally\n" - " assimilated as the default one!\n"); +PyDoc_STRVAR( + /* Wrap. */ + app_translations_contexts_doc, + "A named tuple containing all predefined translation contexts.\n" + "\n" + ".. warning::\n" + " Never use a (new) context starting with \"" BLT_I18NCONTEXT_DEFAULT_BPYRNA + "\", it would be internally\n" + " assimilated as the default one!\n"); -PyDoc_STRVAR(app_translations_contexts_C_to_py_doc, - "A readonly dict mapping contexts' C-identifiers to their py-identifiers."); +PyDoc_STRVAR( + /* Wrap. */ + app_translations_contexts_C_to_py_doc, + "A readonly dict mapping contexts' C-identifiers to their py-identifiers."); static PyMemberDef app_translations_members[] = { {"contexts", @@ -485,18 +493,22 @@ static PyMemberDef app_translations_members[] = { {nullptr}, }; -PyDoc_STRVAR(app_translations_locale_doc, - "The actual locale currently in use (will always return a void string when Blender " - "is built without " - "internationalization support)."); +PyDoc_STRVAR( + /* Wrap. */ + app_translations_locale_doc, + "The actual locale currently in use (will always return a void string when Blender " + "is built without " + "internationalization support)."); static PyObject *app_translations_locale_get(PyObject * /*self*/, void * /*userdata*/) { return PyUnicode_FromString(BLT_lang_get()); } /* NOTE: defining as getter, as (even if quite unlikely), this *may* change during runtime... */ -PyDoc_STRVAR(app_translations_locales_doc, - "All locales currently known by Blender (i.e. available as translations)."); +PyDoc_STRVAR( + /* Wrap. */ + app_translations_locales_doc, + "All locales currently known by Blender (i.e. available as translations)."); static PyObject *app_translations_locales_get(PyObject * /*self*/, void * /*userdata*/) { PyObject *ret; @@ -568,6 +580,7 @@ static PyObject *_py_pgettext(PyObject *args, } PyDoc_STRVAR( + /* Wrap. */ app_translations_pgettext_doc, ".. method:: pgettext(msgid, msgctxt=None)\n" "\n" @@ -602,21 +615,23 @@ static PyObject *app_translations_pgettext(BlenderAppTranslations * /*self*/, return _py_pgettext(args, kw, BLT_pgettext); } -PyDoc_STRVAR(app_translations_pgettext_iface_doc, - ".. method:: pgettext_iface(msgid, msgctxt=None)\n" - "\n" - " Try to translate the given msgid (with optional msgctxt), if labels' translation " - "is enabled.\n" - "\n" - " .. note::\n" - " See :func:`pgettext` notes.\n" - "\n" - " :arg msgid: The string to translate.\n" - " :type msgid: string\n" - " :arg msgctxt: The translation context (defaults to BLT_I18NCONTEXT_DEFAULT).\n" - " :type msgctxt: string or None\n" - " :return: The translated string (or msgid if no translation was found).\n" - "\n"); +PyDoc_STRVAR( + /* Wrap. */ + app_translations_pgettext_iface_doc, + ".. method:: pgettext_iface(msgid, msgctxt=None)\n" + "\n" + " Try to translate the given msgid (with optional msgctxt), if labels' translation " + "is enabled.\n" + "\n" + " .. note::\n" + " See :func:`pgettext` notes.\n" + "\n" + " :arg msgid: The string to translate.\n" + " :type msgid: string\n" + " :arg msgctxt: The translation context (defaults to BLT_I18NCONTEXT_DEFAULT).\n" + " :type msgctxt: string or None\n" + " :return: The translated string (or msgid if no translation was found).\n" + "\n"); static PyObject *app_translations_pgettext_iface(BlenderAppTranslations * /*self*/, PyObject *args, PyObject *kw) @@ -624,21 +639,23 @@ static PyObject *app_translations_pgettext_iface(BlenderAppTranslations * /*self return _py_pgettext(args, kw, BLT_translate_do_iface); } -PyDoc_STRVAR(app_translations_pgettext_tip_doc, - ".. method:: pgettext_tip(msgid, msgctxt=None)\n" - "\n" - " Try to translate the given msgid (with optional msgctxt), if tooltips' " - "translation is enabled.\n" - "\n" - " .. note::\n" - " See :func:`pgettext` notes.\n" - "\n" - " :arg msgid: The string to translate.\n" - " :type msgid: string\n" - " :arg msgctxt: The translation context (defaults to BLT_I18NCONTEXT_DEFAULT).\n" - " :type msgctxt: string or None\n" - " :return: The translated string (or msgid if no translation was found).\n" - "\n"); +PyDoc_STRVAR( + /* Wrap. */ + app_translations_pgettext_tip_doc, + ".. method:: pgettext_tip(msgid, msgctxt=None)\n" + "\n" + " Try to translate the given msgid (with optional msgctxt), if tooltips' " + "translation is enabled.\n" + "\n" + " .. note::\n" + " See :func:`pgettext` notes.\n" + "\n" + " :arg msgid: The string to translate.\n" + " :type msgid: string\n" + " :arg msgctxt: The translation context (defaults to BLT_I18NCONTEXT_DEFAULT).\n" + " :type msgctxt: string or None\n" + " :return: The translated string (or msgid if no translation was found).\n" + "\n"); static PyObject *app_translations_pgettext_tip(BlenderAppTranslations * /*self*/, PyObject *args, PyObject *kw) @@ -647,6 +664,7 @@ static PyObject *app_translations_pgettext_tip(BlenderAppTranslations * /*self*/ } PyDoc_STRVAR( + /* Wrap. */ app_translations_pgettext_rpt_doc, ".. method:: pgettext_rpt(msgid, msgctxt=None)\n" "\n" @@ -669,21 +687,23 @@ static PyObject *app_translations_pgettext_rpt(BlenderAppTranslations * /*self*/ return _py_pgettext(args, kw, BLT_translate_do_report); } -PyDoc_STRVAR(app_translations_pgettext_data_doc, - ".. method:: pgettext_data(msgid, msgctxt=None)\n" - "\n" - " Try to translate the given msgid (with optional msgctxt), if new data name's " - "translation is enabled.\n" - "\n" - " .. note::\n" - " See :func:`pgettext` notes.\n" - "\n" - " :arg msgid: The string to translate.\n" - " :type msgid: string\n" - " :arg msgctxt: The translation context (defaults to BLT_I18NCONTEXT_DEFAULT).\n" - " :type msgctxt: string or None\n" - " :return: The translated string (or ``msgid`` if no translation was found).\n" - "\n"); +PyDoc_STRVAR( + /* Wrap. */ + app_translations_pgettext_data_doc, + ".. method:: pgettext_data(msgid, msgctxt=None)\n" + "\n" + " Try to translate the given msgid (with optional msgctxt), if new data name's " + "translation is enabled.\n" + "\n" + " .. note::\n" + " See :func:`pgettext` notes.\n" + "\n" + " :arg msgid: The string to translate.\n" + " :type msgid: string\n" + " :arg msgctxt: The translation context (defaults to BLT_I18NCONTEXT_DEFAULT).\n" + " :type msgctxt: string or None\n" + " :return: The translated string (or ``msgid`` if no translation was found).\n" + "\n"); static PyObject *app_translations_pgettext_data(BlenderAppTranslations * /*self*/, PyObject *args, PyObject *kw) @@ -692,6 +712,7 @@ static PyObject *app_translations_pgettext_data(BlenderAppTranslations * /*self* } PyDoc_STRVAR( + /* Wrap. */ app_translations_locale_explode_doc, ".. method:: locale_explode(locale)\n" "\n" @@ -818,11 +839,13 @@ static void app_translations_free(void *obj) #endif } -PyDoc_STRVAR(app_translations_doc, - "This object contains some data/methods regarding internationalization in Blender, " - "and allows every py script\n" - "to feature translations for its own UI messages.\n" - "\n"); +PyDoc_STRVAR( + /* Wrap. */ + app_translations_doc, + "This object contains some data/methods regarding internationalization in Blender, " + "and allows every py script\n" + "to feature translations for its own UI messages.\n" + "\n"); static PyTypeObject BlenderAppTranslationsType = { /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0) /*tp_name*/ "bpy.app._translations_type", diff --git a/source/blender/python/intern/bpy_library_load.cc b/source/blender/python/intern/bpy_library_load.cc index 130b158839d..db14d2ed321 100644 --- a/source/blender/python/intern/bpy_library_load.cc +++ b/source/blender/python/intern/bpy_library_load.cc @@ -152,6 +152,7 @@ static PyTypeObject bpy_lib_Type = { }; PyDoc_STRVAR( + /* Wrap. */ bpy_lib_load_doc, ".. method:: load(" "filepath, " diff --git a/source/blender/python/intern/bpy_library_write.cc b/source/blender/python/intern/bpy_library_write.cc index 3888432d07f..073bf1d59fb 100644 --- a/source/blender/python/intern/bpy_library_write.cc +++ b/source/blender/python/intern/bpy_library_write.cc @@ -35,6 +35,7 @@ #include "../generic/python_compat.h" PyDoc_STRVAR( + /* Wrap. */ bpy_lib_write_doc, ".. method:: write(filepath, datablocks, path_remap=False, fake_user=False, compress=False)\n" "\n" diff --git a/source/blender/python/intern/bpy_msgbus.cc b/source/blender/python/intern/bpy_msgbus.cc index cb6874975ec..d4cec2cba1c 100644 --- a/source/blender/python/intern/bpy_msgbus.cc +++ b/source/blender/python/intern/bpy_msgbus.cc @@ -196,6 +196,7 @@ static void bpy_msgbus_subscribe_value_free_data(wmMsgSubscribeKey * /*msg_key*/ * \{ */ PyDoc_STRVAR( + /* Wrap. */ bpy_msgbus_subscribe_rna_doc, ".. function:: subscribe_rna(key, owner, args, notify, options=set())\n" "\n" @@ -325,6 +326,7 @@ static PyObject *bpy_msgbus_subscribe_rna(PyObject * /*self*/, PyObject *args, P } PyDoc_STRVAR( + /* Wrap. */ bpy_msgbus_publish_rna_doc, ".. function:: publish_rna(key)\n" "\n" BPY_MSGBUS_RNA_MSGKEY_DOC @@ -371,10 +373,12 @@ static PyObject *bpy_msgbus_publish_rna(PyObject * /*self*/, PyObject *args, PyO Py_RETURN_NONE; } -PyDoc_STRVAR(bpy_msgbus_clear_by_owner_doc, - ".. function:: clear_by_owner(owner)\n" - "\n" - " Clear all subscribers using this owner.\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_msgbus_clear_by_owner_doc, + ".. function:: clear_by_owner(owner)\n" + "\n" + " Clear all subscribers using this owner.\n"); static PyObject *bpy_msgbus_clear_by_owner(PyObject * /*self*/, PyObject *py_owner) { bContext *C = BPY_context_get(); diff --git a/source/blender/python/intern/bpy_props.cc b/source/blender/python/intern/bpy_props.cc index d6e549aaa15..98a350656fd 100644 --- a/source/blender/python/intern/bpy_props.cc +++ b/source/blender/python/intern/bpy_props.cc @@ -278,12 +278,14 @@ static PyGetSetDef bpy_prop_deferred_getset[] = { {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */ }; -PyDoc_STRVAR(bpy_prop_deferred_doc, - "Intermediate storage for properties before registration.\n" - "\n" - ".. note::\n" - "\n" - " This is not part of the stable API and may change between releases."); +PyDoc_STRVAR( + /* Wrap. */ + bpy_prop_deferred_doc, + "Intermediate storage for properties before registration.\n" + "\n" + ".. note::\n" + "\n" + " This is not part of the stable API and may change between releases."); PyTypeObject bpy_prop_deferred_Type = { /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0) @@ -2774,24 +2776,25 @@ static int bpy_struct_id_used(StructRNA *srna, char *identifier) * * \{ */ -PyDoc_STRVAR(BPy_BoolProperty_doc, - ".. function:: BoolProperty(name=\"\", " - "description=\"\", " - "translation_context=\"*\", " - "default=False, " - "options={'ANIMATABLE'}, " - "override=set(), " - "tags=set(), " - "subtype='NONE', " - "update=None, " - "get=None, " - "set=None)\n" - "\n" - " Returns a new boolean property definition.\n" - "\n" BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC BPY_PROPDEF_CTXT_DOC - BPY_PROPDEF_OPTIONS_DOC BPY_PROPDEF_OPTIONS_OVERRIDE_DOC BPY_PROPDEF_TAGS_DOC - BPY_PROPDEF_SUBTYPE_NUMBER_DOC BPY_PROPDEF_UPDATE_DOC BPY_PROPDEF_GET_DOC - BPY_PROPDEF_SET_DOC); +PyDoc_STRVAR( + /* Wrap. */ + BPy_BoolProperty_doc, + ".. function:: BoolProperty(name=\"\", " + "description=\"\", " + "translation_context=\"*\", " + "default=False, " + "options={'ANIMATABLE'}, " + "override=set(), " + "tags=set(), " + "subtype='NONE', " + "update=None, " + "get=None, " + "set=None)\n" + "\n" + " Returns a new boolean property definition.\n" + "\n" BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC BPY_PROPDEF_CTXT_DOC BPY_PROPDEF_OPTIONS_DOC + BPY_PROPDEF_OPTIONS_OVERRIDE_DOC BPY_PROPDEF_TAGS_DOC BPY_PROPDEF_SUBTYPE_NUMBER_DOC + BPY_PROPDEF_UPDATE_DOC BPY_PROPDEF_GET_DOC BPY_PROPDEF_SET_DOC); static PyObject *BPy_BoolProperty(PyObject *self, PyObject *args, PyObject *kw) { StructRNA *srna; @@ -2926,6 +2929,7 @@ static PyObject *BPy_BoolProperty(PyObject *self, PyObject *args, PyObject *kw) } PyDoc_STRVAR( + /* Wrap. */ BPy_BoolVectorProperty_doc, ".. function:: BoolVectorProperty(name=\"\", " "description=\"\", " @@ -3113,6 +3117,7 @@ static PyObject *BPy_BoolVectorProperty(PyObject *self, PyObject *args, PyObject } PyDoc_STRVAR( + /* Wrap. */ BPy_IntProperty_doc, ".. function:: IntProperty(name=\"\", " "description=\"\", " @@ -3288,34 +3293,35 @@ static PyObject *BPy_IntProperty(PyObject *self, PyObject *args, PyObject *kw) Py_RETURN_NONE; } -PyDoc_STRVAR(BPy_IntVectorProperty_doc, - ".. function:: IntVectorProperty(name=\"\", " - "description=\"\", " - "translation_context=\"*\", " - "default=(0, 0, 0), min=-2**31, max=2**31-1, " - "soft_min=-2**31, " - "soft_max=2**31-1, " - "step=1, " - "options={'ANIMATABLE'}, " - "override=set(), " - "tags=set(), " - "subtype='NONE', " - "size=3, " - "update=None, " - "get=None, " - "set=None)\n" - "\n" - " Returns a new vector int property definition.\n" - "\n" BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC BPY_PROPDEF_CTXT_DOC - " :arg default: sequence of ints the length of *size*.\n" - " :type default: sequence\n" BPY_PROPDEF_NUM_MIN_DOC - " :type min: int\n" BPY_PROPDEF_NUM_MAX_DOC - " :type max: int\n" BPY_PROPDEF_NUM_SOFTMIN_DOC - " :type soft_min: int\n" BPY_PROPDEF_NUM_SOFTMAX_DOC - " :type soft_max: int\n" BPY_PROPDEF_INT_STEP_DOC BPY_PROPDEF_OPTIONS_DOC - BPY_PROPDEF_OPTIONS_OVERRIDE_DOC BPY_PROPDEF_TAGS_DOC - BPY_PROPDEF_SUBTYPE_NUMBER_ARRAY_DOC BPY_PROPDEF_VECSIZE_DOC - BPY_PROPDEF_UPDATE_DOC BPY_PROPDEF_GET_DOC BPY_PROPDEF_SET_DOC); +PyDoc_STRVAR( + /* Wrap. */ + BPy_IntVectorProperty_doc, + ".. function:: IntVectorProperty(name=\"\", " + "description=\"\", " + "translation_context=\"*\", " + "default=(0, 0, 0), min=-2**31, max=2**31-1, " + "soft_min=-2**31, " + "soft_max=2**31-1, " + "step=1, " + "options={'ANIMATABLE'}, " + "override=set(), " + "tags=set(), " + "subtype='NONE', " + "size=3, " + "update=None, " + "get=None, " + "set=None)\n" + "\n" + " Returns a new vector int property definition.\n" + "\n" BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC BPY_PROPDEF_CTXT_DOC + " :arg default: sequence of ints the length of *size*.\n" + " :type default: sequence\n" BPY_PROPDEF_NUM_MIN_DOC + " :type min: int\n" BPY_PROPDEF_NUM_MAX_DOC " :type max: int\n" BPY_PROPDEF_NUM_SOFTMIN_DOC + " :type soft_min: int\n" BPY_PROPDEF_NUM_SOFTMAX_DOC + " :type soft_max: int\n" BPY_PROPDEF_INT_STEP_DOC BPY_PROPDEF_OPTIONS_DOC + BPY_PROPDEF_OPTIONS_OVERRIDE_DOC BPY_PROPDEF_TAGS_DOC BPY_PROPDEF_SUBTYPE_NUMBER_ARRAY_DOC + BPY_PROPDEF_VECSIZE_DOC BPY_PROPDEF_UPDATE_DOC BPY_PROPDEF_GET_DOC + BPY_PROPDEF_SET_DOC); static PyObject *BPy_IntVectorProperty(PyObject *self, PyObject *args, PyObject *kw) { StructRNA *srna; @@ -3487,33 +3493,35 @@ static PyObject *BPy_IntVectorProperty(PyObject *self, PyObject *args, PyObject Py_RETURN_NONE; } -PyDoc_STRVAR(BPy_FloatProperty_doc, - ".. function:: FloatProperty(name=\"\", " - "description=\"\", " - "translation_context=\"*\", " - "default=0.0, " - "min=-3.402823e+38, max=3.402823e+38, " - "soft_min=-3.402823e+38, soft_max=3.402823e+38, " - "step=3, " - "precision=2, " - "options={'ANIMATABLE'}, " - "override=set(), " - "tags=set(), " - "subtype='NONE', " - "unit='NONE', " - "update=None, " - "get=None, " - "set=None)\n" - "\n" - " Returns a new float (single precision) property definition.\n" - "\n" BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC BPY_PROPDEF_CTXT_DOC - BPY_PROPDEF_NUM_MIN_DOC " :type min: float\n" BPY_PROPDEF_NUM_MAX_DOC - " :type max: float\n" BPY_PROPDEF_NUM_SOFTMIN_DOC - " :type soft_min: float\n" BPY_PROPDEF_NUM_SOFTMAX_DOC - " :type soft_max: float\n" BPY_PROPDEF_FLOAT_STEP_DOC BPY_PROPDEF_FLOAT_PREC_DOC - BPY_PROPDEF_OPTIONS_DOC BPY_PROPDEF_OPTIONS_OVERRIDE_DOC BPY_PROPDEF_TAGS_DOC - BPY_PROPDEF_SUBTYPE_NUMBER_DOC BPY_PROPDEF_UNIT_DOC BPY_PROPDEF_UPDATE_DOC - BPY_PROPDEF_GET_DOC BPY_PROPDEF_SET_DOC); +PyDoc_STRVAR( + /* Wrap. */ + BPy_FloatProperty_doc, + ".. function:: FloatProperty(name=\"\", " + "description=\"\", " + "translation_context=\"*\", " + "default=0.0, " + "min=-3.402823e+38, max=3.402823e+38, " + "soft_min=-3.402823e+38, soft_max=3.402823e+38, " + "step=3, " + "precision=2, " + "options={'ANIMATABLE'}, " + "override=set(), " + "tags=set(), " + "subtype='NONE', " + "unit='NONE', " + "update=None, " + "get=None, " + "set=None)\n" + "\n" + " Returns a new float (single precision) property definition.\n" + "\n" BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC BPY_PROPDEF_CTXT_DOC BPY_PROPDEF_NUM_MIN_DOC + " :type min: float\n" BPY_PROPDEF_NUM_MAX_DOC + " :type max: float\n" BPY_PROPDEF_NUM_SOFTMIN_DOC + " :type soft_min: float\n" BPY_PROPDEF_NUM_SOFTMAX_DOC + " :type soft_max: float\n" BPY_PROPDEF_FLOAT_STEP_DOC BPY_PROPDEF_FLOAT_PREC_DOC + BPY_PROPDEF_OPTIONS_DOC BPY_PROPDEF_OPTIONS_OVERRIDE_DOC BPY_PROPDEF_TAGS_DOC + BPY_PROPDEF_SUBTYPE_NUMBER_DOC BPY_PROPDEF_UNIT_DOC BPY_PROPDEF_UPDATE_DOC + BPY_PROPDEF_GET_DOC BPY_PROPDEF_SET_DOC); static PyObject *BPy_FloatProperty(PyObject *self, PyObject *args, PyObject *kw) { StructRNA *srna; @@ -3664,37 +3672,38 @@ static PyObject *BPy_FloatProperty(PyObject *self, PyObject *args, PyObject *kw) Py_RETURN_NONE; } -PyDoc_STRVAR(BPy_FloatVectorProperty_doc, - ".. function:: FloatVectorProperty(name=\"\", " - "description=\"\", " - "translation_context=\"*\", " - "default=(0.0, 0.0, 0.0), " - "min=sys.float_info.min, max=sys.float_info.max, " - "soft_min=sys.float_info.min, soft_max=sys.float_info.max, " - "step=3, " - "precision=2, " - "options={'ANIMATABLE'}, " - "override=set(), " - "tags=set(), " - "subtype='NONE', " - "unit='NONE', " - "size=3, " - "update=None, " - "get=None, " - "set=None)\n" - "\n" - " Returns a new vector float property definition.\n" - "\n" BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC BPY_PROPDEF_CTXT_DOC - " :arg default: sequence of floats the length of *size*.\n" - " :type default: sequence\n" BPY_PROPDEF_NUM_MIN_DOC - " :type min: float\n" BPY_PROPDEF_NUM_MAX_DOC - " :type max: float\n" BPY_PROPDEF_NUM_SOFTMIN_DOC - " :type soft_min: float\n" BPY_PROPDEF_NUM_SOFTMAX_DOC - " :type soft_max: float\n" BPY_PROPDEF_OPTIONS_DOC BPY_PROPDEF_OPTIONS_OVERRIDE_DOC - BPY_PROPDEF_TAGS_DOC BPY_PROPDEF_FLOAT_STEP_DOC BPY_PROPDEF_FLOAT_PREC_DOC - BPY_PROPDEF_SUBTYPE_NUMBER_ARRAY_DOC BPY_PROPDEF_UNIT_DOC - BPY_PROPDEF_VECSIZE_DOC BPY_PROPDEF_UPDATE_DOC BPY_PROPDEF_GET_DOC - BPY_PROPDEF_SET_DOC); +PyDoc_STRVAR( + /* Wrap. */ + BPy_FloatVectorProperty_doc, + ".. function:: FloatVectorProperty(name=\"\", " + "description=\"\", " + "translation_context=\"*\", " + "default=(0.0, 0.0, 0.0), " + "min=sys.float_info.min, max=sys.float_info.max, " + "soft_min=sys.float_info.min, soft_max=sys.float_info.max, " + "step=3, " + "precision=2, " + "options={'ANIMATABLE'}, " + "override=set(), " + "tags=set(), " + "subtype='NONE', " + "unit='NONE', " + "size=3, " + "update=None, " + "get=None, " + "set=None)\n" + "\n" + " Returns a new vector float property definition.\n" + "\n" BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC BPY_PROPDEF_CTXT_DOC + " :arg default: sequence of floats the length of *size*.\n" + " :type default: sequence\n" BPY_PROPDEF_NUM_MIN_DOC + " :type min: float\n" BPY_PROPDEF_NUM_MAX_DOC + " :type max: float\n" BPY_PROPDEF_NUM_SOFTMIN_DOC + " :type soft_min: float\n" BPY_PROPDEF_NUM_SOFTMAX_DOC + " :type soft_max: float\n" BPY_PROPDEF_OPTIONS_DOC BPY_PROPDEF_OPTIONS_OVERRIDE_DOC + BPY_PROPDEF_TAGS_DOC BPY_PROPDEF_FLOAT_STEP_DOC BPY_PROPDEF_FLOAT_PREC_DOC + BPY_PROPDEF_SUBTYPE_NUMBER_ARRAY_DOC BPY_PROPDEF_UNIT_DOC BPY_PROPDEF_VECSIZE_DOC + BPY_PROPDEF_UPDATE_DOC BPY_PROPDEF_GET_DOC BPY_PROPDEF_SET_DOC); static PyObject *BPy_FloatVectorProperty(PyObject *self, PyObject *args, PyObject *kw) { StructRNA *srna; @@ -3881,30 +3890,32 @@ static PyObject *BPy_FloatVectorProperty(PyObject *self, PyObject *args, PyObjec Py_RETURN_NONE; } -PyDoc_STRVAR(BPy_StringProperty_doc, - ".. function:: StringProperty(name=\"\", " - "description=\"\", " - "translation_context=\"*\", " - "default=\"\", " - "maxlen=0, " - "options={'ANIMATABLE'}, " - "override=set(), " - "tags=set(), " - "subtype='NONE', " - "update=None, " - "get=None, " - "set=None, " - "search=None, " - "search_options={'SUGGESTION'})\n" - "\n" - " Returns a new string property definition.\n" - "\n" BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC BPY_PROPDEF_CTXT_DOC - " :arg default: initializer string.\n" - " :type default: string\n" - " :arg maxlen: maximum length of the string.\n" - " :type maxlen: int\n" BPY_PROPDEF_OPTIONS_DOC BPY_PROPDEF_OPTIONS_OVERRIDE_DOC - BPY_PROPDEF_TAGS_DOC BPY_PROPDEF_SUBTYPE_STRING_DOC BPY_PROPDEF_UPDATE_DOC - BPY_PROPDEF_GET_DOC BPY_PROPDEF_SET_DOC BPY_PROPDEF_SEARCH_DOC); +PyDoc_STRVAR( + /* Wrap. */ + BPy_StringProperty_doc, + ".. function:: StringProperty(name=\"\", " + "description=\"\", " + "translation_context=\"*\", " + "default=\"\", " + "maxlen=0, " + "options={'ANIMATABLE'}, " + "override=set(), " + "tags=set(), " + "subtype='NONE', " + "update=None, " + "get=None, " + "set=None, " + "search=None, " + "search_options={'SUGGESTION'})\n" + "\n" + " Returns a new string property definition.\n" + "\n" BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC BPY_PROPDEF_CTXT_DOC + " :arg default: initializer string.\n" + " :type default: string\n" + " :arg maxlen: maximum length of the string.\n" + " :type maxlen: int\n" BPY_PROPDEF_OPTIONS_DOC BPY_PROPDEF_OPTIONS_OVERRIDE_DOC + BPY_PROPDEF_TAGS_DOC BPY_PROPDEF_SUBTYPE_STRING_DOC BPY_PROPDEF_UPDATE_DOC + BPY_PROPDEF_GET_DOC BPY_PROPDEF_SET_DOC BPY_PROPDEF_SEARCH_DOC); static PyObject *BPy_StringProperty(PyObject *self, PyObject *args, PyObject *kw) { StructRNA *srna; @@ -4063,6 +4074,7 @@ static PyObject *BPy_StringProperty(PyObject *self, PyObject *args, PyObject *kw } PyDoc_STRVAR( + /* Wrap. */ BPy_EnumProperty_doc, ".. function:: EnumProperty(items, " "name=\"\", " @@ -4338,21 +4350,23 @@ StructRNA *pointer_type_from_py(PyObject *value, const char *error_prefix) return srna; } -PyDoc_STRVAR(BPy_PointerProperty_doc, - ".. function:: PointerProperty(type=None, " - "name=\"\", " - "description=\"\", " - "translation_context=\"*\", " - "options={'ANIMATABLE'}, " - "override=set(), " - "tags=set(), " - "poll=None, " - "update=None)\n" - "\n" - " Returns a new pointer property definition.\n" - "\n" BPY_PROPDEF_POINTER_TYPE_DOC BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC - BPY_PROPDEF_CTXT_DOC BPY_PROPDEF_OPTIONS_DOC BPY_PROPDEF_OPTIONS_OVERRIDE_DOC - BPY_PROPDEF_TAGS_DOC BPY_PROPDEF_POLL_DOC BPY_PROPDEF_UPDATE_DOC); +PyDoc_STRVAR( + /* Wrap. */ + BPy_PointerProperty_doc, + ".. function:: PointerProperty(type=None, " + "name=\"\", " + "description=\"\", " + "translation_context=\"*\", " + "options={'ANIMATABLE'}, " + "override=set(), " + "tags=set(), " + "poll=None, " + "update=None)\n" + "\n" + " Returns a new pointer property definition.\n" + "\n" BPY_PROPDEF_POINTER_TYPE_DOC BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC + BPY_PROPDEF_CTXT_DOC BPY_PROPDEF_OPTIONS_DOC BPY_PROPDEF_OPTIONS_OVERRIDE_DOC + BPY_PROPDEF_TAGS_DOC BPY_PROPDEF_POLL_DOC BPY_PROPDEF_UPDATE_DOC); PyObject *BPy_PointerProperty(PyObject *self, PyObject *args, PyObject *kw) { StructRNA *srna; @@ -4487,19 +4501,21 @@ PyObject *BPy_PointerProperty(PyObject *self, PyObject *args, PyObject *kw) Py_RETURN_NONE; } -PyDoc_STRVAR(BPy_CollectionProperty_doc, - ".. function:: CollectionProperty(type=None, " - "name=\"\", " - "description=\"\", " - "translation_context=\"*\", " - "options={'ANIMATABLE'}, " - "override=set(), " - "tags=set())\n" - "\n" - " Returns a new collection property definition.\n" - "\n" BPY_PROPDEF_COLLECTION_TYPE_DOC BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC - BPY_PROPDEF_CTXT_DOC BPY_PROPDEF_OPTIONS_DOC - BPY_PROPDEF_OPTIONS_OVERRIDE_COLLECTION_DOC BPY_PROPDEF_TAGS_DOC); +PyDoc_STRVAR( + /* Wrap. */ + BPy_CollectionProperty_doc, + ".. function:: CollectionProperty(type=None, " + "name=\"\", " + "description=\"\", " + "translation_context=\"*\", " + "options={'ANIMATABLE'}, " + "override=set(), " + "tags=set())\n" + "\n" + " Returns a new collection property definition.\n" + "\n" BPY_PROPDEF_COLLECTION_TYPE_DOC BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC + BPY_PROPDEF_CTXT_DOC BPY_PROPDEF_OPTIONS_DOC BPY_PROPDEF_OPTIONS_OVERRIDE_COLLECTION_DOC + BPY_PROPDEF_TAGS_DOC); PyObject *BPy_CollectionProperty(PyObject *self, PyObject *args, PyObject *kw) { StructRNA *srna; @@ -4618,18 +4634,20 @@ PyObject *BPy_CollectionProperty(PyObject *self, PyObject *args, PyObject *kw) Py_RETURN_NONE; } -PyDoc_STRVAR(BPy_RemoveProperty_doc, - ".. function:: RemoveProperty(cls, attr)\n" - "\n" - " Removes a dynamically defined property.\n" - "\n" - " :arg cls: The class containing the property (must be a positional argument).\n" - " :type cls: type\n" - " :arg attr: Property name (must be passed as a keyword).\n" - " :type attr: string\n" - "\n" - ".. note:: Typically this function doesn't need to be accessed directly.\n" - " Instead use ``del cls.attr``\n"); +PyDoc_STRVAR( + /* Wrap. */ + BPy_RemoveProperty_doc, + ".. function:: RemoveProperty(cls, attr)\n" + "\n" + " Removes a dynamically defined property.\n" + "\n" + " :arg cls: The class containing the property (must be a positional argument).\n" + " :type cls: type\n" + " :arg attr: Property name (must be passed as a keyword).\n" + " :type attr: string\n" + "\n" + ".. note:: Typically this function doesn't need to be accessed directly.\n" + " Instead use ``del cls.attr``\n"); static PyObject *BPy_RemoveProperty(PyObject *self, PyObject *args, PyObject *kw) { StructRNA *srna; @@ -4768,6 +4786,7 @@ static int props_clear(PyObject * /*self*/) } PyDoc_STRVAR( + /* Wrap. */ props_module_doc, "This module defines properties to extend Blender's internal data. The result of these " "functions" diff --git a/source/blender/python/intern/bpy_rna.cc b/source/blender/python/intern/bpy_rna.cc index 9077a275331..fbd067a9700 100644 --- a/source/blender/python/intern/bpy_rna.cc +++ b/source/blender/python/intern/bpy_rna.cc @@ -3538,15 +3538,17 @@ static PyMappingMethods pyrna_struct_as_mapping = { /*mp_ass_subscript*/ (objobjargproc)pyrna_struct_ass_subscript, }; -PyDoc_STRVAR(pyrna_struct_keys_doc, - ".. method:: keys()\n" - "\n" - " Returns the keys of this objects custom properties (matches Python's\n" - " dictionary function of the same name).\n" - "\n" - " :return: custom property keys.\n" - " :rtype: :class:`idprop.type.IDPropertyGroupViewKeys`\n" - "\n" BPY_DOC_ID_PROP_TYPE_NOTE); +PyDoc_STRVAR( + /* Wrap. */ + pyrna_struct_keys_doc, + ".. method:: keys()\n" + "\n" + " Returns the keys of this objects custom properties (matches Python's\n" + " dictionary function of the same name).\n" + "\n" + " :return: custom property keys.\n" + " :rtype: :class:`idprop.type.IDPropertyGroupViewKeys`\n" + "\n" BPY_DOC_ID_PROP_TYPE_NOTE); static PyObject *pyrna_struct_keys(BPy_StructRNA *self) { PYRNA_STRUCT_CHECK_OBJ(self); @@ -3561,15 +3563,17 @@ static PyObject *pyrna_struct_keys(BPy_StructRNA *self) return BPy_Wrap_GetKeys_View_WithID(self->ptr.owner_id, group); } -PyDoc_STRVAR(pyrna_struct_items_doc, - ".. method:: items()\n" - "\n" - " Returns the items of this objects custom properties (matches Python's\n" - " dictionary function of the same name).\n" - "\n" - " :return: custom property key, value pairs.\n" - " :rtype: :class:`idprop.type.IDPropertyGroupViewItems`\n" - "\n" BPY_DOC_ID_PROP_TYPE_NOTE); +PyDoc_STRVAR( + /* Wrap. */ + pyrna_struct_items_doc, + ".. method:: items()\n" + "\n" + " Returns the items of this objects custom properties (matches Python's\n" + " dictionary function of the same name).\n" + "\n" + " :return: custom property key, value pairs.\n" + " :rtype: :class:`idprop.type.IDPropertyGroupViewItems`\n" + "\n" BPY_DOC_ID_PROP_TYPE_NOTE); static PyObject *pyrna_struct_items(BPy_StructRNA *self) { PYRNA_STRUCT_CHECK_OBJ(self); @@ -3584,15 +3588,17 @@ static PyObject *pyrna_struct_items(BPy_StructRNA *self) return BPy_Wrap_GetItems_View_WithID(self->ptr.owner_id, group); } -PyDoc_STRVAR(pyrna_struct_values_doc, - ".. method:: values()\n" - "\n" - " Returns the values of this objects custom properties (matches Python's\n" - " dictionary function of the same name).\n" - "\n" - " :return: custom property values.\n" - " :rtype: :class:`idprop.type.IDPropertyGroupViewValues`\n" - "\n" BPY_DOC_ID_PROP_TYPE_NOTE); +PyDoc_STRVAR( + /* Wrap. */ + pyrna_struct_values_doc, + ".. method:: values()\n" + "\n" + " Returns the values of this objects custom properties (matches Python's\n" + " dictionary function of the same name).\n" + "\n" + " :return: custom property values.\n" + " :rtype: :class:`idprop.type.IDPropertyGroupViewValues`\n" + "\n" BPY_DOC_ID_PROP_TYPE_NOTE); static PyObject *pyrna_struct_values(BPy_StructRNA *self) { PYRNA_STRUCT_CHECK_OBJ(self); @@ -3608,20 +3614,22 @@ static PyObject *pyrna_struct_values(BPy_StructRNA *self) return BPy_Wrap_GetValues_View_WithID(self->ptr.owner_id, group); } -PyDoc_STRVAR(pyrna_struct_is_property_set_doc, - ".. method:: is_property_set(property, ghost=True)\n" - "\n" - " Check if a property is set, use for testing operator properties.\n" - "\n" - " :arg ghost: Used for operators that re-run with previous settings.\n" - " In this case the property is not marked as set,\n" - " yet the value from the previous execution is used.\n" - "\n" - " In rare cases you may want to set this option to false.\n" - "\n" - " :type ghost: boolean\n" - " :return: True when the property has been set.\n" - " :rtype: boolean\n"); +PyDoc_STRVAR( + /* Wrap. */ + pyrna_struct_is_property_set_doc, + ".. method:: is_property_set(property, ghost=True)\n" + "\n" + " Check if a property is set, use for testing operator properties.\n" + "\n" + " :arg ghost: Used for operators that re-run with previous settings.\n" + " In this case the property is not marked as set,\n" + " yet the value from the previous execution is used.\n" + "\n" + " In rare cases you may want to set this option to false.\n" + "\n" + " :type ghost: boolean\n" + " :return: True when the property has been set.\n" + " :rtype: boolean\n"); static PyObject *pyrna_struct_is_property_set(BPy_StructRNA *self, PyObject *args, PyObject *kw) { PropertyRNA *prop; @@ -3655,10 +3663,12 @@ static PyObject *pyrna_struct_is_property_set(BPy_StructRNA *self, PyObject *arg return PyBool_FromLong(RNA_property_is_set_ex(&self->ptr, prop, use_ghost)); } -PyDoc_STRVAR(pyrna_struct_property_unset_doc, - ".. method:: property_unset(property)\n" - "\n" - " Unset a property, will use default value afterward.\n"); +PyDoc_STRVAR( + /* Wrap. */ + pyrna_struct_property_unset_doc, + ".. method:: property_unset(property)\n" + "\n" + " Unset a property, will use default value afterward.\n"); static PyObject *pyrna_struct_property_unset(BPy_StructRNA *self, PyObject *args) { PropertyRNA *prop; @@ -3683,13 +3693,15 @@ static PyObject *pyrna_struct_property_unset(BPy_StructRNA *self, PyObject *args Py_RETURN_NONE; } -PyDoc_STRVAR(pyrna_struct_is_property_hidden_doc, - ".. method:: is_property_hidden(property)\n" - "\n" - " Check if a property is hidden.\n" - "\n" - " :return: True when the property is hidden.\n" - " :rtype: boolean\n"); +PyDoc_STRVAR( + /* Wrap. */ + pyrna_struct_is_property_hidden_doc, + ".. method:: is_property_hidden(property)\n" + "\n" + " Check if a property is hidden.\n" + "\n" + " :return: True when the property is hidden.\n" + " :rtype: boolean\n"); static PyObject *pyrna_struct_is_property_hidden(BPy_StructRNA *self, PyObject *args) { PropertyRNA *prop; @@ -3712,13 +3724,15 @@ static PyObject *pyrna_struct_is_property_hidden(BPy_StructRNA *self, PyObject * return PyBool_FromLong(RNA_property_flag(prop) & PROP_HIDDEN); } -PyDoc_STRVAR(pyrna_struct_is_property_readonly_doc, - ".. method:: is_property_readonly(property)\n" - "\n" - " Check if a property is readonly.\n" - "\n" - " :return: True when the property is readonly (not writable).\n" - " :rtype: boolean\n"); +PyDoc_STRVAR( + /* Wrap. */ + pyrna_struct_is_property_readonly_doc, + ".. method:: is_property_readonly(property)\n" + "\n" + " Check if a property is readonly.\n" + "\n" + " :return: True when the property is readonly (not writable).\n" + " :rtype: boolean\n"); static PyObject *pyrna_struct_is_property_readonly(BPy_StructRNA *self, PyObject *args) { PropertyRNA *prop; @@ -3741,13 +3755,15 @@ static PyObject *pyrna_struct_is_property_readonly(BPy_StructRNA *self, PyObject return PyBool_FromLong(!RNA_property_editable(&self->ptr, prop)); } -PyDoc_STRVAR(pyrna_struct_is_property_overridable_library_doc, - ".. method:: is_property_overridable_library(property)\n" - "\n" - " Check if a property is overridable.\n" - "\n" - " :return: True when the property is overridable.\n" - " :rtype: boolean\n"); +PyDoc_STRVAR( + /* Wrap. */ + pyrna_struct_is_property_overridable_library_doc, + ".. method:: is_property_overridable_library(property)\n" + "\n" + " Check if a property is overridable.\n" + "\n" + " :return: True when the property is overridable.\n" + " :rtype: boolean\n"); static PyObject *pyrna_struct_is_property_overridable_library(BPy_StructRNA *self, PyObject *args) { PropertyRNA *prop; @@ -3770,13 +3786,15 @@ static PyObject *pyrna_struct_is_property_overridable_library(BPy_StructRNA *sel return PyBool_FromLong(long(RNA_property_overridable_get(&self->ptr, prop))); } -PyDoc_STRVAR(pyrna_struct_property_overridable_library_set_doc, - ".. method:: property_overridable_library_set(property, overridable)\n" - "\n" - " Define a property as overridable or not (only for custom properties!).\n" - "\n" - " :return: True when the overridable status of the property was successfully set.\n" - " :rtype: boolean\n"); +PyDoc_STRVAR( + /* Wrap. */ + pyrna_struct_property_overridable_library_set_doc, + ".. method:: property_overridable_library_set(property, overridable)\n" + "\n" + " Define a property as overridable or not (only for custom properties!).\n" + "\n" + " :return: True when the overridable status of the property was successfully set.\n" + " :rtype: boolean\n"); static PyObject *pyrna_struct_property_overridable_library_set(BPy_StructRNA *self, PyObject *args) { PropertyRNA *prop; @@ -3801,16 +3819,18 @@ static PyObject *pyrna_struct_property_overridable_library_set(BPy_StructRNA *se long(RNA_property_overridable_library_set(&self->ptr, prop, bool(is_overridable)))); } -PyDoc_STRVAR(pyrna_struct_path_resolve_doc, - ".. method:: path_resolve(path, coerce=True)\n" - "\n" - " Returns the property from the path, raise an exception when not found.\n" - "\n" - " :arg path: path which this property resolves.\n" - " :type path: string\n" - " :arg coerce: optional argument, when True, the property will be converted\n" - " into its Python representation.\n" - " :type coerce: boolean\n"); +PyDoc_STRVAR( + /* Wrap. */ + pyrna_struct_path_resolve_doc, + ".. method:: path_resolve(path, coerce=True)\n" + "\n" + " Returns the property from the path, raise an exception when not found.\n" + "\n" + " :arg path: path which this property resolves.\n" + " :type path: string\n" + " :arg coerce: optional argument, when True, the property will be converted\n" + " into its Python representation.\n" + " :type coerce: boolean\n"); static PyObject *pyrna_struct_path_resolve(BPy_StructRNA *self, PyObject *args) { const char *path; @@ -3856,17 +3876,19 @@ static PyObject *pyrna_struct_path_resolve(BPy_StructRNA *self, PyObject *args) return nullptr; } -PyDoc_STRVAR(pyrna_struct_path_from_id_doc, - ".. method:: path_from_id(property=\"\")\n" - "\n" - " Returns the data path from the ID to this object (string).\n" - "\n" - " :arg property: Optional property name which can be used if the path is\n" - " to a property of this object.\n" - " :type property: string\n" - " :return: The path from :class:`bpy.types.bpy_struct.id_data`\n" - " to this struct and property (when given).\n" - " :rtype: str\n"); +PyDoc_STRVAR( + /* Wrap. */ + pyrna_struct_path_from_id_doc, + ".. method:: path_from_id(property=\"\")\n" + "\n" + " Returns the data path from the ID to this object (string).\n" + "\n" + " :arg property: Optional property name which can be used if the path is\n" + " to a property of this object.\n" + " :type property: string\n" + " :return: The path from :class:`bpy.types.bpy_struct.id_data`\n" + " to this struct and property (when given).\n" + " :rtype: str\n"); static PyObject *pyrna_struct_path_from_id(BPy_StructRNA *self, PyObject *args) { const char *name = nullptr; @@ -3917,13 +3939,15 @@ static PyObject *pyrna_struct_path_from_id(BPy_StructRNA *self, PyObject *args) return ret; } -PyDoc_STRVAR(pyrna_prop_path_from_id_doc, - ".. method:: path_from_id()\n" - "\n" - " Returns the data path from the ID to this property (string).\n" - "\n" - " :return: The path from :class:`bpy.types.bpy_struct.id_data` to this property.\n" - " :rtype: str\n"); +PyDoc_STRVAR( + /* Wrap. */ + pyrna_prop_path_from_id_doc, + ".. method:: path_from_id()\n" + "\n" + " Returns the data path from the ID to this property (string).\n" + "\n" + " :return: The path from :class:`bpy.types.bpy_struct.id_data` to this property.\n" + " :rtype: str\n"); static PyObject *pyrna_prop_path_from_id(BPy_PropertyRNA *self) { const char *path; @@ -3946,13 +3970,15 @@ static PyObject *pyrna_prop_path_from_id(BPy_PropertyRNA *self) return ret; } -PyDoc_STRVAR(pyrna_prop_as_bytes_doc, - ".. method:: as_bytes()\n" - "\n" - " Returns this string property as a byte rather than a Python string.\n" - "\n" - " :return: The string as bytes.\n" - " :rtype: bytes\n"); +PyDoc_STRVAR( + /* Wrap. */ + pyrna_prop_as_bytes_doc, + ".. method:: as_bytes()\n" + "\n" + " Returns this string property as a byte rather than a Python string.\n" + "\n" + " :return: The string as bytes.\n" + " :rtype: bytes\n"); static PyObject *pyrna_prop_as_bytes(BPy_PropertyRNA *self) { @@ -3980,28 +4006,32 @@ static PyObject *pyrna_prop_as_bytes(BPy_PropertyRNA *self) return ret; } -PyDoc_STRVAR(pyrna_prop_update_doc, - ".. method:: update()\n" - "\n" - " Execute the properties update callback.\n" - "\n" - " .. note::\n" - " This is called when assigning a property,\n" - " however in rare cases it's useful to call explicitly.\n"); +PyDoc_STRVAR( + /* Wrap. */ + pyrna_prop_update_doc, + ".. method:: update()\n" + "\n" + " Execute the properties update callback.\n" + "\n" + " .. note::\n" + " This is called when assigning a property,\n" + " however in rare cases it's useful to call explicitly.\n"); static PyObject *pyrna_prop_update(BPy_PropertyRNA *self) { RNA_property_update(BPY_context_get(), &self->ptr, self->prop); Py_RETURN_NONE; } -PyDoc_STRVAR(pyrna_struct_type_recast_doc, - ".. method:: type_recast()\n" - "\n" - " Return a new instance, this is needed because types\n" - " such as textures can be changed at runtime.\n" - "\n" - " :return: a new instance of this object with the type initialized again.\n" - " :rtype: subclass of :class:`bpy.types.bpy_struct`\n"); +PyDoc_STRVAR( + /* Wrap. */ + pyrna_struct_type_recast_doc, + ".. method:: type_recast()\n" + "\n" + " Return a new instance, this is needed because types\n" + " such as textures can be changed at runtime.\n" + "\n" + " :return: a new instance of this object with the type initialized again.\n" + " :rtype: subclass of :class:`bpy.types.bpy_struct`\n"); static PyObject *pyrna_struct_type_recast(BPy_StructRNA *self) { @@ -4048,13 +4078,15 @@ static PyObject *pyrna_struct_bl_rna_find_subclass_recursive(PyObject *cls, cons return ret_test; } -PyDoc_STRVAR(pyrna_struct_bl_rna_get_subclass_py_doc, - ".. classmethod:: bl_rna_get_subclass_py(id, default=None)\n" - "\n" - " :arg id: The RNA type identifier.\n" - " :type id: string\n" - " :return: The class or default when not found.\n" - " :rtype: type\n"); +PyDoc_STRVAR( + /* Wrap. */ + pyrna_struct_bl_rna_get_subclass_py_doc, + ".. classmethod:: bl_rna_get_subclass_py(id, default=None)\n" + "\n" + " :arg id: The RNA type identifier.\n" + " :type id: string\n" + " :return: The class or default when not found.\n" + " :rtype: type\n"); static PyObject *pyrna_struct_bl_rna_get_subclass_py(PyObject *cls, PyObject *args) { char *id; @@ -4070,13 +4102,15 @@ static PyObject *pyrna_struct_bl_rna_get_subclass_py(PyObject *cls, PyObject *ar return Py_INCREF_RET(ret); } -PyDoc_STRVAR(pyrna_struct_bl_rna_get_subclass_doc, - ".. classmethod:: bl_rna_get_subclass(id, default=None)\n" - "\n" - " :arg id: The RNA type identifier.\n" - " :type id: string\n" - " :return: The RNA type or default when not found.\n" - " :rtype: :class:`bpy.types.Struct` subclass\n"); +PyDoc_STRVAR( + /* Wrap. */ + pyrna_struct_bl_rna_get_subclass_doc, + ".. classmethod:: bl_rna_get_subclass(id, default=None)\n" + "\n" + " :arg id: The RNA type identifier.\n" + " :type id: string\n" + " :return: The RNA type or default when not found.\n" + " :rtype: :class:`bpy.types.Struct` subclass\n"); static PyObject *pyrna_struct_bl_rna_get_subclass(PyObject *cls, PyObject *args) { const char *id; @@ -4244,10 +4278,13 @@ static PyObject *pyrna_struct_dir(BPy_StructRNA *self) return ret; } -PyDoc_STRVAR(pyrna_struct_id_properties_ensure_doc, - ".. method:: id_properties_ensure()\n\n" - " :return: the parent group for an RNA struct's custom IDProperties.\n" - " :rtype: :class:`bpy.types.IDPropertyGroup`\n"); +PyDoc_STRVAR( + /* Wrap. */ + pyrna_struct_id_properties_ensure_doc, + ".. method:: id_properties_ensure()\n" + "\n" + " :return: the parent group for an RNA struct's custom IDProperties.\n" + " :rtype: :class:`bpy.types.IDPropertyGroup`\n"); static PyObject *pyrna_struct_id_properties_ensure(BPy_StructRNA *self) { PYRNA_STRUCT_CHECK_OBJ(self); @@ -4272,12 +4309,14 @@ static PyObject *pyrna_struct_id_properties_ensure(BPy_StructRNA *self) return (PyObject *)group; } -PyDoc_STRVAR(pyrna_struct_id_properties_ui_doc, - ".. method:: id_properties_ui(key)\n" - "\n" - " :return: Return an object used to manage an IDProperty's UI data.\n" - " :arg key: String name of the property.\n" - " :rtype: :class:`bpy.types.IDPropertyUIManager`\n"); +PyDoc_STRVAR( + /* Wrap. */ + pyrna_struct_id_properties_ui_doc, + ".. method:: id_properties_ui(key)\n" + "\n" + " :return: Return an object used to manage an IDProperty's UI data.\n" + " :arg key: String name of the property.\n" + " :rtype: :class:`bpy.types.IDPropertyUIManager`\n"); static PyObject *pyrna_struct_id_properties_ui(BPy_StructRNA *self, PyObject *args) { PYRNA_STRUCT_CHECK_OBJ(self); @@ -4317,9 +4356,12 @@ static PyObject *pyrna_struct_id_properties_ui(BPy_StructRNA *self, PyObject *ar return (PyObject *)ui_manager; } -PyDoc_STRVAR(pyrna_struct_id_properties_clear_doc, - ".. method:: id_properties_clear()\n\n" - " :return: Remove the parent group for an RNA struct's custom IDProperties.\n"); +PyDoc_STRVAR( + /* Wrap. */ + pyrna_struct_id_properties_clear_doc, + ".. method:: id_properties_clear()\n" + "\n" + " :return: Remove the parent group for an RNA struct's custom IDProperties.\n"); static PyObject *pyrna_struct_id_properties_clear(BPy_StructRNA *self) { PYRNA_STRUCT_CHECK_OBJ(self); @@ -4903,9 +4945,11 @@ static PyObject *pyrna_prop_collection_idprop_move(BPy_PropertyRNA *self, PyObje Py_RETURN_NONE; } -PyDoc_STRVAR(pyrna_struct_get_id_data_doc, - "The :class:`bpy.types.ID` object this datablock is from or None, (not available for " - "all data types)"); +PyDoc_STRVAR( + /* Wrap. */ + pyrna_struct_get_id_data_doc, + "The :class:`bpy.types.ID` object this datablock is from or None, (not available for " + "all data types)"); static PyObject *pyrna_struct_get_id_data(BPy_DummyPointerRNA *self, void * /*closure*/) { /* Used for struct and pointer since both have a ptr. */ @@ -4917,14 +4961,19 @@ static PyObject *pyrna_struct_get_id_data(BPy_DummyPointerRNA *self, void * /*cl Py_RETURN_NONE; } -PyDoc_STRVAR(pyrna_struct_get_data_doc, - "The data this property is using, *type* :class:`bpy.types.bpy_struct`"); +PyDoc_STRVAR( + /* Wrap. */ + pyrna_struct_get_data_doc, + "The data this property is using, *type* :class:`bpy.types.bpy_struct`"); static PyObject *pyrna_struct_get_data(BPy_DummyPointerRNA *self, void * /*closure*/) { return pyrna_struct_CreatePyObject(&self->ptr); } -PyDoc_STRVAR(pyrna_struct_get_rna_type_doc, "The property type for introspection"); +PyDoc_STRVAR( + /* Wrap. */ + pyrna_struct_get_rna_type_doc, + "The property type for introspection"); static PyObject *pyrna_struct_get_rna_type(BPy_PropertyRNA *self, void * /*closure*/) { PointerRNA tptr = RNA_pointer_create(nullptr, &RNA_Property, self->prop); @@ -4966,14 +5015,16 @@ static PyGetSetDef pyrna_func_getseters[] = { {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */ }; -PyDoc_STRVAR(pyrna_prop_collection_keys_doc, - ".. method:: keys()\n" - "\n" - " Return the identifiers of collection members\n" - " (matching Python's dict.keys() functionality).\n" - "\n" - " :return: the identifiers for each member of this collection.\n" - " :rtype: list of strings\n"); +PyDoc_STRVAR( + /* Wrap. */ + pyrna_prop_collection_keys_doc, + ".. method:: keys()\n" + "\n" + " Return the identifiers of collection members\n" + " (matching Python's dict.keys() functionality).\n" + "\n" + " :return: the identifiers for each member of this collection.\n" + " :rtype: list of strings\n"); static PyObject *pyrna_prop_collection_keys(BPy_PropertyRNA *self) { PyObject *ret = PyList_New(0); @@ -4996,14 +5047,16 @@ static PyObject *pyrna_prop_collection_keys(BPy_PropertyRNA *self) return ret; } -PyDoc_STRVAR(pyrna_prop_collection_items_doc, - ".. method:: items()\n" - "\n" - " Return the identifiers of collection members\n" - " (matching Python's dict.items() functionality).\n" - "\n" - " :return: (key, value) pairs for each member of this collection.\n" - " :rtype: list of tuples\n"); +PyDoc_STRVAR( + /* Wrap. */ + pyrna_prop_collection_items_doc, + ".. method:: items()\n" + "\n" + " Return the identifiers of collection members\n" + " (matching Python's dict.items() functionality).\n" + "\n" + " :return: (key, value) pairs for each member of this collection.\n" + " :rtype: list of tuples\n"); static PyObject *pyrna_prop_collection_items(BPy_PropertyRNA *self) { PyObject *ret = PyList_New(0); @@ -5039,32 +5092,36 @@ static PyObject *pyrna_prop_collection_items(BPy_PropertyRNA *self) return ret; } -PyDoc_STRVAR(pyrna_prop_collection_values_doc, - ".. method:: values()\n" - "\n" - " Return the values of collection\n" - " (matching Python's dict.values() functionality).\n" - "\n" - " :return: the members of this collection.\n" - " :rtype: list\n"); +PyDoc_STRVAR( + /* Wrap. */ + pyrna_prop_collection_values_doc, + ".. method:: values()\n" + "\n" + " Return the values of collection\n" + " (matching Python's dict.values() functionality).\n" + "\n" + " :return: the members of this collection.\n" + " :rtype: list\n"); static PyObject *pyrna_prop_collection_values(BPy_PropertyRNA *self) { /* Re-use slice. */ return pyrna_prop_collection_subscript_slice(self, 0, PY_SSIZE_T_MAX); } -PyDoc_STRVAR(pyrna_struct_get_doc, - ".. method:: get(key, default=None)\n" - "\n" - " Returns the value of the custom property assigned to key or default\n" - " when not found (matches Python's dictionary function of the same name).\n" - "\n" - " :arg key: The key associated with the custom property.\n" - " :type key: string\n" - " :arg default: Optional argument for the value to return if\n" - " *key* is not found.\n" - " :type default: Undefined\n" - "\n" BPY_DOC_ID_PROP_TYPE_NOTE); +PyDoc_STRVAR( + /* Wrap. */ + pyrna_struct_get_doc, + ".. method:: get(key, default=None)\n" + "\n" + " Returns the value of the custom property assigned to key or default\n" + " when not found (matches Python's dictionary function of the same name).\n" + "\n" + " :arg key: The key associated with the custom property.\n" + " :type key: string\n" + " :arg default: Optional argument for the value to return if\n" + " *key* is not found.\n" + " :type default: Undefined\n" + "\n" BPY_DOC_ID_PROP_TYPE_NOTE); static PyObject *pyrna_struct_get(BPy_StructRNA *self, PyObject *args) { IDProperty *group, *idprop; @@ -5096,18 +5153,20 @@ static PyObject *pyrna_struct_get(BPy_StructRNA *self, PyObject *args) return Py_INCREF_RET(def); } -PyDoc_STRVAR(pyrna_struct_pop_doc, - ".. method:: pop(key, default=None)\n" - "\n" - " Remove and return the value of the custom property assigned to key or default\n" - " when not found (matches Python's dictionary function of the same name).\n" - "\n" - " :arg key: The key associated with the custom property.\n" - " :type key: string\n" - " :arg default: Optional argument for the value to return if\n" - " *key* is not found.\n" - " :type default: Undefined\n" - "\n" BPY_DOC_ID_PROP_TYPE_NOTE); +PyDoc_STRVAR( + /* Wrap. */ + pyrna_struct_pop_doc, + ".. method:: pop(key, default=None)\n" + "\n" + " Remove and return the value of the custom property assigned to key or default\n" + " when not found (matches Python's dictionary function of the same name).\n" + "\n" + " :arg key: The key associated with the custom property.\n" + " :type key: string\n" + " :arg default: Optional argument for the value to return if\n" + " *key* is not found.\n" + " :type default: Undefined\n" + "\n" BPY_DOC_ID_PROP_TYPE_NOTE); static PyObject *pyrna_struct_pop(BPy_StructRNA *self, PyObject *args) { IDProperty *group, *idprop; @@ -5150,32 +5209,36 @@ static PyObject *pyrna_struct_pop(BPy_StructRNA *self, PyObject *args) return Py_INCREF_RET(def); } -PyDoc_STRVAR(pyrna_struct_as_pointer_doc, - ".. method:: as_pointer()\n" - "\n" - " Returns the memory address which holds a pointer to Blender's internal data\n" - "\n" - " :return: int (memory address).\n" - " :rtype: int\n" - "\n" - " .. note:: This is intended only for advanced script writers who need to\n" - " pass blender data to their own C/Python modules.\n"); +PyDoc_STRVAR( + /* Wrap. */ + pyrna_struct_as_pointer_doc, + ".. method:: as_pointer()\n" + "\n" + " Returns the memory address which holds a pointer to Blender's internal data\n" + "\n" + " :return: int (memory address).\n" + " :rtype: int\n" + "\n" + " .. note:: This is intended only for advanced script writers who need to\n" + " pass blender data to their own C/Python modules.\n"); static PyObject *pyrna_struct_as_pointer(BPy_StructRNA *self) { return PyLong_FromVoidPtr(self->ptr.data); } -PyDoc_STRVAR(pyrna_prop_collection_get_doc, - ".. method:: get(key, default=None)\n" - "\n" - " Returns the value of the item assigned to key or default when not found\n" - " (matches Python's dictionary function of the same name).\n" - "\n" - " :arg key: The identifier for the collection member.\n" - " :type key: string\n" - " :arg default: Optional argument for the value to return if\n" - " *key* is not found.\n" - " :type default: Undefined\n"); +PyDoc_STRVAR( + /* Wrap. */ + pyrna_prop_collection_get_doc, + ".. method:: get(key, default=None)\n" + "\n" + " Returns the value of the item assigned to key or default when not found\n" + " (matches Python's dictionary function of the same name).\n" + "\n" + " :arg key: The identifier for the collection member.\n" + " :type key: string\n" + " :arg default: Optional argument for the value to return if\n" + " *key* is not found.\n" + " :type default: Undefined\n"); static PyObject *pyrna_prop_collection_get(BPy_PropertyRNA *self, PyObject *args) { PointerRNA newptr; @@ -5217,16 +5280,18 @@ static PyObject *pyrna_prop_collection_get(BPy_PropertyRNA *self, PyObject *args return Py_INCREF_RET(def); } -PyDoc_STRVAR(pyrna_prop_collection_find_doc, - ".. method:: find(key)\n" - "\n" - " Returns the index of a key in a collection or -1 when not found\n" - " (matches Python's string find function of the same name).\n" - "\n" - " :arg key: The identifier for the collection member.\n" - " :type key: string\n" - " :return: index of the key.\n" - " :rtype: int\n"); +PyDoc_STRVAR( + /* Wrap. */ + pyrna_prop_collection_find_doc, + ".. method:: find(key)\n" + "\n" + " Returns the index of a key in a collection or -1 when not found\n" + " (matches Python's string find function of the same name).\n" + "\n" + " :arg key: The identifier for the collection member.\n" + " :type key: string\n" + " :return: index of the key.\n" + " :rtype: int\n"); static PyObject *pyrna_prop_collection_find(BPy_PropertyRNA *self, PyObject *key_ob) { Py_ssize_t key_len_ssize; @@ -5668,10 +5733,12 @@ static PyObject *foreach_getset(BPy_PropertyRNA *self, PyObject *args, int set) Py_RETURN_NONE; } -PyDoc_STRVAR(pyrna_prop_collection_foreach_get_doc, - ".. method:: foreach_get(attr, seq)\n" - "\n" - " This is a function to give fast access to attributes within a collection.\n"); +PyDoc_STRVAR( + /* Wrap. */ + pyrna_prop_collection_foreach_get_doc, + ".. method:: foreach_get(attr, seq)\n" + "\n" + " This is a function to give fast access to attributes within a collection.\n"); static PyObject *pyrna_prop_collection_foreach_get(BPy_PropertyRNA *self, PyObject *args) { PYRNA_PROP_CHECK_OBJ(self); @@ -5679,10 +5746,12 @@ static PyObject *pyrna_prop_collection_foreach_get(BPy_PropertyRNA *self, PyObje return foreach_getset(self, args, 0); } -PyDoc_STRVAR(pyrna_prop_collection_foreach_set_doc, - ".. method:: foreach_set(attr, seq)\n" - "\n" - " This is a function to give fast access to attributes within a collection.\n"); +PyDoc_STRVAR( + /* Wrap. */ + pyrna_prop_collection_foreach_set_doc, + ".. method:: foreach_set(attr, seq)\n" + "\n" + " This is a function to give fast access to attributes within a collection.\n"); static PyObject *pyrna_prop_collection_foreach_set(BPy_PropertyRNA *self, PyObject *args) { PYRNA_PROP_CHECK_OBJ(self); @@ -5840,10 +5909,12 @@ static PyObject *pyprop_array_foreach_getset(BPy_PropertyArrayRNA *self, Py_RETURN_NONE; } -PyDoc_STRVAR(pyrna_prop_array_foreach_get_doc, - ".. method:: foreach_get(seq)\n" - "\n" - " This is a function to give fast access to array data.\n"); +PyDoc_STRVAR( + /* Wrap. */ + pyrna_prop_array_foreach_get_doc, + ".. method:: foreach_get(seq)\n" + "\n" + " This is a function to give fast access to array data.\n"); static PyObject *pyrna_prop_array_foreach_get(BPy_PropertyArrayRNA *self, PyObject *args) { PYRNA_PROP_CHECK_OBJ((BPy_PropertyRNA *)self); @@ -5851,10 +5922,12 @@ static PyObject *pyrna_prop_array_foreach_get(BPy_PropertyArrayRNA *self, PyObje return pyprop_array_foreach_getset(self, args, false); } -PyDoc_STRVAR(pyrna_prop_array_foreach_set_doc, - ".. method:: foreach_set(seq)\n" - "\n" - " This is a function to give fast access to array data.\n"); +PyDoc_STRVAR( + /* Wrap. */ + pyrna_prop_array_foreach_set_doc, + ".. method:: foreach_set(seq)\n" + "\n" + " This is a function to give fast access to array data.\n"); static PyObject *pyrna_prop_array_foreach_set(BPy_PropertyArrayRNA *self, PyObject *args) { PYRNA_PROP_CHECK_OBJ((BPy_PropertyRNA *)self); @@ -7912,7 +7985,10 @@ static PyMethodDef bpy_types_module_methods[] = { # pragma GCC diagnostic pop #endif -PyDoc_STRVAR(bpy_types_module_doc, "Access to internal Blender types"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_types_module_doc, + "Access to internal Blender types"); static PyModuleDef bpy_types_module_def = { /*m_base*/ PyModuleDef_HEAD_INIT, /*m_name*/ "bpy.types", @@ -8960,25 +9036,27 @@ void pyrna_free_types() * (continuously running `SCRIPT_OT_reload`). * This should still be fixed. */ -PyDoc_STRVAR(pyrna_register_class_doc, - ".. function:: register_class(cls)\n" - "\n" - " Register a subclass of a Blender type class.\n" - "\n" - " :arg cls: Blender type class in:\n" - " :class:`bpy.types.Panel`, :class:`bpy.types.UIList`,\n" - " :class:`bpy.types.Menu`, :class:`bpy.types.Header`,\n" - " :class:`bpy.types.Operator`, :class:`bpy.types.KeyingSetInfo`,\n" - " :class:`bpy.types.RenderEngine`, :class:`bpy.types.AssetShelf`,\n" - " :class:`bpy.types.FileHandler`\n" - " :type cls: class\n" - " :raises ValueError:\n" - " if the class is not a subclass of a registerable blender class.\n" - "\n" - " .. note::\n" - "\n" - " If the class has a *register* class method it will be called\n" - " before registration.\n"); +PyDoc_STRVAR( + /* Wrap. */ + pyrna_register_class_doc, + ".. function:: register_class(cls)\n" + "\n" + " Register a subclass of a Blender type class.\n" + "\n" + " :arg cls: Blender type class in:\n" + " :class:`bpy.types.Panel`, :class:`bpy.types.UIList`,\n" + " :class:`bpy.types.Menu`, :class:`bpy.types.Header`,\n" + " :class:`bpy.types.Operator`, :class:`bpy.types.KeyingSetInfo`,\n" + " :class:`bpy.types.RenderEngine`, :class:`bpy.types.AssetShelf`,\n" + " :class:`bpy.types.FileHandler`\n" + " :type cls: class\n" + " :raises ValueError:\n" + " if the class is not a subclass of a registerable blender class.\n" + "\n" + " .. note::\n" + "\n" + " If the class has a *register* class method it will be called\n" + " before registration.\n"); PyMethodDef meth_bpy_register_class = { "register_class", pyrna_register_class, METH_O, pyrna_register_class_doc}; static PyObject *pyrna_register_class(PyObject * /*self*/, PyObject *py_class) @@ -9145,20 +9223,22 @@ static int pyrna_srna_contains_pointer_prop_srna(StructRNA *srna_props, return 0; } -PyDoc_STRVAR(pyrna_unregister_class_doc, - ".. function:: unregister_class(cls)\n" - "\n" - " Unload the Python class from blender.\n" - "\n" - " :arg cls: Blender type class, \n" - " see :mod:`bpy.utils.register_class` for classes which can \n" - " be registered.\n" - " :type cls: class\n" - "\n" - " .. note::\n" - "\n" - " If the class has an *unregister* class method it will be called\n" - " before unregistering.\n"); +PyDoc_STRVAR( + /* Wrap. */ + pyrna_unregister_class_doc, + ".. function:: unregister_class(cls)\n" + "\n" + " Unload the Python class from blender.\n" + "\n" + " :arg cls: Blender type class, \n" + " see :mod:`bpy.utils.register_class` for classes which can \n" + " be registered.\n" + " :type cls: class\n" + "\n" + " .. note::\n" + "\n" + " If the class has an *unregister* class method it will be called\n" + " before unregistering.\n"); PyMethodDef meth_bpy_unregister_class = { "unregister_class", pyrna_unregister_class, diff --git a/source/blender/python/intern/bpy_rna_context.cc b/source/blender/python/intern/bpy_rna_context.cc index 9a769c64786..c3cfa090cf3 100644 --- a/source/blender/python/intern/bpy_rna_context.cc +++ b/source/blender/python/intern/bpy_rna_context.cc @@ -542,31 +542,33 @@ static PyObject *bpy_context_temp_override_extract_known_args(const char *const return kwds_parse; } -PyDoc_STRVAR(bpy_context_temp_override_doc, - ".. method:: temp_override(window, area, region, **keywords)\n" - "\n" - " Context manager to temporarily override members in the context.\n" - "\n" - " :arg window: Window override or None.\n" - " :type window: :class:`bpy.types.Window`\n" - " :arg screen: Screen override or None.\n" - "\n" - " .. note:: Switching to or away from full-screen areas & temporary screens " - "isn't supported. Passing in these screens will raise an exception, " - "actions that leave the context such screens won't restore the prior screen.\n" - "\n" - " .. note:: Changing the screen has wider implications " - "than other arguments as it will also change the works-space " - "and potentially the scene (when pinned).\n" - "\n" - " :type screen: :class:`bpy.types.Screen`\n" - " :arg area: Area override or None.\n" - " :type area: :class:`bpy.types.Area`\n" - " :arg region: Region override or None.\n" - " :type region: :class:`bpy.types.Region`\n" - " :arg keywords: Additional keywords override context members.\n" - " :return: The context manager .\n" - " :rtype: context manager\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_context_temp_override_doc, + ".. method:: temp_override(window, area, region, **keywords)\n" + "\n" + " Context manager to temporarily override members in the context.\n" + "\n" + " :arg window: Window override or None.\n" + " :type window: :class:`bpy.types.Window`\n" + " :arg screen: Screen override or None.\n" + "\n" + " .. note:: Switching to or away from full-screen areas & temporary screens " + "isn't supported. Passing in these screens will raise an exception, " + "actions that leave the context such screens won't restore the prior screen.\n" + "\n" + " .. note:: Changing the screen has wider implications " + "than other arguments as it will also change the works-space " + "and potentially the scene (when pinned).\n" + "\n" + " :type screen: :class:`bpy.types.Screen`\n" + " :arg area: Area override or None.\n" + " :type area: :class:`bpy.types.Area`\n" + " :arg region: Region override or None.\n" + " :type region: :class:`bpy.types.Region`\n" + " :arg keywords: Additional keywords override context members.\n" + " :return: The context manager .\n" + " :rtype: context manager\n"); static PyObject *bpy_context_temp_override(PyObject *self, PyObject *args, PyObject *kwds) { const PointerRNA *context_ptr = pyrna_struct_as_ptr(self, &RNA_Context); diff --git a/source/blender/python/intern/bpy_rna_data.cc b/source/blender/python/intern/bpy_rna_data.cc index 7ed8b0fa11a..a6b54efa1b2 100644 --- a/source/blender/python/intern/bpy_rna_data.cc +++ b/source/blender/python/intern/bpy_rna_data.cc @@ -126,17 +126,19 @@ static PyTypeObject bpy_rna_data_context_Type = { /*tp_vectorcall*/ nullptr, }; -PyDoc_STRVAR(bpy_rna_data_context_load_doc, - ".. method:: temp_data(filepath=None)\n" - "\n" - " A context manager that temporarily creates blender file data.\n" - "\n" - " :arg filepath: The file path for the newly temporary data. " - "When None, the path of the currently open file is used.\n" - " :type filepath: str, bytes or NoneType\n" - "\n" - " :return: Blend file data which is freed once the context exists.\n" - " :rtype: :class:`bpy.types.BlendData`\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_rna_data_context_load_doc, + ".. method:: temp_data(filepath=None)\n" + "\n" + " A context manager that temporarily creates blender file data.\n" + "\n" + " :arg filepath: The file path for the newly temporary data. " + "When None, the path of the currently open file is used.\n" + " :type filepath: str, bytes or NoneType\n" + "\n" + " :return: Blend file data which is freed once the context exists.\n" + " :rtype: :class:`bpy.types.BlendData`\n"); static PyObject *bpy_rna_data_temp_data(PyObject * /*self*/, PyObject *args, PyObject *kw) { diff --git a/source/blender/python/intern/bpy_rna_gizmo.cc b/source/blender/python/intern/bpy_rna_gizmo.cc index 67fce3c6a18..9a04bf307d8 100644 --- a/source/blender/python/intern/bpy_rna_gizmo.cc +++ b/source/blender/python/intern/bpy_rna_gizmo.cc @@ -319,6 +319,7 @@ static void py_rna_gizmo_handler_free_cb(const wmGizmo * /*gz*/, wmGizmoProperty } PyDoc_STRVAR( + /* Wrap. */ bpy_gizmo_target_set_handler_doc, ".. method:: target_set_handler(target, get, set, range=None):\n" "\n" @@ -434,15 +435,17 @@ fail: /** \name Gizmo Target Property Access API * \{ */ -PyDoc_STRVAR(bpy_gizmo_target_get_value_doc, - ".. method:: target_get_value(target):\n" - "\n" - " Get the value of this target property.\n" - "\n" - " :arg target: Target property name.\n" - " :type target: string\n" - " :return: The value of the target property.\n" - " :rtype: Single value or array based on the target type\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_gizmo_target_get_value_doc, + ".. method:: target_get_value(target):\n" + "\n" + " Get the value of this target property.\n" + "\n" + " :arg target: Target property name.\n" + " :type target: string\n" + " :return: The value of the target property.\n" + " :rtype: Single value or array based on the target type\n"); static PyObject *bpy_gizmo_target_get_value(PyObject * /*self*/, PyObject *args, PyObject *kw) { struct { @@ -505,13 +508,15 @@ fail: return nullptr; } -PyDoc_STRVAR(bpy_gizmo_target_set_value_doc, - ".. method:: target_set_value(target):\n" - "\n" - " Set the value of this target property.\n" - "\n" - " :arg target: Target property name.\n" - " :type target: string\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_gizmo_target_set_value_doc, + ".. method:: target_set_value(target):\n" + "\n" + " Set the value of this target property.\n" + "\n" + " :arg target: Target property name.\n" + " :type target: string\n"); static PyObject *bpy_gizmo_target_set_value(PyObject * /*self*/, PyObject *args, PyObject *kw) { struct { @@ -590,14 +595,16 @@ fail: return nullptr; } -PyDoc_STRVAR(bpy_gizmo_target_get_range_doc, - ".. method:: target_get_range(target):\n" - "\n" - " Get the range for this target property.\n" - "\n" - " :arg target: Target property name.\n" - " :return: The range of this property (min, max).\n" - " :rtype: tuple pair.\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_gizmo_target_get_range_doc, + ".. method:: target_get_range(target):\n" + "\n" + " Get the range for this target property.\n" + "\n" + " :arg target: Target property name.\n" + " :return: The range of this property (min, max).\n" + " :rtype: tuple pair.\n"); static PyObject *bpy_gizmo_target_get_range(PyObject * /*self*/, PyObject *args, PyObject *kw) { struct { diff --git a/source/blender/python/intern/bpy_rna_id_collection.cc b/source/blender/python/intern/bpy_rna_id_collection.cc index 201d2ba5986..c72e002bdb6 100644 --- a/source/blender/python/intern/bpy_rna_id_collection.cc +++ b/source/blender/python/intern/bpy_rna_id_collection.cc @@ -119,25 +119,27 @@ static int foreach_libblock_id_user_map_callback(LibraryIDLinkCallbackData *cb_d return IDWALK_RET_NOP; } -PyDoc_STRVAR(bpy_user_map_doc, - ".. method:: user_map(subset, key_types, value_types)\n" - "\n" - " Returns a mapping of all ID data-blocks in current ``bpy.data`` to a set of all " - "datablocks using them.\n" - "\n" - " For list of valid set members for key_types & value_types, see: " - ":class:`bpy.types.KeyingSetPath.id_type`.\n" - "\n" - " :arg subset: When passed, only these data-blocks and their users will be " - "included as keys/values in the map.\n" - " :type subset: sequence\n" - " :arg key_types: Filter the keys mapped by ID types.\n" - " :type key_types: set of strings\n" - " :arg value_types: Filter the values in the set by ID types.\n" - " :type value_types: set of strings\n" - " :return: dictionary of :class:`bpy.types.ID` instances, with sets of ID's as " - "their values.\n" - " :rtype: dict\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_user_map_doc, + ".. method:: user_map(subset, key_types, value_types)\n" + "\n" + " Returns a mapping of all ID data-blocks in current ``bpy.data`` to a set of all " + "datablocks using them.\n" + "\n" + " For list of valid set members for key_types & value_types, see: " + ":class:`bpy.types.KeyingSetPath.id_type`.\n" + "\n" + " :arg subset: When passed, only these data-blocks and their users will be " + "included as keys/values in the map.\n" + " :type subset: sequence\n" + " :arg key_types: Filter the keys mapped by ID types.\n" + " :type key_types: set of strings\n" + " :arg value_types: Filter the values in the set by ID types.\n" + " :type value_types: set of strings\n" + " :return: dictionary of :class:`bpy.types.ID` instances, with sets of ID's as " + "their values.\n" + " :rtype: dict\n"); static PyObject *bpy_user_map(PyObject * /*self*/, PyObject *args, PyObject *kwds) { #if 0 /* If someone knows how to get a proper 'self' in that case... */ @@ -277,20 +279,22 @@ error: return ret; } -PyDoc_STRVAR(bpy_batch_remove_doc, - ".. method:: batch_remove(ids)\n" - "\n" - " Remove (delete) several IDs at once.\n" - "\n" - " WARNING: Considered experimental feature currently.\n" - "\n" - " Note that this function is quicker than individual calls to :func:`remove()` " - "(from :class:`bpy.types.BlendData`\n" - " ID collections), but less safe/versatile (it can break Blender, e.g. by removing " - "all scenes...).\n" - "\n" - " :arg ids: Iterables of IDs (types can be mixed).\n" - " :type subset: sequence\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_batch_remove_doc, + ".. method:: batch_remove(ids)\n" + "\n" + " Remove (delete) several IDs at once.\n" + "\n" + " WARNING: Considered experimental feature currently.\n" + "\n" + " Note that this function is quicker than individual calls to :func:`remove()` " + "(from :class:`bpy.types.BlendData`\n" + " ID collections), but less safe/versatile (it can break Blender, e.g. by removing " + "all scenes...).\n" + "\n" + " :arg ids: Iterables of IDs (types can be mixed).\n" + " :type subset: sequence\n"); static PyObject *bpy_batch_remove(PyObject * /*self*/, PyObject *args, PyObject *kwds) { #if 0 /* If someone knows how to get a proper 'self' in that case... */ @@ -355,19 +359,21 @@ error: return ret; } -PyDoc_STRVAR(bpy_orphans_purge_doc, - ".. method:: orphans_purge()\n" - "\n" - " Remove (delete) all IDs with no user.\n" - "\n" - " :arg do_local_ids: Include unused local IDs in the deletion, defaults to True\n" - " :type do_local_ids: bool, optional\n" - " :arg do_linked_ids: Include unused linked IDs in the deletion, defaults to True\n" - " :type do_linked_ids: bool, optional\n" - " :arg do_recursive: Recursively check for unused IDs, ensuring no orphaned one " - "remain after a single run of that function, defaults to False\n" - " :type do_recursive: bool, optional\n" - " :return: The number of deleted IDs.\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_orphans_purge_doc, + ".. method:: orphans_purge()\n" + "\n" + " Remove (delete) all IDs with no user.\n" + "\n" + " :arg do_local_ids: Include unused local IDs in the deletion, defaults to True\n" + " :type do_local_ids: bool, optional\n" + " :arg do_linked_ids: Include unused linked IDs in the deletion, defaults to True\n" + " :type do_linked_ids: bool, optional\n" + " :arg do_recursive: Recursively check for unused IDs, ensuring no orphaned one " + "remain after a single run of that function, defaults to False\n" + " :type do_recursive: bool, optional\n" + " :return: The number of deleted IDs.\n"); static PyObject *bpy_orphans_purge(PyObject * /*self*/, PyObject *args, PyObject *kwds) { #if 0 /* If someone knows how to get a proper 'self' in that case... */ diff --git a/source/blender/python/intern/bpy_rna_operator.cc b/source/blender/python/intern/bpy_rna_operator.cc index eb26ca99710..7f15ea5fc88 100644 --- a/source/blender/python/intern/bpy_rna_operator.cc +++ b/source/blender/python/intern/bpy_rna_operator.cc @@ -82,16 +82,18 @@ static void pyop_poll_message_free_fn(bContext * /*C*/, void *user_data) BPY_DECREF(user_data); } -PyDoc_STRVAR(BPY_rna_operator_poll_message_set_doc, - ".. classmethod:: poll_message_set(message, *args)\n" - "\n" - " Set the message to show in the tool-tip when poll fails.\n" - "\n" - " When message is callable, " - "additional user defined positional arguments are passed to the message function.\n" - "\n" - " :arg message: The message or a function that returns the message.\n" - " :type message: string or a callable that returns a string or None.\n"); +PyDoc_STRVAR( + /* Wrap. */ + BPY_rna_operator_poll_message_set_doc, + ".. classmethod:: poll_message_set(message, *args)\n" + "\n" + " Set the message to show in the tool-tip when poll fails.\n" + "\n" + " When message is callable, " + "additional user defined positional arguments are passed to the message function.\n" + "\n" + " :arg message: The message or a function that returns the message.\n" + " :type message: string or a callable that returns a string or None.\n"); static PyObject *BPY_rna_operator_poll_message_set(PyObject * /*self*/, PyObject *args) { diff --git a/source/blender/python/intern/bpy_rna_text.cc b/source/blender/python/intern/bpy_rna_text.cc index 5dfd9163d03..a7054f557c2 100644 --- a/source/blender/python/intern/bpy_rna_text.cc +++ b/source/blender/python/intern/bpy_rna_text.cc @@ -46,18 +46,20 @@ struct TextRegion { /** \name Text Editor Get / Set region text API * \{ */ -PyDoc_STRVAR(bpy_rna_region_as_string_doc, - ".. method:: region_as_string(range=None)\n" - "\n" - " :arg range: The region of text to be returned, " - "defaulting to the selection when no range is passed.\n" - " Each int pair represents a line and column: " - "((start_line, start_column), (end_line, end_column))\n" - " The values match Python's slicing logic " - "(negative values count backwards from the end, the end value is not inclusive).\n" - " :type range: Two pairs of ints\n" - " :return: The specified region as a string.\n" - " :rtype: str.\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_rna_region_as_string_doc, + ".. method:: region_as_string(range=None)\n" + "\n" + " :arg range: The region of text to be returned, " + "defaulting to the selection when no range is passed.\n" + " Each int pair represents a line and column: " + "((start_line, start_column), (end_line, end_column))\n" + " The values match Python's slicing logic " + "(negative values count backwards from the end, the end value is not inclusive).\n" + " :type range: Two pairs of ints\n" + " :return: The specified region as a string.\n" + " :rtype: str.\n"); /* Receive a Python Tuple as parameter to represent the region range. */ static PyObject *bpy_rna_region_as_string(PyObject *self, PyObject *args, PyObject *kwds) { @@ -112,18 +114,20 @@ PyMethodDef BPY_rna_region_as_string_method_def = { # pragma GCC diagnostic pop #endif -PyDoc_STRVAR(bpy_rna_region_from_string_doc, - ".. method:: region_from_string(body, range=None)\n" - "\n" - " :arg body: The text to be inserted.\n" - " :type body: str\n" - " :arg range: The region of text to be returned, " - "defaulting to the selection when no range is passed.\n" - " Each int pair represents a line and column: " - "((start_line, start_column), (end_line, end_column))\n" - " The values match Python's slicing logic " - "(negative values count backwards from the end, the end value is not inclusive).\n" - " :type range: Two pairs of ints\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_rna_region_from_string_doc, + ".. method:: region_from_string(body, range=None)\n" + "\n" + " :arg body: The text to be inserted.\n" + " :type body: str\n" + " :arg range: The region of text to be returned, " + "defaulting to the selection when no range is passed.\n" + " Each int pair represents a line and column: " + "((start_line, start_column), (end_line, end_column))\n" + " The values match Python's slicing logic " + "(negative values count backwards from the end, the end value is not inclusive).\n" + " :type range: Two pairs of ints\n"); static PyObject *bpy_rna_region_from_string(PyObject *self, PyObject *args, PyObject *kwds) { BPy_StructRNA *pyrna = (BPy_StructRNA *)self; diff --git a/source/blender/python/intern/bpy_rna_types_capi.cc b/source/blender/python/intern/bpy_rna_types_capi.cc index bd5115748ce..f68f1427b20 100644 --- a/source/blender/python/intern/bpy_rna_types_capi.cc +++ b/source/blender/python/intern/bpy_rna_types_capi.cc @@ -109,7 +109,12 @@ static PyMethodDef pyrna_text_methods[] = { * and creating the buffer, causing writes past the allocated length. * \{ */ -PyDoc_STRVAR(pyrna_WindowManager_clipboard_doc, "Clipboard text storage.\n\n:type: string"); +PyDoc_STRVAR( + /* Wrap. */ + pyrna_WindowManager_clipboard_doc, + "Clipboard text storage.\n" + "\n" + ":type: string"); static PyObject *pyrna_WindowManager_clipboard_get(PyObject * /*self*/, void * /*flag*/) { int text_len = 0; @@ -141,6 +146,7 @@ static int pyrna_WindowManager_clipboard_set(PyObject * /*self*/, PyObject *valu * \{ */ PyDoc_STRVAR( + /* Wrap. */ pyrna_draw_cursor_add_doc, ".. classmethod:: draw_cursor_add(callback, args, space_type, region_type)\n" "\n" @@ -165,13 +171,15 @@ PyDoc_STRVAR( " :return: Handler that can be removed later on.\n" " :rtype: object\n"); -PyDoc_STRVAR(pyrna_draw_cursor_remove_doc, - ".. classmethod:: draw_cursor_remove(handler)\n" - "\n" - " Remove a draw cursor handler that was added previously.\n" - "\n" - " :arg handler: The draw cursor handler that should be removed.\n" - " :type handler: object\n"); +PyDoc_STRVAR( + /* Wrap. */ + pyrna_draw_cursor_remove_doc, + ".. classmethod:: draw_cursor_remove(handler)\n" + "\n" + " Remove a draw cursor handler that was added previously.\n" + "\n" + " :arg handler: The draw cursor handler that should be removed.\n" + " :type handler: object\n"); static PyMethodDef pyrna_windowmanager_methods[] = { {"draw_cursor_add", @@ -212,6 +220,7 @@ static PyMethodDef pyrna_context_methods[] = { * \{ */ PyDoc_STRVAR( + /* Wrap. */ pyrna_draw_handler_add_doc, ".. classmethod:: draw_handler_add(callback, args, region_type, draw_type)\n" "\n" @@ -235,15 +244,17 @@ PyDoc_STRVAR( " :return: Handler that can be removed later on.\n" " :rtype: object"); -PyDoc_STRVAR(pyrna_draw_handler_remove_doc, - ".. classmethod:: draw_handler_remove(handler, region_type)\n" - "\n" - " Remove a draw handler that was added previously.\n" - "\n" - " :arg handler: The draw handler that should be removed.\n" - " :type handler: object\n" - " :arg region_type: Region type the callback was added to.\n" - " :type region_type: str\n"); +PyDoc_STRVAR( + /* Wrap. */ + pyrna_draw_handler_remove_doc, + ".. classmethod:: draw_handler_remove(handler, region_type)\n" + "\n" + " Remove a draw handler that was added previously.\n" + "\n" + " :arg handler: The draw handler that should be removed.\n" + " :type handler: object\n" + " :arg region_type: Region type the callback was added to.\n" + " :type region_type: str\n"); static PyMethodDef pyrna_space_methods[] = { {"draw_handler_add", diff --git a/source/blender/python/intern/bpy_rna_ui.cc b/source/blender/python/intern/bpy_rna_ui.cc index e0a5b695b5d..6d8f3898840 100644 --- a/source/blender/python/intern/bpy_rna_ui.cc +++ b/source/blender/python/intern/bpy_rna_ui.cc @@ -21,10 +21,12 @@ #include "bpy_rna.h" #include "bpy_rna_ui.h" -PyDoc_STRVAR(bpy_rna_uilayout_introspect_doc, - ".. method:: introspect()\n" - "\n" - " Return a dictionary containing a textual representation of the UI layout.\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_rna_uilayout_introspect_doc, + ".. method:: introspect()\n" + "\n" + " Return a dictionary containing a textual representation of the UI layout.\n"); static PyObject *bpy_rna_uilayout_introspect(PyObject *self) { BPy_StructRNA *pyrna = (BPy_StructRNA *)self; diff --git a/source/blender/python/intern/bpy_utils_previews.cc b/source/blender/python/intern/bpy_utils_previews.cc index a31deefdfe6..61673ae058f 100644 --- a/source/blender/python/intern/bpy_utils_previews.cc +++ b/source/blender/python/intern/bpy_utils_previews.cc @@ -41,6 +41,7 @@ #define STR_SOURCE_TYPES "'IMAGE', 'MOVIE', 'BLEND', 'FONT'" PyDoc_STRVAR( + /* Wrap. */ bpy_utils_previews_new_doc, ".. method:: new(name)\n" "\n" @@ -69,6 +70,7 @@ static PyObject *bpy_utils_previews_new(PyObject * /*self*/, PyObject *args) } PyDoc_STRVAR( + /* Wrap. */ bpy_utils_previews_load_doc, ".. method:: load(name, filepath, filetype, force_reload=False)\n" "\n" @@ -134,14 +136,16 @@ static PyObject *bpy_utils_previews_load(PyObject * /*self*/, PyObject *args) return pyrna_struct_CreatePyObject(&ptr); } -PyDoc_STRVAR(bpy_utils_previews_release_doc, - ".. method:: release(name)\n" - "\n" - " Release (free) a previously created preview.\n" - "\n" - "\n" - " :arg name: The name (unique id) identifying the preview.\n" - " :type name: string\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpy_utils_previews_release_doc, + ".. method:: release(name)\n" + "\n" + " Release (free) a previously created preview.\n" + "\n" + "\n" + " :arg name: The name (unique id) identifying the preview.\n" + " :type name: string\n"); static PyObject *bpy_utils_previews_release(PyObject * /*self*/, PyObject *args) { char *name; @@ -167,6 +171,7 @@ static PyMethodDef bpy_utils_previews_methods[] = { }; PyDoc_STRVAR( + /* Wrap. */ bpy_utils_previews_doc, "This object contains basic static methods to handle cached (non-ID) previews in Blender\n" "(low-level API, not exposed to final users)."); diff --git a/source/blender/python/intern/bpy_utils_units.cc b/source/blender/python/intern/bpy_utils_units.cc index 60483500ab8..87dfbedff7b 100644 --- a/source/blender/python/intern/bpy_utils_units.cc +++ b/source/blender/python/intern/bpy_utils_units.cc @@ -141,6 +141,7 @@ static bool bpyunits_validate(const char *usys_str, const char *ucat_str, int *r } PyDoc_STRVAR( + /* Wrap. */ bpyunits_to_value_doc, ".. method:: to_value(unit_system, unit_category, str_input, str_ref_unit=None)\n" "\n" @@ -223,31 +224,33 @@ static PyObject *bpyunits_to_value(PyObject * /*self*/, PyObject *args, PyObject return ret; } -PyDoc_STRVAR(bpyunits_to_string_doc, - ".. method:: to_string(unit_system, unit_category, value, precision=3, " - "split_unit=False, compatible_unit=False)\n" - "\n" - " Convert a given input float value into a string with units.\n" - "\n" - " :arg unit_system: The unit system, from :attr:`bpy.utils.units.systems`.\n" - " :type unit_system: string\n" - " :arg unit_category: The category of data we are converting (length, area, " - "rotation, etc.),\n" - " from :attr:`bpy.utils.units.categories`.\n" - " :type unit_category: string\n" - " :arg value: The value to convert to a string.\n" - " :type value: float\n" - " :arg precision: Number of digits after the comma.\n" - " :type precision: int\n" - " :arg split_unit: Whether to use several units if needed (1m1cm), or always only " - "one (1.01m).\n" - " :type split_unit: bool\n" - " :arg compatible_unit: Whether to use keyboard-friendly units (1m2) or nicer " - "utf-8 ones (1m²).\n" - " :type compatible_unit: bool\n" - " :return: The converted string.\n" - " :rtype: str\n" - " :raises ValueError: if conversion fails to generate a valid Python string.\n"); +PyDoc_STRVAR( + /* Wrap. */ + bpyunits_to_string_doc, + ".. method:: to_string(unit_system, unit_category, value, precision=3, " + "split_unit=False, compatible_unit=False)\n" + "\n" + " Convert a given input float value into a string with units.\n" + "\n" + " :arg unit_system: The unit system, from :attr:`bpy.utils.units.systems`.\n" + " :type unit_system: string\n" + " :arg unit_category: The category of data we are converting (length, area, " + "rotation, etc.),\n" + " from :attr:`bpy.utils.units.categories`.\n" + " :type unit_category: string\n" + " :arg value: The value to convert to a string.\n" + " :type value: float\n" + " :arg precision: Number of digits after the comma.\n" + " :type precision: int\n" + " :arg split_unit: Whether to use several units if needed (1m1cm), or always only " + "one (1.01m).\n" + " :type split_unit: bool\n" + " :arg compatible_unit: Whether to use keyboard-friendly units (1m2) or nicer " + "utf-8 ones (1m²).\n" + " :type compatible_unit: bool\n" + " :return: The converted string.\n" + " :rtype: str\n" + " :raises ValueError: if conversion fails to generate a valid Python string.\n"); static PyObject *bpyunits_to_string(PyObject * /*self*/, PyObject *args, PyObject *kw) { char *usys_str = nullptr, *ucat_str = nullptr; @@ -348,7 +351,10 @@ static PyMethodDef bpyunits_methods[] = { # pragma GCC diagnostic pop #endif -PyDoc_STRVAR(bpyunits_doc, "This module contains some data/methods regarding units handling."); +PyDoc_STRVAR( + /* Wrap. */ + bpyunits_doc, + "This module contains some data/methods regarding units handling."); static PyModuleDef bpyunits_module = { /*m_base*/ PyModuleDef_HEAD_INIT, diff --git a/source/blender/python/mathutils/mathutils.cc b/source/blender/python/mathutils/mathutils.cc index 55771dfd104..a514fed685c 100644 --- a/source/blender/python/mathutils/mathutils.cc +++ b/source/blender/python/mathutils/mathutils.cc @@ -22,6 +22,7 @@ #endif PyDoc_STRVAR( + /* Wrap. */ M_Mathutils_doc, "This module provides access to math operations.\n" "\n" diff --git a/source/blender/python/mathutils/mathutils_Color.cc b/source/blender/python/mathutils/mathutils_Color.cc index 03f60079f3e..ddc245b2331 100644 --- a/source/blender/python/mathutils/mathutils_Color.cc +++ b/source/blender/python/mathutils/mathutils_Color.cc @@ -99,13 +99,15 @@ static PyObject *Color_new(PyTypeObject *type, PyObject *args, PyObject *kwds) #ifndef MATH_STANDALONE -PyDoc_STRVAR(Color_from_scene_linear_to_srgb_doc, - ".. function:: from_scene_linear_to_srgb()\n" - "\n" - " Convert from scene linear to sRGB color space.\n" - "\n" - " :return: A color in sRGB color space.\n" - " :rtype: :class:`Color`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Color_from_scene_linear_to_srgb_doc, + ".. function:: from_scene_linear_to_srgb()\n" + "\n" + " Convert from scene linear to sRGB color space.\n" + "\n" + " :return: A color in sRGB color space.\n" + " :rtype: :class:`Color`\n"); static PyObject *Color_from_scene_linear_to_srgb(ColorObject *self) { float col[3]; @@ -113,13 +115,15 @@ static PyObject *Color_from_scene_linear_to_srgb(ColorObject *self) return Color_CreatePyObject(col, Py_TYPE(self)); } -PyDoc_STRVAR(Color_from_srgb_to_scene_linear_doc, - ".. function:: from_srgb_to_scene_linear()\n" - "\n" - " Convert from sRGB to scene linear color space.\n" - "\n" - " :return: A color in scene linear color space.\n" - " :rtype: :class:`Color`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Color_from_srgb_to_scene_linear_doc, + ".. function:: from_srgb_to_scene_linear()\n" + "\n" + " Convert from sRGB to scene linear color space.\n" + "\n" + " :return: A color in scene linear color space.\n" + " :rtype: :class:`Color`\n"); static PyObject *Color_from_srgb_to_scene_linear(ColorObject *self) { float col[3]; @@ -127,13 +131,15 @@ static PyObject *Color_from_srgb_to_scene_linear(ColorObject *self) return Color_CreatePyObject(col, Py_TYPE(self)); } -PyDoc_STRVAR(Color_from_scene_linear_to_xyz_d65_doc, - ".. function:: from_scene_linear_to_xyz_d65()\n" - "\n" - " Convert from scene linear to CIE XYZ (Illuminant D65) color space.\n" - "\n" - " :return: A color in XYZ color space.\n" - " :rtype: :class:`Color`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Color_from_scene_linear_to_xyz_d65_doc, + ".. function:: from_scene_linear_to_xyz_d65()\n" + "\n" + " Convert from scene linear to CIE XYZ (Illuminant D65) color space.\n" + "\n" + " :return: A color in XYZ color space.\n" + " :rtype: :class:`Color`\n"); static PyObject *Color_from_scene_linear_to_xyz_d65(ColorObject *self) { float col[3]; @@ -141,13 +147,15 @@ static PyObject *Color_from_scene_linear_to_xyz_d65(ColorObject *self) return Color_CreatePyObject(col, Py_TYPE(self)); } -PyDoc_STRVAR(Color_from_xyz_d65_to_scene_linear_doc, - ".. function:: from_xyz_d65_to_scene_linear()\n" - "\n" - " Convert from CIE XYZ (Illuminant D65) to scene linear color space.\n" - "\n" - " :return: A color in scene linear color space.\n" - " :rtype: :class:`Color`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Color_from_xyz_d65_to_scene_linear_doc, + ".. function:: from_xyz_d65_to_scene_linear()\n" + "\n" + " Convert from CIE XYZ (Illuminant D65) to scene linear color space.\n" + "\n" + " :return: A color in scene linear color space.\n" + " :rtype: :class:`Color`\n"); static PyObject *Color_from_xyz_d65_to_scene_linear(ColorObject *self) { float col[3]; @@ -155,13 +163,15 @@ static PyObject *Color_from_xyz_d65_to_scene_linear(ColorObject *self) return Color_CreatePyObject(col, Py_TYPE(self)); } -PyDoc_STRVAR(Color_from_scene_linear_to_aces_doc, - ".. function:: from_scene_linear_to_aces()\n" - "\n" - " Convert from scene linear to ACES2065-1 linear color space.\n" - "\n" - " :return: A color in ACES2065-1 linear color space.\n" - " :rtype: :class:`Color`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Color_from_scene_linear_to_aces_doc, + ".. function:: from_scene_linear_to_aces()\n" + "\n" + " Convert from scene linear to ACES2065-1 linear color space.\n" + "\n" + " :return: A color in ACES2065-1 linear color space.\n" + " :rtype: :class:`Color`\n"); static PyObject *Color_from_scene_linear_to_aces(ColorObject *self) { float col[3]; @@ -169,13 +179,15 @@ static PyObject *Color_from_scene_linear_to_aces(ColorObject *self) return Color_CreatePyObject(col, Py_TYPE(self)); } -PyDoc_STRVAR(Color_from_aces_to_scene_linear_doc, - ".. function:: from_aces_to_scene_linear()\n" - "\n" - " Convert from ACES2065-1 linear to scene linear color space.\n" - "\n" - " :return: A color in scene linear color space.\n" - " :rtype: :class:`Color`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Color_from_aces_to_scene_linear_doc, + ".. function:: from_aces_to_scene_linear()\n" + "\n" + " Convert from ACES2065-1 linear to scene linear color space.\n" + "\n" + " :return: A color in scene linear color space.\n" + " :rtype: :class:`Color`\n"); static PyObject *Color_from_aces_to_scene_linear(ColorObject *self) { float col[3]; @@ -183,13 +195,15 @@ static PyObject *Color_from_aces_to_scene_linear(ColorObject *self) return Color_CreatePyObject(col, Py_TYPE(self)); } -PyDoc_STRVAR(Color_from_scene_linear_to_rec709_linear_doc, - ".. function:: from_scene_linear_to_rec709_linear()\n" - "\n" - " Convert from scene linear to Rec.709 linear color space.\n" - "\n" - " :return: A color in Rec.709 linear color space.\n" - " :rtype: :class:`Color`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Color_from_scene_linear_to_rec709_linear_doc, + ".. function:: from_scene_linear_to_rec709_linear()\n" + "\n" + " Convert from scene linear to Rec.709 linear color space.\n" + "\n" + " :return: A color in Rec.709 linear color space.\n" + " :rtype: :class:`Color`\n"); static PyObject *Color_from_scene_linear_to_rec709_linear(ColorObject *self) { float col[3]; @@ -197,13 +211,15 @@ static PyObject *Color_from_scene_linear_to_rec709_linear(ColorObject *self) return Color_CreatePyObject(col, Py_TYPE(self)); } -PyDoc_STRVAR(Color_from_rec709_linear_to_scene_linear_doc, - ".. function:: from_rec709_linear_to_scene_linear()\n" - "\n" - " Convert from Rec.709 linear color space to scene linear color space.\n" - "\n" - " :return: A color in scene linear color space.\n" - " :rtype: :class:`Color`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Color_from_rec709_linear_to_scene_linear_doc, + ".. function:: from_rec709_linear_to_scene_linear()\n" + "\n" + " Convert from Rec.709 linear color space to scene linear color space.\n" + "\n" + " :return: A color in scene linear color space.\n" + " :rtype: :class:`Color`\n"); static PyObject *Color_from_rec709_linear_to_scene_linear(ColorObject *self) { float col[3]; @@ -219,16 +235,18 @@ static PyObject *Color_from_rec709_linear_to_scene_linear(ColorObject *self) /** \name Color Methods: Color Copy/Deep-Copy * \{ */ -PyDoc_STRVAR(Color_copy_doc, - ".. function:: copy()\n" - "\n" - " Returns a copy of this color.\n" - "\n" - " :return: A copy of the color.\n" - " :rtype: :class:`Color`\n" - "\n" - " .. note:: use this to get a copy of a wrapped color with\n" - " no reference to the original data.\n"); +PyDoc_STRVAR( + /* Wrap. */ + Color_copy_doc, + ".. function:: copy()\n" + "\n" + " Returns a copy of this color.\n" + "\n" + " :return: A copy of the color.\n" + " :rtype: :class:`Color`\n" + "\n" + " .. note:: use this to get a copy of a wrapped color with\n" + " no reference to the original data.\n"); static PyObject *Color_copy(ColorObject *self) { if (BaseMath_ReadCallback(self) == -1) { @@ -895,9 +913,24 @@ static PyNumberMethods Color_NumMethods = { /* Color channel (RGB): `color.r/g/b`. */ -PyDoc_STRVAR(Color_channel_r_doc, "Red color channel.\n\n:type: float"); -PyDoc_STRVAR(Color_channel_g_doc, "Green color channel.\n\n:type: float"); -PyDoc_STRVAR(Color_channel_b_doc, "Blue color channel.\n\n:type: float"); +PyDoc_STRVAR( + /* Wrap. */ + Color_channel_r_doc, + "Red color channel.\n" + "\n" + ":type: float"); +PyDoc_STRVAR( + /* Wrap. */ + Color_channel_g_doc, + "Green color channel.\n" + "\n" + ":type: float"); +PyDoc_STRVAR( + /* Wrap. */ + Color_channel_b_doc, + "Blue color channel.\n" + "\n" + ":type: float"); static PyObject *Color_channel_get(ColorObject *self, void *type) { @@ -911,9 +944,24 @@ static int Color_channel_set(ColorObject *self, PyObject *value, void *type) /* Color channel (HSV): `color.h/s/v`. */ -PyDoc_STRVAR(Color_channel_hsv_h_doc, "HSV Hue component in [0, 1].\n\n:type: float"); -PyDoc_STRVAR(Color_channel_hsv_s_doc, "HSV Saturation component in [0, 1].\n\n:type: float"); -PyDoc_STRVAR(Color_channel_hsv_v_doc, "HSV Value component in [0, 1].\n\n:type: float"); +PyDoc_STRVAR( + /* Wrap. */ + Color_channel_hsv_h_doc, + "HSV Hue component in [0, 1].\n" + "\n" + ":type: float"); +PyDoc_STRVAR( + /* Wrap. */ + Color_channel_hsv_s_doc, + "HSV Saturation component in [0, 1].\n" + "\n" + ":type: float"); +PyDoc_STRVAR( + /* Wrap. */ + Color_channel_hsv_v_doc, + "HSV Value component in [0, 1].\n" + "\n" + ":type: float"); static PyObject *Color_channel_hsv_get(ColorObject *self, void *type) { @@ -958,7 +1006,12 @@ static int Color_channel_hsv_set(ColorObject *self, PyObject *value, void *type) return 0; } -PyDoc_STRVAR(Color_hsv_doc, "HSV Values in [0, 1].\n\n:type: float triplet"); +PyDoc_STRVAR( + /* Wrap. */ + Color_hsv_doc, + "HSV Values in [0, 1].\n" + "\n" + ":type: float triplet"); /** Color channel HSV (get): `x = color.hsv`. */ static PyObject *Color_hsv_get(ColorObject *self, void * /*closure*/) { @@ -1137,6 +1190,7 @@ static PyMethodDef Color_methods[] = { #endif PyDoc_STRVAR( + /* Wrap. */ color_doc, ".. class:: Color(rgb)\n" "\n" diff --git a/source/blender/python/mathutils/mathutils_Euler.cc b/source/blender/python/mathutils/mathutils_Euler.cc index c148ce38e2b..171936a8af8 100644 --- a/source/blender/python/mathutils/mathutils_Euler.cc +++ b/source/blender/python/mathutils/mathutils_Euler.cc @@ -140,13 +140,15 @@ static PyObject *Euler_new(PyTypeObject *type, PyObject *args, PyObject *kwds) /** \name Euler Methods * \{ */ -PyDoc_STRVAR(Euler_to_quaternion_doc, - ".. method:: to_quaternion()\n" - "\n" - " Return a quaternion representation of the euler.\n" - "\n" - " :return: Quaternion representation of the euler.\n" - " :rtype: :class:`Quaternion`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Euler_to_quaternion_doc, + ".. method:: to_quaternion()\n" + "\n" + " Return a quaternion representation of the euler.\n" + "\n" + " :return: Quaternion representation of the euler.\n" + " :rtype: :class:`Quaternion`\n"); static PyObject *Euler_to_quaternion(EulerObject *self) { float quat[4]; @@ -160,13 +162,15 @@ static PyObject *Euler_to_quaternion(EulerObject *self) return Quaternion_CreatePyObject(quat, nullptr); } -PyDoc_STRVAR(Euler_to_matrix_doc, - ".. method:: to_matrix()\n" - "\n" - " Return a matrix representation of the euler.\n" - "\n" - " :return: A 3x3 rotation matrix representation of the euler.\n" - " :rtype: :class:`Matrix`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Euler_to_matrix_doc, + ".. method:: to_matrix()\n" + "\n" + " Return a matrix representation of the euler.\n" + "\n" + " :return: A 3x3 rotation matrix representation of the euler.\n" + " :rtype: :class:`Matrix`\n"); static PyObject *Euler_to_matrix(EulerObject *self) { float mat[9]; @@ -180,10 +184,12 @@ static PyObject *Euler_to_matrix(EulerObject *self) return Matrix_CreatePyObject(mat, 3, 3, nullptr); } -PyDoc_STRVAR(Euler_zero_doc, - ".. method:: zero()\n" - "\n" - " Set all values to zero.\n"); +PyDoc_STRVAR( + /* Wrap. */ + Euler_zero_doc, + ".. method:: zero()\n" + "\n" + " Set all values to zero.\n"); static PyObject *Euler_zero(EulerObject *self) { if (BaseMath_Prepare_ForWrite(self) == -1) { @@ -199,16 +205,18 @@ static PyObject *Euler_zero(EulerObject *self) Py_RETURN_NONE; } -PyDoc_STRVAR(Euler_rotate_axis_doc, - ".. method:: rotate_axis(axis, angle)\n" - "\n" - " Rotates the euler a certain amount and returning a unique euler rotation\n" - " (no 720 degree pitches).\n" - "\n" - " :arg axis: single character in ['X, 'Y', 'Z'].\n" - " :type axis: string\n" - " :arg angle: angle in radians.\n" - " :type angle: float\n"); +PyDoc_STRVAR( + /* Wrap. */ + Euler_rotate_axis_doc, + ".. method:: rotate_axis(axis, angle)\n" + "\n" + " Rotates the euler a certain amount and returning a unique euler rotation\n" + " (no 720 degree pitches).\n" + "\n" + " :arg axis: single character in ['X, 'Y', 'Z'].\n" + " :type axis: string\n" + " :arg angle: angle in radians.\n" + " :type angle: float\n"); static PyObject *Euler_rotate_axis(EulerObject *self, PyObject *args) { float angle = 0.0f; @@ -239,13 +247,15 @@ static PyObject *Euler_rotate_axis(EulerObject *self, PyObject *args) Py_RETURN_NONE; } -PyDoc_STRVAR(Euler_rotate_doc, - ".. method:: rotate(other)\n" - "\n" - " Rotates the euler by another mathutils value.\n" - "\n" - " :arg other: rotation component of mathutils value\n" - " :type other: :class:`Euler`, :class:`Quaternion` or :class:`Matrix`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Euler_rotate_doc, + ".. method:: rotate(other)\n" + "\n" + " Rotates the euler by another mathutils value.\n" + "\n" + " :arg other: rotation component of mathutils value\n" + " :type other: :class:`Euler`, :class:`Quaternion` or :class:`Matrix`\n"); static PyObject *Euler_rotate(EulerObject *self, PyObject *value) { float self_rmat[3][3], other_rmat[3][3], rmat[3][3]; @@ -267,13 +277,15 @@ static PyObject *Euler_rotate(EulerObject *self, PyObject *value) Py_RETURN_NONE; } -PyDoc_STRVAR(Euler_make_compatible_doc, - ".. method:: make_compatible(other)\n" - "\n" - " Make this euler compatible with another,\n" - " so interpolating between them works as intended.\n" - "\n" - " .. note:: the rotation order is not taken into account for this function.\n"); +PyDoc_STRVAR( + /* Wrap. */ + Euler_make_compatible_doc, + ".. method:: make_compatible(other)\n" + "\n" + " Make this euler compatible with another,\n" + " so interpolating between them works as intended.\n" + "\n" + " .. note:: the rotation order is not taken into account for this function.\n"); static PyObject *Euler_make_compatible(EulerObject *self, PyObject *value) { float teul[EULER_SIZE]; @@ -298,16 +310,18 @@ static PyObject *Euler_make_compatible(EulerObject *self, PyObject *value) Py_RETURN_NONE; } -PyDoc_STRVAR(Euler_copy_doc, - ".. function:: copy()\n" - "\n" - " Returns a copy of this euler.\n" - "\n" - " :return: A copy of the euler.\n" - " :rtype: :class:`Euler`\n" - "\n" - " .. note:: use this to get a copy of a wrapped euler with\n" - " no reference to the original data.\n"); +PyDoc_STRVAR( + /* Wrap. */ + Euler_copy_doc, + ".. function:: copy()\n" + "\n" + " Returns a copy of this euler.\n" + "\n" + " :return: A copy of the euler.\n" + " :rtype: :class:`Euler`\n" + "\n" + " .. note:: use this to get a copy of a wrapped euler with\n" + " no reference to the original data.\n"); static PyObject *Euler_copy(EulerObject *self) { if (BaseMath_ReadCallback(self) == -1) { @@ -670,7 +684,12 @@ static PyMappingMethods Euler_AsMapping = { /* Euler axis: `euler.x/y/z`. */ -PyDoc_STRVAR(Euler_axis_doc, "Euler axis angle in radians.\n\n:type: float"); +PyDoc_STRVAR( + /* Wrap. */ + Euler_axis_doc, + "Euler axis angle in radians.\n" + "\n" + ":type: float"); static PyObject *Euler_axis_get(EulerObject *self, void *type) { return Euler_item(self, POINTER_AS_INT(type)); @@ -684,8 +703,11 @@ static int Euler_axis_set(EulerObject *self, PyObject *value, void *type) /* Euler rotation order: `euler.order`. */ PyDoc_STRVAR( + /* Wrap. */ Euler_order_doc, - "Euler rotation order.\n\n:type: string in ['XYZ', 'XZY', 'YXZ', 'YZX', 'ZXY', 'ZYX']"); + "Euler rotation order.\n" + "\n" + ":type: string in ['XYZ', 'XZY', 'YXZ', 'YZX', 'ZXY', 'ZYX']"); static PyObject *Euler_order_get(EulerObject *self, void * /*closure*/) { if (BaseMath_ReadCallback(self) == -1) { @@ -793,6 +815,7 @@ static PyMethodDef Euler_methods[] = { #endif PyDoc_STRVAR( + /* Wrap. */ euler_doc, ".. class:: Euler(angles, order='XYZ')\n" "\n" diff --git a/source/blender/python/mathutils/mathutils_Matrix.cc b/source/blender/python/mathutils/mathutils_Matrix.cc index c4f64ec71bc..ecfcf17cdc4 100644 --- a/source/blender/python/mathutils/mathutils_Matrix.cc +++ b/source/blender/python/mathutils/mathutils_Matrix.cc @@ -649,15 +649,17 @@ static PyObject *Matrix_new(PyTypeObject *type, PyObject *args, PyObject *kwds) * \{ */ /** Identity constructor: `mathutils.Matrix.Identity()`. */ -PyDoc_STRVAR(C_Matrix_Identity_doc, - ".. classmethod:: Identity(size)\n" - "\n" - " Create an identity matrix.\n" - "\n" - " :arg size: The size of the identity matrix to construct [2, 4].\n" - " :type size: int\n" - " :return: A new identity matrix.\n" - " :rtype: :class:`Matrix`\n"); +PyDoc_STRVAR( + /* Wrap. */ + C_Matrix_Identity_doc, + ".. classmethod:: Identity(size)\n" + "\n" + " Create an identity matrix.\n" + "\n" + " :arg size: The size of the identity matrix to construct [2, 4].\n" + " :type size: int\n" + " :return: A new identity matrix.\n" + " :rtype: :class:`Matrix`\n"); static PyObject *C_Matrix_Identity(PyObject *cls, PyObject *args) { int matSize; @@ -677,20 +679,22 @@ static PyObject *C_Matrix_Identity(PyObject *cls, PyObject *args) } /** Rotation constructor: `mathutils.Matrix.Rotation()`. */ -PyDoc_STRVAR(C_Matrix_Rotation_doc, - ".. classmethod:: Rotation(angle, size, axis)\n" - "\n" - " Create a matrix representing a rotation.\n" - "\n" - " :arg angle: The angle of rotation desired, in radians.\n" - " :type angle: float\n" - " :arg size: The size of the rotation matrix to construct [2, 4].\n" - " :type size: int\n" - " :arg axis: a string in ['X', 'Y', 'Z'] or a 3D Vector Object\n" - " (optional when size is 2).\n" - " :type axis: string or :class:`Vector`\n" - " :return: A new rotation matrix.\n" - " :rtype: :class:`Matrix`\n"); +PyDoc_STRVAR( + /* Wrap. */ + C_Matrix_Rotation_doc, + ".. classmethod:: Rotation(angle, size, axis)\n" + "\n" + " Create a matrix representing a rotation.\n" + "\n" + " :arg angle: The angle of rotation desired, in radians.\n" + " :type angle: float\n" + " :arg size: The size of the rotation matrix to construct [2, 4].\n" + " :type size: int\n" + " :arg axis: a string in ['X', 'Y', 'Z'] or a 3D Vector Object\n" + " (optional when size is 2).\n" + " :type axis: string or :class:`Vector`\n" + " :return: A new rotation matrix.\n" + " :rtype: :class:`Matrix`\n"); static PyObject *C_Matrix_Rotation(PyObject *cls, PyObject *args) { PyObject *vec = nullptr; @@ -766,15 +770,17 @@ static PyObject *C_Matrix_Rotation(PyObject *cls, PyObject *args) } /** Translation constructor: `mathutils.Matrix.Translation()`. */ -PyDoc_STRVAR(C_Matrix_Translation_doc, - ".. classmethod:: Translation(vector)\n" - "\n" - " Create a matrix representing a translation.\n" - "\n" - " :arg vector: The translation vector.\n" - " :type vector: :class:`Vector`\n" - " :return: An identity matrix with a translation.\n" - " :rtype: :class:`Matrix`\n"); +PyDoc_STRVAR( + /* Wrap. */ + C_Matrix_Translation_doc, + ".. classmethod:: Translation(vector)\n" + "\n" + " Create a matrix representing a translation.\n" + "\n" + " :arg vector: The translation vector.\n" + " :type vector: :class:`Vector`\n" + " :return: An identity matrix with a translation.\n" + " :rtype: :class:`Matrix`\n"); static PyObject *C_Matrix_Translation(PyObject *cls, PyObject *value) { float mat[4][4]; @@ -790,15 +796,17 @@ static PyObject *C_Matrix_Translation(PyObject *cls, PyObject *value) return Matrix_CreatePyObject(&mat[0][0], 4, 4, (PyTypeObject *)cls); } -PyDoc_STRVAR(C_Matrix_Diagonal_doc, - ".. classmethod:: Diagonal(vector)\n" - "\n" - " Create a diagonal (scaling) matrix using the values from the vector.\n" - "\n" - " :arg vector: The vector of values for the diagonal.\n" - " :type vector: :class:`Vector`\n" - " :return: A diagonal matrix.\n" - " :rtype: :class:`Matrix`\n"); +PyDoc_STRVAR( + /* Wrap. */ + C_Matrix_Diagonal_doc, + ".. classmethod:: Diagonal(vector)\n" + "\n" + " Create a diagonal (scaling) matrix using the values from the vector.\n" + "\n" + " :arg vector: The vector of values for the diagonal.\n" + " :type vector: :class:`Vector`\n" + " :return: A diagonal matrix.\n" + " :rtype: :class:`Matrix`\n"); /** Diagonal constructor: `mathutils.Matrix.Diagonal()`. */ static PyObject *C_Matrix_Diagonal(PyObject *cls, PyObject *value) { @@ -820,19 +828,21 @@ static PyObject *C_Matrix_Diagonal(PyObject *cls, PyObject *value) } /** Scale constructor: `mathutils.Matrix.Scale()`. */ -PyDoc_STRVAR(C_Matrix_Scale_doc, - ".. classmethod:: Scale(factor, size, axis)\n" - "\n" - " Create a matrix representing a scaling.\n" - "\n" - " :arg factor: The factor of scaling to apply.\n" - " :type factor: float\n" - " :arg size: The size of the scale matrix to construct [2, 4].\n" - " :type size: int\n" - " :arg axis: Direction to influence scale. (optional).\n" - " :type axis: :class:`Vector`\n" - " :return: A new scale matrix.\n" - " :rtype: :class:`Matrix`\n"); +PyDoc_STRVAR( + /* Wrap. */ + C_Matrix_Scale_doc, + ".. classmethod:: Scale(factor, size, axis)\n" + "\n" + " Create a matrix representing a scaling.\n" + "\n" + " :arg factor: The factor of scaling to apply.\n" + " :type factor: float\n" + " :arg size: The size of the scale matrix to construct [2, 4].\n" + " :type size: int\n" + " :arg axis: Direction to influence scale. (optional).\n" + " :type axis: :class:`Vector`\n" + " :return: A new scale matrix.\n" + " :rtype: :class:`Matrix`\n"); static PyObject *C_Matrix_Scale(PyObject *cls, PyObject *args) { PyObject *vec = nullptr; @@ -908,19 +918,21 @@ static PyObject *C_Matrix_Scale(PyObject *cls, PyObject *args) return Matrix_CreatePyObject(mat, matSize, matSize, (PyTypeObject *)cls); } /** Orthographic projection constructor: `mathutils.Matrix.OrthoProjection()`. */ -PyDoc_STRVAR(C_Matrix_OrthoProjection_doc, - ".. classmethod:: OrthoProjection(axis, size)\n" - "\n" - " Create a matrix to represent an orthographic projection.\n" - "\n" - " :arg axis: Can be any of the following: ['X', 'Y', 'XY', 'XZ', 'YZ'],\n" - " where a single axis is for a 2D matrix.\n" - " Or a vector for an arbitrary axis\n" - " :type axis: string or :class:`Vector`\n" - " :arg size: The size of the projection matrix to construct [2, 4].\n" - " :type size: int\n" - " :return: A new projection matrix.\n" - " :rtype: :class:`Matrix`\n"); +PyDoc_STRVAR( + /* Wrap. */ + C_Matrix_OrthoProjection_doc, + ".. classmethod:: OrthoProjection(axis, size)\n" + "\n" + " Create a matrix to represent an orthographic projection.\n" + "\n" + " :arg axis: Can be any of the following: ['X', 'Y', 'XY', 'XZ', 'YZ'],\n" + " where a single axis is for a 2D matrix.\n" + " Or a vector for an arbitrary axis\n" + " :type axis: string or :class:`Vector`\n" + " :arg size: The size of the projection matrix to construct [2, 4].\n" + " :type size: int\n" + " :return: A new projection matrix.\n" + " :rtype: :class:`Matrix`\n"); static PyObject *C_Matrix_OrthoProjection(PyObject *cls, PyObject *args) { PyObject *axis; @@ -1028,21 +1040,23 @@ static PyObject *C_Matrix_OrthoProjection(PyObject *cls, PyObject *args) } /** Shear constructor: `mathutils.Matrix.Shear()`. */ -PyDoc_STRVAR(C_Matrix_Shear_doc, - ".. classmethod:: Shear(plane, size, factor)\n" - "\n" - " Create a matrix to represent an shear transformation.\n" - "\n" - " :arg plane: Can be any of the following: ['X', 'Y', 'XY', 'XZ', 'YZ'],\n" - " where a single axis is for a 2D matrix only.\n" - " :type plane: string\n" - " :arg size: The size of the shear matrix to construct [2, 4].\n" - " :type size: int\n" - " :arg factor: The factor of shear to apply. For a 3 or 4 *size* matrix\n" - " pass a pair of floats corresponding with the *plane* axis.\n" - " :type factor: float or float pair\n" - " :return: A new shear matrix.\n" - " :rtype: :class:`Matrix`\n"); +PyDoc_STRVAR( + /* Wrap. */ + C_Matrix_Shear_doc, + ".. classmethod:: Shear(plane, size, factor)\n" + "\n" + " Create a matrix to represent an shear transformation.\n" + "\n" + " :arg plane: Can be any of the following: ['X', 'Y', 'XY', 'XZ', 'YZ'],\n" + " where a single axis is for a 2D matrix only.\n" + " :type plane: string\n" + " :arg size: The size of the shear matrix to construct [2, 4].\n" + " :type size: int\n" + " :arg factor: The factor of shear to apply. For a 3 or 4 *size* matrix\n" + " pass a pair of floats corresponding with the *plane* axis.\n" + " :type factor: float or float pair\n" + " :return: A new shear matrix.\n" + " :rtype: :class:`Matrix`\n"); static PyObject *C_Matrix_Shear(PyObject *cls, PyObject *args) { int matSize; @@ -1128,6 +1142,7 @@ static PyObject *C_Matrix_Shear(PyObject *cls, PyObject *args) } PyDoc_STRVAR( + /* Wrap. */ C_Matrix_LocRotScale_doc, ".. classmethod:: LocRotScale(location, rotation, scale)\n" "\n" @@ -1233,13 +1248,15 @@ static PyObject *C_Matrix_LocRotScale(PyObject *cls, PyObject *args) /** \name Matrix Methods: To Quaternion * \{ */ -PyDoc_STRVAR(Matrix_to_quaternion_doc, - ".. method:: to_quaternion()\n" - "\n" - " Return a quaternion representation of the rotation matrix.\n" - "\n" - " :return: Quaternion representation of the rotation matrix.\n" - " :rtype: :class:`Quaternion`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Matrix_to_quaternion_doc, + ".. method:: to_quaternion()\n" + "\n" + " Return a quaternion representation of the rotation matrix.\n" + "\n" + " :return: Quaternion representation of the rotation matrix.\n" + " :rtype: :class:`Quaternion`\n"); static PyObject *Matrix_to_quaternion(MatrixObject *self) { float quat[4]; @@ -1270,21 +1287,23 @@ static PyObject *Matrix_to_quaternion(MatrixObject *self) /** \name Matrix Methods: To Euler * \{ */ -PyDoc_STRVAR(Matrix_to_euler_doc, - ".. method:: to_euler(order, euler_compat)\n" - "\n" - " Return an Euler representation of the rotation matrix\n" - " (3x3 or 4x4 matrix only).\n" - "\n" - " :arg order: Optional rotation order argument in\n" - " ['XYZ', 'XZY', 'YXZ', 'YZX', 'ZXY', 'ZYX'].\n" - " :type order: string\n" - " :arg euler_compat: Optional euler argument the new euler will be made\n" - " compatible with (no axis flipping between them).\n" - " Useful for converting a series of matrices to animation curves.\n" - " :type euler_compat: :class:`Euler`\n" - " :return: Euler representation of the matrix.\n" - " :rtype: :class:`Euler`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Matrix_to_euler_doc, + ".. method:: to_euler(order, euler_compat)\n" + "\n" + " Return an Euler representation of the rotation matrix\n" + " (3x3 or 4x4 matrix only).\n" + "\n" + " :arg order: Optional rotation order argument in\n" + " ['XYZ', 'XZY', 'YXZ', 'YZX', 'ZXY', 'ZYX'].\n" + " :type order: string\n" + " :arg euler_compat: Optional euler argument the new euler will be made\n" + " compatible with (no axis flipping between them).\n" + " Useful for converting a series of matrices to animation curves.\n" + " :type euler_compat: :class:`Euler`\n" + " :return: Euler representation of the matrix.\n" + " :rtype: :class:`Euler`\n"); static PyObject *Matrix_to_euler(MatrixObject *self, PyObject *args) { const char *order_str = nullptr; @@ -1360,10 +1379,12 @@ static PyObject *Matrix_to_euler(MatrixObject *self, PyObject *args) /** \name Matrix Methods: Resize * \{ */ -PyDoc_STRVAR(Matrix_resize_4x4_doc, - ".. method:: resize_4x4()\n" - "\n" - " Resize the matrix to 4x4.\n"); +PyDoc_STRVAR( + /* Wrap. */ + Matrix_resize_4x4_doc, + ".. method:: resize_4x4()\n" + "\n" + " Resize the matrix to 4x4.\n"); static PyObject *Matrix_resize_4x4(MatrixObject *self) { float mat[4][4]; @@ -1434,13 +1455,15 @@ static PyObject *Matrix_to_NxN(MatrixObject *self, const int col_num, const int return (PyObject *)pymat; } -PyDoc_STRVAR(Matrix_to_2x2_doc, - ".. method:: to_2x2()\n" - "\n" - " Return a 2x2 copy of this matrix.\n" - "\n" - " :return: a new matrix.\n" - " :rtype: :class:`Matrix`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Matrix_to_2x2_doc, + ".. method:: to_2x2()\n" + "\n" + " Return a 2x2 copy of this matrix.\n" + "\n" + " :return: a new matrix.\n" + " :rtype: :class:`Matrix`\n"); static PyObject *Matrix_to_2x2(MatrixObject *self) { if (BaseMath_ReadCallback(self) == -1) { @@ -1449,13 +1472,15 @@ static PyObject *Matrix_to_2x2(MatrixObject *self) return Matrix_to_NxN(self, 2, 2); } -PyDoc_STRVAR(Matrix_to_3x3_doc, - ".. method:: to_3x3()\n" - "\n" - " Return a 3x3 copy of this matrix.\n" - "\n" - " :return: a new matrix.\n" - " :rtype: :class:`Matrix`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Matrix_to_3x3_doc, + ".. method:: to_3x3()\n" + "\n" + " Return a 3x3 copy of this matrix.\n" + "\n" + " :return: a new matrix.\n" + " :rtype: :class:`Matrix`\n"); static PyObject *Matrix_to_3x3(MatrixObject *self) { if (BaseMath_ReadCallback(self) == -1) { @@ -1464,13 +1489,15 @@ static PyObject *Matrix_to_3x3(MatrixObject *self) return Matrix_to_NxN(self, 3, 3); } -PyDoc_STRVAR(Matrix_to_4x4_doc, - ".. method:: to_4x4()\n" - "\n" - " Return a 4x4 copy of this matrix.\n" - "\n" - " :return: a new matrix.\n" - " :rtype: :class:`Matrix`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Matrix_to_4x4_doc, + ".. method:: to_4x4()\n" + "\n" + " Return a 4x4 copy of this matrix.\n" + "\n" + " :return: a new matrix.\n" + " :rtype: :class:`Matrix`\n"); static PyObject *Matrix_to_4x4(MatrixObject *self) { @@ -1486,13 +1513,15 @@ static PyObject *Matrix_to_4x4(MatrixObject *self) /** \name Matrix Methods: To Translation/Scale * \{ */ -PyDoc_STRVAR(Matrix_to_translation_doc, - ".. method:: to_translation()\n" - "\n" - " Return the translation part of a 4 row matrix.\n" - "\n" - " :return: Return the translation of a matrix.\n" - " :rtype: :class:`Vector`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Matrix_to_translation_doc, + ".. method:: to_translation()\n" + "\n" + " Return the translation part of a 4 row matrix.\n" + "\n" + " :return: Return the translation of a matrix.\n" + " :rtype: :class:`Vector`\n"); static PyObject *Matrix_to_translation(MatrixObject *self) { if (BaseMath_ReadCallback(self) == -1) { @@ -1509,16 +1538,18 @@ static PyObject *Matrix_to_translation(MatrixObject *self) return Vector_CreatePyObject(MATRIX_COL_PTR(self, 3), 3, nullptr); } -PyDoc_STRVAR(Matrix_to_scale_doc, - ".. method:: to_scale()\n" - "\n" - " Return the scale part of a 3x3 or 4x4 matrix.\n" - "\n" - " :return: Return the scale of a matrix.\n" - " :rtype: :class:`Vector`\n" - "\n" - " .. note:: This method does not return a negative scale on any axis because it is " - "not possible to obtain this data from the matrix alone.\n"); +PyDoc_STRVAR( + /* Wrap. */ + Matrix_to_scale_doc, + ".. method:: to_scale()\n" + "\n" + " Return the scale part of a 3x3 or 4x4 matrix.\n" + "\n" + " :return: Return the scale of a matrix.\n" + " :rtype: :class:`Vector`\n" + "\n" + " .. note:: This method does not return a negative scale on any axis because it is " + "not possible to obtain this data from the matrix alone.\n"); static PyObject *Matrix_to_scale(MatrixObject *self) { float rot[3][3]; @@ -1604,6 +1635,7 @@ static void matrix_invert_raise_degenerate() } PyDoc_STRVAR( + /* Wrap. */ Matrix_invert_doc, ".. method:: invert(fallback=None)\n" "\n" @@ -1654,16 +1686,18 @@ static PyObject *Matrix_invert(MatrixObject *self, PyObject *args) Py_RETURN_NONE; } -PyDoc_STRVAR(Matrix_inverted_doc, - ".. method:: inverted(fallback=None)\n" - "\n" - " Return an inverted copy of the matrix.\n" - "\n" - " :arg fallback: return this when the inverse can't be calculated\n" - " (instead of raising a :exc:`ValueError`).\n" - " :type fallback: any\n" - " :return: the inverted matrix or fallback when given.\n" - " :rtype: :class:`Matrix`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Matrix_inverted_doc, + ".. method:: inverted(fallback=None)\n" + "\n" + " Return an inverted copy of the matrix.\n" + "\n" + " :arg fallback: return this when the inverse can't be calculated\n" + " (instead of raising a :exc:`ValueError`).\n" + " :type fallback: any\n" + " :return: the inverted matrix or fallback when given.\n" + " :rtype: :class:`Matrix`\n"); static PyObject *Matrix_inverted(MatrixObject *self, PyObject *args) { float mat[MATRIX_MAX_DIM * MATRIX_MAX_DIM]; @@ -1720,6 +1754,7 @@ static PyObject *Matrix_inverted_noargs(MatrixObject *self) } PyDoc_STRVAR( + /* Wrap. */ Matrix_invert_safe_doc, ".. method:: invert_safe()\n" "\n" @@ -1746,16 +1781,18 @@ static PyObject *Matrix_invert_safe(MatrixObject *self) Py_RETURN_NONE; } -PyDoc_STRVAR(Matrix_inverted_safe_doc, - ".. method:: inverted_safe()\n" - "\n" - " Return an inverted copy of the matrix, will never error.\n" - " If degenerated (e.g. zero scale on an axis), add some epsilon to its diagonal, " - "to get an invertible one.\n" - " If tweaked matrix is still degenerated, return the identity matrix instead.\n" - "\n" - " :return: the inverted matrix.\n" - " :rtype: :class:`Matrix`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Matrix_inverted_safe_doc, + ".. method:: inverted_safe()\n" + "\n" + " Return an inverted copy of the matrix, will never error.\n" + " If degenerated (e.g. zero scale on an axis), add some epsilon to its diagonal, " + "to get an invertible one.\n" + " If tweaked matrix is still degenerated, return the identity matrix instead.\n" + "\n" + " :return: the inverted matrix.\n" + " :rtype: :class:`Matrix`\n"); static PyObject *Matrix_inverted_safe(MatrixObject *self) { float mat[MATRIX_MAX_DIM * MATRIX_MAX_DIM]; @@ -1780,6 +1817,7 @@ static PyObject *Matrix_inverted_safe(MatrixObject *self) * \{ */ PyDoc_STRVAR( + /* Wrap. */ Matrix_adjugate_doc, ".. method:: adjugate()\n" "\n" @@ -1816,20 +1854,23 @@ static PyObject *Matrix_adjugate(MatrixObject *self) Py_RETURN_NONE; } -PyDoc_STRVAR(Matrix_adjugated_doc, - ".. method:: adjugated()\n" - "\n" - " Return an adjugated copy of the matrix.\n" - "\n" - " :return: the adjugated matrix.\n" - " :rtype: :class:`Matrix`\n" - " :raises ValueError: if the matrix cannot be adjugated\n"); +PyDoc_STRVAR( + /* Wrap. */ + Matrix_adjugated_doc, + ".. method:: adjugated()\n" + "\n" + " Return an adjugated copy of the matrix.\n" + "\n" + " :return: the adjugated matrix.\n" + " :rtype: :class:`Matrix`\n" + " :raises ValueError: if the matrix cannot be adjugated\n"); static PyObject *Matrix_adjugated(MatrixObject *self) { return matrix__apply_to_copy(Matrix_adjugate, self); } PyDoc_STRVAR( + /* Wrap. */ Matrix_rotate_doc, ".. method:: rotate(other)\n" "\n" @@ -1873,13 +1914,15 @@ static PyObject *Matrix_rotate(MatrixObject *self, PyObject *value) /** \name Matrix Methods: Decompose * \{ */ -PyDoc_STRVAR(Matrix_decompose_doc, - ".. method:: decompose()\n" - "\n" - " Return the translation, rotation, and scale components of this matrix.\n" - "\n" - " :return: tuple of translation, rotation, and scale\n" - " :rtype: (:class:`Vector`, :class:`Quaternion`, :class:`Vector`)"); +PyDoc_STRVAR( + /* Wrap. */ + Matrix_decompose_doc, + ".. method:: decompose()\n" + "\n" + " Return the translation, rotation, and scale components of this matrix.\n" + "\n" + " :return: tuple of translation, rotation, and scale\n" + " :rtype: (:class:`Vector`, :class:`Quaternion`, :class:`Vector`)"); static PyObject *Matrix_decompose(MatrixObject *self) { PyObject *ret; @@ -1916,18 +1959,20 @@ static PyObject *Matrix_decompose(MatrixObject *self) /** \name Matrix Methods: Linear Interpolate (lerp) * \{ */ -PyDoc_STRVAR(Matrix_lerp_doc, - ".. function:: lerp(other, factor)\n" - "\n" - " Returns the interpolation of two matrices. Uses polar decomposition, see" - " \"Matrix Animation and Polar Decomposition\", Shoemake and Duff, 1992.\n" - "\n" - " :arg other: value to interpolate with.\n" - " :type other: :class:`Matrix`\n" - " :arg factor: The interpolation value in [0.0, 1.0].\n" - " :type factor: float\n" - " :return: The interpolated matrix.\n" - " :rtype: :class:`Matrix`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Matrix_lerp_doc, + ".. function:: lerp(other, factor)\n" + "\n" + " Returns the interpolation of two matrices. Uses polar decomposition, see" + " \"Matrix Animation and Polar Decomposition\", Shoemake and Duff, 1992.\n" + "\n" + " :arg other: value to interpolate with.\n" + " :type other: :class:`Matrix`\n" + " :arg factor: The interpolation value in [0.0, 1.0].\n" + " :type factor: float\n" + " :return: The interpolated matrix.\n" + " :rtype: :class:`Matrix`\n"); static PyObject *Matrix_lerp(MatrixObject *self, PyObject *args) { MatrixObject *mat2 = nullptr; @@ -1974,6 +2019,7 @@ static PyObject *Matrix_lerp(MatrixObject *self, PyObject *args) } PyDoc_STRVAR( + /* Wrap. */ Matrix_determinant_doc, ".. method:: determinant()\n" "\n" @@ -2006,6 +2052,7 @@ static PyObject *Matrix_determinant(MatrixObject *self) * \{ */ PyDoc_STRVAR( + /* Wrap. */ Matrix_transpose_doc, ".. method:: transpose()\n" "\n" @@ -2041,13 +2088,15 @@ static PyObject *Matrix_transpose(MatrixObject *self) Py_RETURN_NONE; } -PyDoc_STRVAR(Matrix_transposed_doc, - ".. method:: transposed()\n" - "\n" - " Return a new, transposed matrix.\n" - "\n" - " :return: a transposed matrix\n" - " :rtype: :class:`Matrix`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Matrix_transposed_doc, + ".. method:: transposed()\n" + "\n" + " Return a new, transposed matrix.\n" + "\n" + " :return: a transposed matrix\n" + " :rtype: :class:`Matrix`\n"); static PyObject *Matrix_transposed(MatrixObject *self) { return matrix__apply_to_copy(Matrix_transpose, self); @@ -2059,12 +2108,14 @@ static PyObject *Matrix_transposed(MatrixObject *self) /** \name Matrix Methods: Normalize * \{ */ -PyDoc_STRVAR(Matrix_normalize_doc, - ".. method:: normalize()\n" - "\n" - " Normalize each of the matrix columns.\n" - "\n" - " .. note:: for 4x4 matrices, the 4th column (translation) is left untouched.\n"); +PyDoc_STRVAR( + /* Wrap. */ + Matrix_normalize_doc, + ".. method:: normalize()\n" + "\n" + " Normalize each of the matrix columns.\n" + "\n" + " .. note:: for 4x4 matrices, the 4th column (translation) is left untouched.\n"); static PyObject *Matrix_normalize(MatrixObject *self) { if (BaseMath_ReadCallback_ForWrite(self) == -1) { @@ -2094,15 +2145,17 @@ static PyObject *Matrix_normalize(MatrixObject *self) Py_RETURN_NONE; } -PyDoc_STRVAR(Matrix_normalized_doc, - ".. method:: normalized()\n" - "\n" - " Return a column normalized matrix\n" - "\n" - " :return: a column normalized matrix\n" - " :rtype: :class:`Matrix`\n" - "\n" - " .. note:: for 4x4 matrices, the 4th column (translation) is left untouched.\n"); +PyDoc_STRVAR( + /* Wrap. */ + Matrix_normalized_doc, + ".. method:: normalized()\n" + "\n" + " Return a column normalized matrix\n" + "\n" + " :return: a column normalized matrix\n" + " :rtype: :class:`Matrix`\n" + "\n" + " .. note:: for 4x4 matrices, the 4th column (translation) is left untouched.\n"); static PyObject *Matrix_normalized(MatrixObject *self) { return matrix__apply_to_copy(Matrix_normalize, self); @@ -2114,12 +2167,14 @@ static PyObject *Matrix_normalized(MatrixObject *self) /** \name Matrix Methods: Zero * \{ */ -PyDoc_STRVAR(Matrix_zero_doc, - ".. method:: zero()\n" - "\n" - " Set all the matrix values to zero.\n" - "\n" - " :rtype: :class:`Matrix`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Matrix_zero_doc, + ".. method:: zero()\n" + "\n" + " Set all the matrix values to zero.\n" + "\n" + " :rtype: :class:`Matrix`\n"); static PyObject *Matrix_zero(MatrixObject *self) { if (BaseMath_Prepare_ForWrite(self) == -1) { @@ -2156,16 +2211,18 @@ static void matrix_identity_internal(MatrixObject *self) } } -PyDoc_STRVAR(Matrix_identity_doc, - ".. method:: identity()\n" - "\n" - " Set the matrix to the identity matrix.\n" - "\n" - " .. note:: An object with a location and rotation of zero, and a scale of one\n" - " will have an identity matrix.\n" - "\n" - " .. seealso:: `Identity matrix `__ " - "on Wikipedia.\n"); +PyDoc_STRVAR( + /* Wrap. */ + Matrix_identity_doc, + ".. method:: identity()\n" + "\n" + " Set the matrix to the identity matrix.\n" + "\n" + " .. note:: An object with a location and rotation of zero, and a scale of one\n" + " will have an identity matrix.\n" + "\n" + " .. seealso:: `Identity matrix `__ " + "on Wikipedia.\n"); static PyObject *Matrix_identity(MatrixObject *self) { if (BaseMath_ReadCallback_ForWrite(self) == -1) { @@ -2200,13 +2257,15 @@ static PyObject *Matrix_copy_notest(MatrixObject *self, const float *matrix) return Matrix_CreatePyObject((const float *)matrix, self->col_num, self->row_num, Py_TYPE(self)); } -PyDoc_STRVAR(Matrix_copy_doc, - ".. method:: copy()\n" - "\n" - " Returns a copy of this matrix.\n" - "\n" - " :return: an instance of itself\n" - " :rtype: :class:`Matrix`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Matrix_copy_doc, + ".. method:: copy()\n" + "\n" + " Returns a copy of this matrix.\n" + "\n" + " :return: an instance of itself\n" + " :rtype: :class:`Matrix`\n"); static PyObject *Matrix_copy(MatrixObject *self) { if (BaseMath_ReadCallback(self) == -1) { @@ -3045,7 +3104,12 @@ static PyNumberMethods Matrix_NumMethods = { /** \name Matrix Type: Get/Set Item Implementation * \{ */ -PyDoc_STRVAR(Matrix_translation_doc, "The translation component of the matrix.\n\n:type: Vector"); +PyDoc_STRVAR( + /* Wrap. */ + Matrix_translation_doc, + "The translation component of the matrix.\n" + "\n" + ":type: Vector"); static PyObject *Matrix_translation_get(MatrixObject *self, void * /*closure*/) { PyObject *ret; @@ -3095,23 +3159,32 @@ static int Matrix_translation_set(MatrixObject *self, PyObject *value, void * /* return 0; } -PyDoc_STRVAR(Matrix_row_doc, - "Access the matrix by rows (default), (read-only).\n\n:type: Matrix Access"); +PyDoc_STRVAR( + /* Wrap. */ + Matrix_row_doc, + "Access the matrix by rows (default), (read-only).\n" + "\n" + ":type: Matrix Access"); static PyObject *Matrix_row_get(MatrixObject *self, void * /*closure*/) { return MatrixAccess_CreatePyObject(self, MAT_ACCESS_ROW); } -PyDoc_STRVAR( - Matrix_col_doc, - "Access the matrix by columns, 3x3 and 4x4 only, (read-only).\n\n:type: Matrix Access"); +PyDoc_STRVAR(Matrix_col_doc, + "Access the matrix by columns, 3x3 and 4x4 only, (read-only).\n" + "\n" + ":type: Matrix Access"); static PyObject *Matrix_col_get(MatrixObject *self, void * /*closure*/) { return MatrixAccess_CreatePyObject(self, MAT_ACCESS_COL); } -PyDoc_STRVAR(Matrix_median_scale_doc, - "The average scale applied to each axis (read-only).\n\n:type: float"); +PyDoc_STRVAR( + /* Wrap. */ + Matrix_median_scale_doc, + "The average scale applied to each axis (read-only).\n" + "\n" + ":type: float"); static PyObject *Matrix_median_scale_get(MatrixObject *self, void * /*closure*/) { float mat[3][3]; @@ -3133,8 +3206,12 @@ static PyObject *Matrix_median_scale_get(MatrixObject *self, void * /*closure*/) return PyFloat_FromDouble(mat3_to_scale(mat)); } -PyDoc_STRVAR(Matrix_is_identity_doc, - "True if this is an identity matrix (read-only).\n\n:type: bool"); +PyDoc_STRVAR( + /* Wrap. */ + Matrix_is_identity_doc, + "True if this is an identity matrix (read-only).\n" + "\n" + ":type: bool"); static PyObject *Matrix_is_identity_get(MatrixObject *self, void * /*closure*/) { if (BaseMath_ReadCallback(self) == -1) { @@ -3143,9 +3220,13 @@ static PyObject *Matrix_is_identity_get(MatrixObject *self, void * /*closure*/) return PyBool_FromLong(matrix_is_identity(self)); } -PyDoc_STRVAR(Matrix_is_negative_doc, - "True if this matrix results in a negative scale, 3x3 and 4x4 only, " - "(read-only).\n\n:type: bool"); +PyDoc_STRVAR( + /* Wrap. */ + Matrix_is_negative_doc, + "True if this matrix results in a negative scale, 3x3 and 4x4 only, " + "(read-only).\n" + "\n" + ":type: bool"); static PyObject *Matrix_is_negative_get(MatrixObject *self, void * /*closure*/) { if (BaseMath_ReadCallback(self) == -1) { @@ -3166,8 +3247,12 @@ static PyObject *Matrix_is_negative_get(MatrixObject *self, void * /*closure*/) return nullptr; } -PyDoc_STRVAR(Matrix_is_orthogonal_doc, - "True if this matrix is orthogonal, 3x3 and 4x4 only, (read-only).\n\n:type: bool"); +PyDoc_STRVAR( + /* Wrap. */ + Matrix_is_orthogonal_doc, + "True if this matrix is orthogonal, 3x3 and 4x4 only, (read-only).\n" + "\n" + ":type: bool"); static PyObject *Matrix_is_orthogonal_get(MatrixObject *self, void * /*closure*/) { if (BaseMath_ReadCallback(self) == -1) { @@ -3188,9 +3273,13 @@ static PyObject *Matrix_is_orthogonal_get(MatrixObject *self, void * /*closure*/ return nullptr; } -PyDoc_STRVAR(Matrix_is_orthogonal_axis_vectors_doc, - "True if this matrix has got orthogonal axis vectors, 3x3 and 4x4 only, " - "(read-only).\n\n:type: bool"); +PyDoc_STRVAR( + /* Wrap. */ + Matrix_is_orthogonal_axis_vectors_doc, + "True if this matrix has got orthogonal axis vectors, 3x3 and 4x4 only, " + "(read-only).\n" + "\n" + ":type: bool"); static PyObject *Matrix_is_orthogonal_axis_vectors_get(MatrixObject *self, void * /*closure*/) { if (BaseMath_ReadCallback(self) == -1) { @@ -3362,6 +3451,7 @@ static PyMethodDef Matrix_methods[] = { #endif PyDoc_STRVAR( + /* Wrap. */ matrix_doc, ".. class:: Matrix([rows])\n" "\n" diff --git a/source/blender/python/mathutils/mathutils_Quaternion.cc b/source/blender/python/mathutils/mathutils_Quaternion.cc index 0eb6f7d9de2..d336a48ed52 100644 --- a/source/blender/python/mathutils/mathutils_Quaternion.cc +++ b/source/blender/python/mathutils/mathutils_Quaternion.cc @@ -164,20 +164,22 @@ static PyObject *Quaternion_new(PyTypeObject *type, PyObject *args, PyObject *kw /** \name Quaternion Methods: To Euler * \{ */ -PyDoc_STRVAR(Quaternion_to_euler_doc, - ".. method:: to_euler(order, euler_compat)\n" - "\n" - " Return Euler representation of the quaternion.\n" - "\n" - " :arg order: Optional rotation order argument in\n" - " ['XYZ', 'XZY', 'YXZ', 'YZX', 'ZXY', 'ZYX'].\n" - " :type order: string\n" - " :arg euler_compat: Optional euler argument the new euler will be made\n" - " compatible with (no axis flipping between them).\n" - " Useful for converting a series of matrices to animation curves.\n" - " :type euler_compat: :class:`Euler`\n" - " :return: Euler representation of the quaternion.\n" - " :rtype: :class:`Euler`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Quaternion_to_euler_doc, + ".. method:: to_euler(order, euler_compat)\n" + "\n" + " Return Euler representation of the quaternion.\n" + "\n" + " :arg order: Optional rotation order argument in\n" + " ['XYZ', 'XZY', 'YXZ', 'YZX', 'ZXY', 'ZYX'].\n" + " :type order: string\n" + " :arg euler_compat: Optional euler argument the new euler will be made\n" + " compatible with (no axis flipping between them).\n" + " Useful for converting a series of matrices to animation curves.\n" + " :type euler_compat: :class:`Euler`\n" + " :return: Euler representation of the quaternion.\n" + " :rtype: :class:`Euler`\n"); static PyObject *Quaternion_to_euler(QuaternionObject *self, PyObject *args) { float tquat[4]; @@ -234,13 +236,15 @@ static PyObject *Quaternion_to_euler(QuaternionObject *self, PyObject *args) /** \name Quaternion Methods: To Matrix * \{ */ -PyDoc_STRVAR(Quaternion_to_matrix_doc, - ".. method:: to_matrix()\n" - "\n" - " Return a matrix representation of the quaternion.\n" - "\n" - " :return: A 3x3 rotation matrix representation of the quaternion.\n" - " :rtype: :class:`Matrix`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Quaternion_to_matrix_doc, + ".. method:: to_matrix()\n" + "\n" + " Return a matrix representation of the quaternion.\n" + "\n" + " :return: A 3x3 rotation matrix representation of the quaternion.\n" + " :rtype: :class:`Matrix`\n"); static PyObject *Quaternion_to_matrix(QuaternionObject *self) { float mat[9]; /* all values are set */ @@ -259,13 +263,15 @@ static PyObject *Quaternion_to_matrix(QuaternionObject *self) /** \name Quaternion Methods: To Axis/Angle * \{ */ -PyDoc_STRVAR(Quaternion_to_axis_angle_doc, - ".. method:: to_axis_angle()\n" - "\n" - " Return the axis, angle representation of the quaternion.\n" - "\n" - " :return: axis, angle.\n" - " :rtype: (:class:`Vector`, float) pair\n"); +PyDoc_STRVAR( + /* Wrap. */ + Quaternion_to_axis_angle_doc, + ".. method:: to_axis_angle()\n" + "\n" + " Return the axis, angle representation of the quaternion.\n" + "\n" + " :return: axis, angle.\n" + " :rtype: (:class:`Vector`, float) pair\n"); static PyObject *Quaternion_to_axis_angle(QuaternionObject *self) { PyObject *ret; @@ -295,15 +301,17 @@ static PyObject *Quaternion_to_axis_angle(QuaternionObject *self) /** \name Quaternion Methods: To Swing/Twist * \{ */ -PyDoc_STRVAR(Quaternion_to_swing_twist_doc, - ".. method:: to_swing_twist(axis)\n" - "\n" - " Split the rotation into a swing quaternion with the specified\n" - " axis fixed at zero, and the remaining twist rotation angle.\n" - "\n" - " :arg axis: twist axis as a string in ['X', 'Y', 'Z']\n" - " :return: swing, twist angle.\n" - " :rtype: (:class:`Quaternion`, float) pair\n"); +PyDoc_STRVAR( + /* Wrap. */ + Quaternion_to_swing_twist_doc, + ".. method:: to_swing_twist(axis)\n" + "\n" + " Split the rotation into a swing quaternion with the specified\n" + " axis fixed at zero, and the remaining twist rotation angle.\n" + "\n" + " :arg axis: twist axis as a string in ['X', 'Y', 'Z']\n" + " :return: swing, twist angle.\n" + " :rtype: (:class:`Quaternion`, float) pair\n"); static PyObject *Quaternion_to_swing_twist(QuaternionObject *self, PyObject *axis_arg) { PyObject *ret; @@ -346,6 +354,7 @@ static PyObject *Quaternion_to_swing_twist(QuaternionObject *self, PyObject *axi * \{ */ PyDoc_STRVAR( + /* Wrap. */ Quaternion_to_exponential_map_doc, ".. method:: to_exponential_map()\n" "\n" @@ -376,15 +385,17 @@ static PyObject *Quaternion_to_exponential_map(QuaternionObject *self) /** \name Quaternion Methods: Cross Product * \{ */ -PyDoc_STRVAR(Quaternion_cross_doc, - ".. method:: cross(other)\n" - "\n" - " Return the cross product of this quaternion and another.\n" - "\n" - " :arg other: The other quaternion to perform the cross product with.\n" - " :type other: :class:`Quaternion`\n" - " :return: The cross product.\n" - " :rtype: :class:`Quaternion`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Quaternion_cross_doc, + ".. method:: cross(other)\n" + "\n" + " Return the cross product of this quaternion and another.\n" + "\n" + " :arg other: The other quaternion to perform the cross product with.\n" + " :type other: :class:`Quaternion`\n" + " :return: The cross product.\n" + " :rtype: :class:`Quaternion`\n"); static PyObject *Quaternion_cross(QuaternionObject *self, PyObject *value) { float quat[QUAT_SIZE], tquat[QUAT_SIZE]; @@ -410,15 +421,17 @@ static PyObject *Quaternion_cross(QuaternionObject *self, PyObject *value) /** \name Quaternion Methods: Dot Product * \{ */ -PyDoc_STRVAR(Quaternion_dot_doc, - ".. method:: dot(other)\n" - "\n" - " Return the dot product of this quaternion and another.\n" - "\n" - " :arg other: The other quaternion to perform the dot product with.\n" - " :type other: :class:`Quaternion`\n" - " :return: The dot product.\n" - " :rtype: float\n"); +PyDoc_STRVAR( + /* Wrap. */ + Quaternion_dot_doc, + ".. method:: dot(other)\n" + "\n" + " Return the dot product of this quaternion and another.\n" + "\n" + " :arg other: The other quaternion to perform the dot product with.\n" + " :type other: :class:`Quaternion`\n" + " :return: The dot product.\n" + " :rtype: float\n"); static PyObject *Quaternion_dot(QuaternionObject *self, PyObject *value) { float tquat[QUAT_SIZE]; @@ -442,15 +455,17 @@ static PyObject *Quaternion_dot(QuaternionObject *self, PyObject *value) /** \name Quaternion Methods: Rotation Difference * \{ */ -PyDoc_STRVAR(Quaternion_rotation_difference_doc, - ".. function:: rotation_difference(other)\n" - "\n" - " Returns a quaternion representing the rotational difference.\n" - "\n" - " :arg other: second quaternion.\n" - " :type other: :class:`Quaternion`\n" - " :return: the rotational difference between the two quat rotations.\n" - " :rtype: :class:`Quaternion`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Quaternion_rotation_difference_doc, + ".. function:: rotation_difference(other)\n" + "\n" + " Returns a quaternion representing the rotational difference.\n" + "\n" + " :arg other: second quaternion.\n" + " :type other: :class:`Quaternion`\n" + " :return: the rotational difference between the two quat rotations.\n" + " :rtype: :class:`Quaternion`\n"); static PyObject *Quaternion_rotation_difference(QuaternionObject *self, PyObject *value) { float tquat[QUAT_SIZE], quat[QUAT_SIZE]; @@ -479,17 +494,19 @@ static PyObject *Quaternion_rotation_difference(QuaternionObject *self, PyObject /** \name Quaternion Methods: Spherical Interpolation (slerp) * \{ */ -PyDoc_STRVAR(Quaternion_slerp_doc, - ".. function:: slerp(other, factor)\n" - "\n" - " Returns the interpolation of two quaternions.\n" - "\n" - " :arg other: value to interpolate with.\n" - " :type other: :class:`Quaternion`\n" - " :arg factor: The interpolation value in [0.0, 1.0].\n" - " :type factor: float\n" - " :return: The interpolated rotation.\n" - " :rtype: :class:`Quaternion`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Quaternion_slerp_doc, + ".. function:: slerp(other, factor)\n" + "\n" + " Returns the interpolation of two quaternions.\n" + "\n" + " :arg other: value to interpolate with.\n" + " :type other: :class:`Quaternion`\n" + " :arg factor: The interpolation value in [0.0, 1.0].\n" + " :type factor: float\n" + " :return: The interpolated rotation.\n" + " :rtype: :class:`Quaternion`\n"); static PyObject *Quaternion_slerp(QuaternionObject *self, PyObject *args) { PyObject *value; @@ -531,13 +548,15 @@ static PyObject *Quaternion_slerp(QuaternionObject *self, PyObject *args) /** \name Quaternion Methods: Rotate * \{ */ -PyDoc_STRVAR(Quaternion_rotate_doc, - ".. method:: rotate(other)\n" - "\n" - " Rotates the quaternion by another mathutils value.\n" - "\n" - " :arg other: rotation component of mathutils value\n" - " :type other: :class:`Euler`, :class:`Quaternion` or :class:`Matrix`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Quaternion_rotate_doc, + ".. method:: rotate(other)\n" + "\n" + " Rotates the quaternion by another mathutils value.\n" + "\n" + " :arg other: rotation component of mathutils value\n" + " :type other: :class:`Euler`, :class:`Quaternion` or :class:`Matrix`\n"); static PyObject *Quaternion_rotate(QuaternionObject *self, PyObject *value) { float self_rmat[3][3], other_rmat[3][3], rmat[3][3]; @@ -561,11 +580,13 @@ static PyObject *Quaternion_rotate(QuaternionObject *self, PyObject *value) Py_RETURN_NONE; } -PyDoc_STRVAR(Quaternion_make_compatible_doc, - ".. method:: make_compatible(other)\n" - "\n" - " Make this quaternion compatible with another,\n" - " so interpolating between them works as intended.\n"); +PyDoc_STRVAR( + /* Wrap. */ + Quaternion_make_compatible_doc, + ".. method:: make_compatible(other)\n" + "\n" + " Make this quaternion compatible with another,\n" + " so interpolating between them works as intended.\n"); static PyObject *Quaternion_make_compatible(QuaternionObject *self, PyObject *value) { float quat[QUAT_SIZE]; @@ -603,10 +624,12 @@ static PyObject *Quaternion_make_compatible(QuaternionObject *self, PyObject *va * rotation axis, as all of (w, x, y, z) are scaled. * \{ */ -PyDoc_STRVAR(Quaternion_normalize_doc, - ".. function:: normalize()\n" - "\n" - " Normalize the quaternion.\n"); +PyDoc_STRVAR( + /* Wrap. */ + Quaternion_normalize_doc, + ".. function:: normalize()\n" + "\n" + " Normalize the quaternion.\n"); static PyObject *Quaternion_normalize(QuaternionObject *self) { if (BaseMath_ReadCallback_ForWrite(self) == -1) { @@ -618,13 +641,15 @@ static PyObject *Quaternion_normalize(QuaternionObject *self) (void)BaseMath_WriteCallback(self); Py_RETURN_NONE; } -PyDoc_STRVAR(Quaternion_normalized_doc, - ".. function:: normalized()\n" - "\n" - " Return a new normalized quaternion.\n" - "\n" - " :return: a normalized copy.\n" - " :rtype: :class:`Quaternion`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Quaternion_normalized_doc, + ".. function:: normalized()\n" + "\n" + " Return a new normalized quaternion.\n" + "\n" + " :return: a normalized copy.\n" + " :rtype: :class:`Quaternion`\n"); static PyObject *Quaternion_normalized(QuaternionObject *self) { return quat__apply_to_copy(Quaternion_normalize, self); @@ -639,10 +664,12 @@ static PyObject *Quaternion_normalized(QuaternionObject *self) * rotation axis, as all of (w, x, y, z) are scaled. * \{ */ -PyDoc_STRVAR(Quaternion_invert_doc, - ".. function:: invert()\n" - "\n" - " Set the quaternion to its inverse.\n"); +PyDoc_STRVAR( + /* Wrap. */ + Quaternion_invert_doc, + ".. function:: invert()\n" + "\n" + " Set the quaternion to its inverse.\n"); static PyObject *Quaternion_invert(QuaternionObject *self) { if (BaseMath_ReadCallback_ForWrite(self) == -1) { @@ -654,13 +681,15 @@ static PyObject *Quaternion_invert(QuaternionObject *self) (void)BaseMath_WriteCallback(self); Py_RETURN_NONE; } -PyDoc_STRVAR(Quaternion_inverted_doc, - ".. function:: inverted()\n" - "\n" - " Return a new, inverted quaternion.\n" - "\n" - " :return: the inverted value.\n" - " :rtype: :class:`Quaternion`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Quaternion_inverted_doc, + ".. function:: inverted()\n" + "\n" + " Return a new, inverted quaternion.\n" + "\n" + " :return: the inverted value.\n" + " :rtype: :class:`Quaternion`\n"); static PyObject *Quaternion_inverted(QuaternionObject *self) { return quat__apply_to_copy(Quaternion_invert, self); @@ -672,12 +701,14 @@ static PyObject *Quaternion_inverted(QuaternionObject *self) /** \name Quaternion Methods: Set Identity * \{ */ -PyDoc_STRVAR(Quaternion_identity_doc, - ".. function:: identity()\n" - "\n" - " Set the quaternion to an identity quaternion.\n" - "\n" - " :rtype: :class:`Quaternion`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Quaternion_identity_doc, + ".. function:: identity()\n" + "\n" + " Set the quaternion to an identity quaternion.\n" + "\n" + " :rtype: :class:`Quaternion`\n"); static PyObject *Quaternion_identity(QuaternionObject *self) { if (BaseMath_ReadCallback_ForWrite(self) == -1) { @@ -696,12 +727,14 @@ static PyObject *Quaternion_identity(QuaternionObject *self) /** \name Quaternion Methods: Negate * \{ */ -PyDoc_STRVAR(Quaternion_negate_doc, - ".. function:: negate()\n" - "\n" - " Set the quaternion to its negative.\n" - "\n" - " :rtype: :class:`Quaternion`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Quaternion_negate_doc, + ".. function:: negate()\n" + "\n" + " Set the quaternion to its negative.\n" + "\n" + " :rtype: :class:`Quaternion`\n"); static PyObject *Quaternion_negate(QuaternionObject *self) { if (BaseMath_ReadCallback_ForWrite(self) == -1) { @@ -720,10 +753,12 @@ static PyObject *Quaternion_negate(QuaternionObject *self) /** \name Quaternion Methods: Conjugate * \{ */ -PyDoc_STRVAR(Quaternion_conjugate_doc, - ".. function:: conjugate()\n" - "\n" - " Set the quaternion to its conjugate (negate x, y, z).\n"); +PyDoc_STRVAR( + /* Wrap. */ + Quaternion_conjugate_doc, + ".. function:: conjugate()\n" + "\n" + " Set the quaternion to its conjugate (negate x, y, z).\n"); static PyObject *Quaternion_conjugate(QuaternionObject *self) { if (BaseMath_ReadCallback_ForWrite(self) == -1) { @@ -735,13 +770,15 @@ static PyObject *Quaternion_conjugate(QuaternionObject *self) (void)BaseMath_WriteCallback(self); Py_RETURN_NONE; } -PyDoc_STRVAR(Quaternion_conjugated_doc, - ".. function:: conjugated()\n" - "\n" - " Return a new conjugated quaternion.\n" - "\n" - " :return: a new quaternion.\n" - " :rtype: :class:`Quaternion`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Quaternion_conjugated_doc, + ".. function:: conjugated()\n" + "\n" + " Return a new conjugated quaternion.\n" + "\n" + " :return: a new quaternion.\n" + " :rtype: :class:`Quaternion`\n"); static PyObject *Quaternion_conjugated(QuaternionObject *self) { return quat__apply_to_copy(Quaternion_conjugate, self); @@ -753,16 +790,18 @@ static PyObject *Quaternion_conjugated(QuaternionObject *self) /** \name Quaternion Methods: Copy/Deep-Copy * \{ */ -PyDoc_STRVAR(Quaternion_copy_doc, - ".. function:: copy()\n" - "\n" - " Returns a copy of this quaternion.\n" - "\n" - " :return: A copy of the quaternion.\n" - " :rtype: :class:`Quaternion`\n" - "\n" - " .. note:: use this to get a copy of a wrapped quaternion with\n" - " no reference to the original data.\n"); +PyDoc_STRVAR( + /* Wrap. */ + Quaternion_copy_doc, + ".. function:: copy()\n" + "\n" + " Returns a copy of this quaternion.\n" + "\n" + " :return: A copy of the quaternion.\n" + " :rtype: :class:`Quaternion`\n" + "\n" + " .. note:: use this to get a copy of a wrapped quaternion with\n" + " no reference to the original data.\n"); static PyObject *Quaternion_copy(QuaternionObject *self) { if (BaseMath_ReadCallback(self) == -1) { @@ -1418,7 +1457,12 @@ static PyNumberMethods Quaternion_NumMethods = { /** \name Quaternion Type: Get/Set Item Implementation * \{ */ -PyDoc_STRVAR(Quaternion_axis_doc, "Quaternion axis value.\n\n:type: float"); +PyDoc_STRVAR( + /* Wrap. */ + Quaternion_axis_doc, + "Quaternion axis value.\n" + "\n" + ":type: float"); static PyObject *Quaternion_axis_get(QuaternionObject *self, void *type) { return Quaternion_item(self, POINTER_AS_INT(type)); @@ -1429,7 +1473,12 @@ static int Quaternion_axis_set(QuaternionObject *self, PyObject *value, void *ty return Quaternion_ass_item(self, POINTER_AS_INT(type), value); } -PyDoc_STRVAR(Quaternion_magnitude_doc, "Size of the quaternion (read-only).\n\n:type: float"); +PyDoc_STRVAR( + /* Wrap. */ + Quaternion_magnitude_doc, + "Size of the quaternion (read-only).\n" + "\n" + ":type: float"); static PyObject *Quaternion_magnitude_get(QuaternionObject *self, void * /*closure*/) { if (BaseMath_ReadCallback(self) == -1) { @@ -1439,7 +1488,12 @@ static PyObject *Quaternion_magnitude_get(QuaternionObject *self, void * /*closu return PyFloat_FromDouble(sqrtf(dot_qtqt(self->quat, self->quat))); } -PyDoc_STRVAR(Quaternion_angle_doc, "Angle of the quaternion.\n\n:type: float"); +PyDoc_STRVAR( + /* Wrap. */ + Quaternion_angle_doc, + "Angle of the quaternion.\n" + "\n" + ":type: float"); static PyObject *Quaternion_angle_get(QuaternionObject *self, void * /*closure*/) { float tquat[4]; @@ -1494,7 +1548,12 @@ static int Quaternion_angle_set(QuaternionObject *self, PyObject *value, void * return 0; } -PyDoc_STRVAR(Quaternion_axis_vector_doc, "Quaternion axis as a vector.\n\n:type: :class:`Vector`"); +PyDoc_STRVAR( + /* Wrap. */ + Quaternion_axis_vector_doc, + "Quaternion axis as a vector.\n" + "\n" + ":type: :class:`Vector`"); static PyObject *Quaternion_axis_vector_get(QuaternionObject *self, void * /*closure*/) { float tquat[4]; @@ -1689,30 +1748,32 @@ static PyMethodDef Quaternion_methods[] = { # define Quaternion_str nullptr #endif -PyDoc_STRVAR(quaternion_doc, - ".. class:: Quaternion([seq, [angle]])\n" - "\n" - " This object gives access to Quaternions in Blender.\n" - "\n" - " :arg seq: size 3 or 4\n" - " :type seq: :class:`Vector`\n" - " :arg angle: rotation angle, in radians\n" - " :type angle: float\n" - "\n" - " The constructor takes arguments in various forms:\n" - "\n" - " (), *no args*\n" - " Create an identity quaternion\n" - " (*wxyz*)\n" - " Create a quaternion from a ``(w, x, y, z)`` vector.\n" - " (*exponential_map*)\n" - " Create a quaternion from a 3d exponential map vector.\n" - "\n" - " .. seealso:: :meth:`to_exponential_map`\n" - " (*axis, angle*)\n" - " Create a quaternion representing a rotation of *angle* radians over *axis*.\n" - "\n" - " .. seealso:: :meth:`to_axis_angle`\n"); +PyDoc_STRVAR( + /* Wrap. */ + quaternion_doc, + ".. class:: Quaternion([seq, [angle]])\n" + "\n" + " This object gives access to Quaternions in Blender.\n" + "\n" + " :arg seq: size 3 or 4\n" + " :type seq: :class:`Vector`\n" + " :arg angle: rotation angle, in radians\n" + " :type angle: float\n" + "\n" + " The constructor takes arguments in various forms:\n" + "\n" + " (), *no args*\n" + " Create an identity quaternion\n" + " (*wxyz*)\n" + " Create a quaternion from a ``(w, x, y, z)`` vector.\n" + " (*exponential_map*)\n" + " Create a quaternion from a 3d exponential map vector.\n" + "\n" + " .. seealso:: :meth:`to_exponential_map`\n" + " (*axis, angle*)\n" + " Create a quaternion representing a rotation of *angle* radians over *axis*.\n" + "\n" + " .. seealso:: :meth:`to_axis_angle`\n"); PyTypeObject quaternion_Type = { /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0) /*tp_name*/ "Quaternion", diff --git a/source/blender/python/mathutils/mathutils_Vector.cc b/source/blender/python/mathutils/mathutils_Vector.cc index 34aa68ce8df..94e8e0b0ea7 100644 --- a/source/blender/python/mathutils/mathutils_Vector.cc +++ b/source/blender/python/mathutils/mathutils_Vector.cc @@ -185,15 +185,17 @@ static PyObject *Vector_new(PyTypeObject *type, PyObject *args, PyObject *kwds) /** \name Vector Class Methods * \{ */ -PyDoc_STRVAR(C_Vector_Fill_doc, - ".. classmethod:: Fill(size, fill=0.0)\n" - "\n" - " Create a vector of length size with all values set to fill.\n" - "\n" - " :arg size: The length of the vector to be created.\n" - " :type size: int\n" - " :arg fill: The value used to fill the vector.\n" - " :type fill: float\n"); +PyDoc_STRVAR( + /* Wrap. */ + C_Vector_Fill_doc, + ".. classmethod:: Fill(size, fill=0.0)\n" + "\n" + " Create a vector of length size with all values set to fill.\n" + "\n" + " :arg size: The length of the vector to be created.\n" + " :type size: int\n" + " :arg fill: The value used to fill the vector.\n" + " :type fill: float\n"); static PyObject *C_Vector_Fill(PyObject *cls, PyObject *args) { float *vec; @@ -223,17 +225,19 @@ static PyObject *C_Vector_Fill(PyObject *cls, PyObject *args) return Vector_CreatePyObject_alloc(vec, vec_num, (PyTypeObject *)cls); } -PyDoc_STRVAR(C_Vector_Range_doc, - ".. classmethod:: Range(start, stop, step=1)\n" - "\n" - " Create a filled with a range of values.\n" - "\n" - " :arg start: The start of the range used to fill the vector.\n" - " :type start: int\n" - " :arg stop: The end of the range used to fill the vector.\n" - " :type stop: int\n" - " :arg step: The step between successive values in the vector.\n" - " :type step: int\n"); +PyDoc_STRVAR( + /* Wrap. */ + C_Vector_Range_doc, + ".. classmethod:: Range(start, stop, step=1)\n" + "\n" + " Create a filled with a range of values.\n" + "\n" + " :arg start: The start of the range used to fill the vector.\n" + " :type start: int\n" + " :arg stop: The end of the range used to fill the vector.\n" + " :type stop: int\n" + " :arg step: The step between successive values in the vector.\n" + " :type step: int\n"); static PyObject *C_Vector_Range(PyObject *cls, PyObject *args) { float *vec; @@ -298,18 +302,20 @@ static PyObject *C_Vector_Range(PyObject *cls, PyObject *args) return Vector_CreatePyObject_alloc(vec, vec_num, (PyTypeObject *)cls); } -PyDoc_STRVAR(C_Vector_Linspace_doc, - ".. classmethod:: Linspace(start, stop, size)\n" - "\n" - " Create a vector of the specified size which is filled with linearly spaced " - "values between start and stop values.\n" - "\n" - " :arg start: The start of the range used to fill the vector.\n" - " :type start: int\n" - " :arg stop: The end of the range used to fill the vector.\n" - " :type stop: int\n" - " :arg size: The size of the vector to be created.\n" - " :type size: int\n"); +PyDoc_STRVAR( + /* Wrap. */ + C_Vector_Linspace_doc, + ".. classmethod:: Linspace(start, stop, size)\n" + "\n" + " Create a vector of the specified size which is filled with linearly spaced " + "values between start and stop values.\n" + "\n" + " :arg start: The start of the range used to fill the vector.\n" + " :type start: int\n" + " :arg stop: The end of the range used to fill the vector.\n" + " :type stop: int\n" + " :arg size: The size of the vector to be created.\n" + " :type size: int\n"); static PyObject *C_Vector_Linspace(PyObject *cls, PyObject *args) { float *vec; @@ -342,6 +348,7 @@ static PyObject *C_Vector_Linspace(PyObject *cls, PyObject *args) } PyDoc_STRVAR( + /* Wrap. */ C_Vector_Repeat_doc, ".. classmethod:: Repeat(vector, size)\n" "\n" @@ -407,10 +414,12 @@ static PyObject *C_Vector_Repeat(PyObject *cls, PyObject *args) /** \name Vector Methods: Zero * \{ */ -PyDoc_STRVAR(Vector_zero_doc, - ".. method:: zero()\n" - "\n" - " Set all values to zero.\n"); +PyDoc_STRVAR( + /* Wrap. */ + Vector_zero_doc, + ".. method:: zero()\n" + "\n" + " Set all values to zero.\n"); static PyObject *Vector_zero(VectorObject *self) { if (BaseMath_Prepare_ForWrite(self) == -1) { @@ -432,15 +441,17 @@ static PyObject *Vector_zero(VectorObject *self) /** \name Vector Methods: Normalize * \{ */ -PyDoc_STRVAR(Vector_normalize_doc, - ".. method:: normalize()\n" - "\n" - " Normalize the vector, making the length of the vector always 1.0.\n" - "\n" - " .. warning:: Normalizing a vector where all values are zero has no effect.\n" - "\n" - " .. note:: Normalize works for vectors of all sizes,\n" - " however 4D Vectors w axis is left untouched.\n"); +PyDoc_STRVAR( + /* Wrap. */ + Vector_normalize_doc, + ".. method:: normalize()\n" + "\n" + " Normalize the vector, making the length of the vector always 1.0.\n" + "\n" + " .. warning:: Normalizing a vector where all values are zero has no effect.\n" + "\n" + " .. note:: Normalize works for vectors of all sizes,\n" + " however 4D Vectors w axis is left untouched.\n"); static PyObject *Vector_normalize(VectorObject *self) { const int vec_num = (self->vec_num == 4 ? 3 : self->vec_num); @@ -453,13 +464,15 @@ static PyObject *Vector_normalize(VectorObject *self) (void)BaseMath_WriteCallback(self); Py_RETURN_NONE; } -PyDoc_STRVAR(Vector_normalized_doc, - ".. method:: normalized()\n" - "\n" - " Return a new, normalized vector.\n" - "\n" - " :return: a normalized copy of the vector\n" - " :rtype: :class:`Vector`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Vector_normalized_doc, + ".. method:: normalized()\n" + "\n" + " Return a new, normalized vector.\n" + "\n" + " :return: a normalized copy of the vector\n" + " :rtype: :class:`Vector`\n"); static PyObject *Vector_normalized(VectorObject *self) { return vec__apply_to_copy(Vector_normalize, self); @@ -471,10 +484,12 @@ static PyObject *Vector_normalized(VectorObject *self) /** \name Vector Methods: Resize * \{ */ -PyDoc_STRVAR(Vector_resize_doc, - ".. method:: resize(size=3)\n" - "\n" - " Resize the vector to have size number of elements.\n"); +PyDoc_STRVAR( + /* Wrap. */ + Vector_resize_doc, + ".. method:: resize(size=3)\n" + "\n" + " Resize the vector to have size number of elements.\n"); static PyObject *Vector_resize(VectorObject *self, PyObject *value) { int vec_num; @@ -521,13 +536,15 @@ static PyObject *Vector_resize(VectorObject *self, PyObject *value) Py_RETURN_NONE; } -PyDoc_STRVAR(Vector_resized_doc, - ".. method:: resized(size=3)\n" - "\n" - " Return a resized copy of the vector with size number of elements.\n" - "\n" - " :return: a new vector\n" - " :rtype: :class:`Vector`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Vector_resized_doc, + ".. method:: resized(size=3)\n" + "\n" + " Return a resized copy of the vector with size number of elements.\n" + "\n" + " :return: a new vector\n" + " :rtype: :class:`Vector`\n"); static PyObject *Vector_resized(VectorObject *self, PyObject *value) { int vec_num; @@ -557,10 +574,12 @@ static PyObject *Vector_resized(VectorObject *self, PyObject *value) return Vector_CreatePyObject_alloc(vec, vec_num, nullptr); } -PyDoc_STRVAR(Vector_resize_2d_doc, - ".. method:: resize_2d()\n" - "\n" - " Resize the vector to 2D (x, y).\n"); +PyDoc_STRVAR( + /* Wrap. */ + Vector_resize_2d_doc, + ".. method:: resize_2d()\n" + "\n" + " Resize the vector to 2D (x, y).\n"); static PyObject *Vector_resize_2d(VectorObject *self) { if (self->flag & BASE_MATH_FLAG_IS_WRAP) { @@ -588,10 +607,12 @@ static PyObject *Vector_resize_2d(VectorObject *self) Py_RETURN_NONE; } -PyDoc_STRVAR(Vector_resize_3d_doc, - ".. method:: resize_3d()\n" - "\n" - " Resize the vector to 3D (x, y, z).\n"); +PyDoc_STRVAR( + /* Wrap. */ + Vector_resize_3d_doc, + ".. method:: resize_3d()\n" + "\n" + " Resize the vector to 3D (x, y, z).\n"); static PyObject *Vector_resize_3d(VectorObject *self) { if (self->flag & BASE_MATH_FLAG_IS_WRAP) { @@ -623,10 +644,12 @@ static PyObject *Vector_resize_3d(VectorObject *self) Py_RETURN_NONE; } -PyDoc_STRVAR(Vector_resize_4d_doc, - ".. method:: resize_4d()\n" - "\n" - " Resize the vector to 4D (x, y, z, w).\n"); +PyDoc_STRVAR( + /* Wrap. */ + Vector_resize_4d_doc, + ".. method:: resize_4d()\n" + "\n" + " Resize the vector to 4D (x, y, z, w).\n"); static PyObject *Vector_resize_4d(VectorObject *self) { if (self->flag & BASE_MATH_FLAG_IS_WRAP) { @@ -667,13 +690,15 @@ static PyObject *Vector_resize_4d(VectorObject *self) /** \name Vector Methods: To N-dimensions * \{ */ -PyDoc_STRVAR(Vector_to_2d_doc, - ".. method:: to_2d()\n" - "\n" - " Return a 2d copy of the vector.\n" - "\n" - " :return: a new vector\n" - " :rtype: :class:`Vector`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Vector_to_2d_doc, + ".. method:: to_2d()\n" + "\n" + " Return a 2d copy of the vector.\n" + "\n" + " :return: a new vector\n" + " :rtype: :class:`Vector`\n"); static PyObject *Vector_to_2d(VectorObject *self) { if (BaseMath_ReadCallback(self) == -1) { @@ -682,13 +707,15 @@ static PyObject *Vector_to_2d(VectorObject *self) return Vector_CreatePyObject(self->vec, 2, Py_TYPE(self)); } -PyDoc_STRVAR(Vector_to_3d_doc, - ".. method:: to_3d()\n" - "\n" - " Return a 3d copy of the vector.\n" - "\n" - " :return: a new vector\n" - " :rtype: :class:`Vector`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Vector_to_3d_doc, + ".. method:: to_3d()\n" + "\n" + " Return a 3d copy of the vector.\n" + "\n" + " :return: a new vector\n" + " :rtype: :class:`Vector`\n"); static PyObject *Vector_to_3d(VectorObject *self) { float tvec[3] = {0.0f}; @@ -700,13 +727,15 @@ static PyObject *Vector_to_3d(VectorObject *self) memcpy(tvec, self->vec, sizeof(float) * std::min(self->vec_num, 3)); return Vector_CreatePyObject(tvec, 3, Py_TYPE(self)); } -PyDoc_STRVAR(Vector_to_4d_doc, - ".. method:: to_4d()\n" - "\n" - " Return a 4d copy of the vector.\n" - "\n" - " :return: a new vector\n" - " :rtype: :class:`Vector`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Vector_to_4d_doc, + ".. method:: to_4d()\n" + "\n" + " Return a 4d copy of the vector.\n" + "\n" + " :return: a new vector\n" + " :rtype: :class:`Vector`\n"); static PyObject *Vector_to_4d(VectorObject *self) { float tvec[4] = {0.0f, 0.0f, 0.0f, 1.0f}; @@ -725,15 +754,17 @@ static PyObject *Vector_to_4d(VectorObject *self) /** \name Vector Methods: To Tuple * \{ */ -PyDoc_STRVAR(Vector_to_tuple_doc, - ".. method:: to_tuple(precision=-1)\n" - "\n" - " Return this vector as a tuple with.\n" - "\n" - " :arg precision: The number to round the value to in [-1, 21].\n" - " :type precision: int\n" - " :return: the values of the vector rounded by *precision*\n" - " :rtype: tuple\n"); +PyDoc_STRVAR( + /* Wrap. */ + Vector_to_tuple_doc, + ".. method:: to_tuple(precision=-1)\n" + "\n" + " Return this vector as a tuple with.\n" + "\n" + " :arg precision: The number to round the value to in [-1, 21].\n" + " :type precision: int\n" + " :return: the values of the vector rounded by *precision*\n" + " :rtype: tuple\n"); static PyObject *Vector_to_tuple(VectorObject *self, PyObject *args) { int ndigits = 0; @@ -766,17 +797,19 @@ static PyObject *Vector_to_tuple(VectorObject *self, PyObject *args) /** \name Vector Methods: To Track Quaternion * \{ */ -PyDoc_STRVAR(Vector_to_track_quat_doc, - ".. method:: to_track_quat(track, up)\n" - "\n" - " Return a quaternion rotation from the vector and the track and up axis.\n" - "\n" - " :arg track: Track axis in ['X', 'Y', 'Z', '-X', '-Y', '-Z'].\n" - " :type track: string\n" - " :arg up: Up axis in ['X', 'Y', 'Z'].\n" - " :type up: string\n" - " :return: rotation from the vector and the track and up axis.\n" - " :rtype: :class:`Quaternion`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Vector_to_track_quat_doc, + ".. method:: to_track_quat(track, up)\n" + "\n" + " Return a quaternion rotation from the vector and the track and up axis.\n" + "\n" + " :arg track: Track axis in ['X', 'Y', 'Z', '-X', '-Y', '-Z'].\n" + " :type track: string\n" + " :arg up: Up axis in ['X', 'Y', 'Z'].\n" + " :type up: string\n" + " :return: rotation from the vector and the track and up axis.\n" + " :rtype: :class:`Quaternion`\n"); static PyObject *Vector_to_track_quat(VectorObject *self, PyObject *args) { float vec[3], quat[4]; @@ -892,6 +925,7 @@ static PyObject *Vector_to_track_quat(VectorObject *self, PyObject *args) * \{ */ PyDoc_STRVAR( + /* Wrap. */ Vector_orthogonal_doc, ".. method:: orthogonal()\n" "\n" @@ -935,15 +969,17 @@ static PyObject *Vector_orthogonal(VectorObject *self) * `vec - ((2 * dot(vec, mirror)) * mirror)`. * \{ */ -PyDoc_STRVAR(Vector_reflect_doc, - ".. method:: reflect(mirror)\n" - "\n" - " Return the reflection vector from the *mirror* argument.\n" - "\n" - " :arg mirror: This vector could be a normal from the reflecting surface.\n" - " :type mirror: :class:`Vector`\n" - " :return: The reflected vector matching the size of this vector.\n" - " :rtype: :class:`Vector`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Vector_reflect_doc, + ".. method:: reflect(mirror)\n" + "\n" + " Return the reflection vector from the *mirror* argument.\n" + "\n" + " :arg mirror: This vector could be a normal from the reflecting surface.\n" + " :type mirror: :class:`Vector`\n" + " :return: The reflected vector matching the size of this vector.\n" + " :rtype: :class:`Vector`\n"); static PyObject *Vector_reflect(VectorObject *self, PyObject *value) { int value_num; @@ -986,17 +1022,19 @@ static PyObject *Vector_reflect(VectorObject *self, PyObject *value) /** \name Vector Methods: Cross Product * \{ */ -PyDoc_STRVAR(Vector_cross_doc, - ".. method:: cross(other)\n" - "\n" - " Return the cross product of this vector and another.\n" - "\n" - " :arg other: The other vector to perform the cross product with.\n" - " :type other: :class:`Vector`\n" - " :return: The cross product.\n" - " :rtype: :class:`Vector` or float when 2D vectors are used\n" - "\n" - " .. note:: both vectors must be 2D or 3D\n"); +PyDoc_STRVAR( + /* Wrap. */ + Vector_cross_doc, + ".. method:: cross(other)\n" + "\n" + " Return the cross product of this vector and another.\n" + "\n" + " :arg other: The other vector to perform the cross product with.\n" + " :type other: :class:`Vector`\n" + " :return: The cross product.\n" + " :rtype: :class:`Vector` or float when 2D vectors are used\n" + "\n" + " .. note:: both vectors must be 2D or 3D\n"); static PyObject *Vector_cross(VectorObject *self, PyObject *value) { PyObject *ret; @@ -1035,15 +1073,17 @@ static PyObject *Vector_cross(VectorObject *self, PyObject *value) /** \name Vector Methods: Dot Product * \{ */ -PyDoc_STRVAR(Vector_dot_doc, - ".. method:: dot(other)\n" - "\n" - " Return the dot product of this vector and another.\n" - "\n" - " :arg other: The other vector to perform the dot product with.\n" - " :type other: :class:`Vector`\n" - " :return: The dot product.\n" - " :rtype: float\n"); +PyDoc_STRVAR( + /* Wrap. */ + Vector_dot_doc, + ".. method:: dot(other)\n" + "\n" + " Return the dot product of this vector and another.\n" + "\n" + " :arg other: The other vector to perform the dot product with.\n" + " :type other: :class:`Vector`\n" + " :return: The dot product.\n" + " :rtype: float\n"); static PyObject *Vector_dot(VectorObject *self, PyObject *value) { float *tvec; @@ -1071,6 +1111,7 @@ static PyObject *Vector_dot(VectorObject *self, PyObject *value) * \{ */ PyDoc_STRVAR( + /* Wrap. */ Vector_angle_doc, ".. function:: angle(other, fallback=None)\n" "\n" @@ -1143,6 +1184,7 @@ static PyObject *Vector_angle(VectorObject *self, PyObject *args) * \{ */ PyDoc_STRVAR( + /* Wrap. */ Vector_angle_signed_doc, ".. function:: angle_signed(other, fallback)\n" "\n" @@ -1203,18 +1245,20 @@ static PyObject *Vector_angle_signed(VectorObject *self, PyObject *args) /** \name Vector Methods: Rotation Difference * \{ */ -PyDoc_STRVAR(Vector_rotation_difference_doc, - ".. function:: rotation_difference(other)\n" - "\n" - " Returns a quaternion representing the rotational difference between this\n" - " vector and another.\n" - "\n" - " :arg other: second vector.\n" - " :type other: :class:`Vector`\n" - " :return: the rotational difference between the two vectors.\n" - " :rtype: :class:`Quaternion`\n" - "\n" - " .. note:: 2D vectors raise an :exc:`AttributeError`.\n"); +PyDoc_STRVAR( + /* Wrap. */ + Vector_rotation_difference_doc, + ".. function:: rotation_difference(other)\n" + "\n" + " Returns a quaternion representing the rotational difference between this\n" + " vector and another.\n" + "\n" + " :arg other: second vector.\n" + " :type other: :class:`Vector`\n" + " :return: the rotational difference between the two vectors.\n" + " :rtype: :class:`Quaternion`\n" + "\n" + " .. note:: 2D vectors raise an :exc:`AttributeError`.\n"); static PyObject *Vector_rotation_difference(VectorObject *self, PyObject *value) { float quat[4], vec_a[3], vec_b[3]; @@ -1250,15 +1294,17 @@ static PyObject *Vector_rotation_difference(VectorObject *self, PyObject *value) /** \name Vector Methods: Project * \{ */ -PyDoc_STRVAR(Vector_project_doc, - ".. function:: project(other)\n" - "\n" - " Return the projection of this vector onto the *other*.\n" - "\n" - " :arg other: second vector.\n" - " :type other: :class:`Vector`\n" - " :return: the parallel projection vector\n" - " :rtype: :class:`Vector`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Vector_project_doc, + ".. function:: project(other)\n" + "\n" + " Return the projection of this vector onto the *other*.\n" + "\n" + " :arg other: second vector.\n" + " :type other: :class:`Vector`\n" + " :return: the parallel projection vector\n" + " :rtype: :class:`Vector`\n"); static PyObject *Vector_project(VectorObject *self, PyObject *value) { const int vec_num = self->vec_num; @@ -1295,17 +1341,19 @@ static PyObject *Vector_project(VectorObject *self, PyObject *value) /** \name Vector Methods: Linear Interpolation * \{ */ -PyDoc_STRVAR(Vector_lerp_doc, - ".. function:: lerp(other, factor)\n" - "\n" - " Returns the interpolation of two vectors.\n" - "\n" - " :arg other: value to interpolate with.\n" - " :type other: :class:`Vector`\n" - " :arg factor: The interpolation value in [0.0, 1.0].\n" - " :type factor: float\n" - " :return: The interpolated vector.\n" - " :rtype: :class:`Vector`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Vector_lerp_doc, + ".. function:: lerp(other, factor)\n" + "\n" + " Returns the interpolation of two vectors.\n" + "\n" + " :arg other: value to interpolate with.\n" + " :type other: :class:`Vector`\n" + " :arg factor: The interpolation value in [0.0, 1.0].\n" + " :type factor: float\n" + " :return: The interpolated vector.\n" + " :rtype: :class:`Vector`\n"); static PyObject *Vector_lerp(VectorObject *self, PyObject *args) { const int vec_num = self->vec_num; @@ -1338,21 +1386,23 @@ static PyObject *Vector_lerp(VectorObject *self, PyObject *args) /** \name Vector Methods: Spherical Interpolation * \{ */ -PyDoc_STRVAR(Vector_slerp_doc, - ".. function:: slerp(other, factor, fallback=None)\n" - "\n" - " Returns the interpolation of two non-zero vectors (spherical coordinates).\n" - "\n" - " :arg other: value to interpolate with.\n" - " :type other: :class:`Vector`\n" - " :arg factor: The interpolation value typically in [0.0, 1.0].\n" - " :type factor: float\n" - " :arg fallback: return this when the vector can't be calculated (zero length " - "vector or direct opposites),\n" - " (instead of raising a :exc:`ValueError`).\n" - " :type fallback: any\n" - " :return: The interpolated vector.\n" - " :rtype: :class:`Vector`\n"); +PyDoc_STRVAR( + /* Wrap. */ + Vector_slerp_doc, + ".. function:: slerp(other, factor, fallback=None)\n" + "\n" + " Returns the interpolation of two non-zero vectors (spherical coordinates).\n" + "\n" + " :arg other: value to interpolate with.\n" + " :type other: :class:`Vector`\n" + " :arg factor: The interpolation value typically in [0.0, 1.0].\n" + " :type factor: float\n" + " :arg fallback: return this when the vector can't be calculated (zero length " + "vector or direct opposites),\n" + " (instead of raising a :exc:`ValueError`).\n" + " :type fallback: any\n" + " :return: The interpolated vector.\n" + " :rtype: :class:`Vector`\n"); static PyObject *Vector_slerp(VectorObject *self, PyObject *args) { const int vec_num = self->vec_num; @@ -1432,6 +1482,7 @@ static PyObject *Vector_slerp(VectorObject *self, PyObject *args) * \{ */ PyDoc_STRVAR( + /* Wrap. */ Vector_rotate_doc, ".. function:: rotate(other)\n" "\n" @@ -1478,10 +1529,12 @@ static PyObject *Vector_rotate(VectorObject *self, PyObject *value) /** \name Vector Methods: Negate * \{ */ -PyDoc_STRVAR(Vector_negate_doc, - ".. method:: negate()\n" - "\n" - " Set all values to their negative.\n"); +PyDoc_STRVAR( + /* Wrap. */ + Vector_negate_doc, + ".. method:: negate()\n" + "\n" + " Set all values to their negative.\n"); static PyObject *Vector_negate(VectorObject *self) { if (BaseMath_ReadCallback(self) == -1) { @@ -1500,16 +1553,18 @@ static PyObject *Vector_negate(VectorObject *self) /** \name Vector Methods: Copy/Deep-Copy * \{ */ -PyDoc_STRVAR(Vector_copy_doc, - ".. function:: copy()\n" - "\n" - " Returns a copy of this vector.\n" - "\n" - " :return: A copy of the vector.\n" - " :rtype: :class:`Vector`\n" - "\n" - " .. note:: use this to get a copy of a wrapped vector with\n" - " no reference to the original data.\n"); +PyDoc_STRVAR( + /* Wrap. */ + Vector_copy_doc, + ".. function:: copy()\n" + "\n" + " Returns a copy of this vector.\n" + "\n" + " :return: A copy of the vector.\n" + " :rtype: :class:`Vector`\n" + "\n" + " .. note:: use this to get a copy of a wrapped vector with\n" + " no reference to the original data.\n"); static PyObject *Vector_copy(VectorObject *self) { if (BaseMath_ReadCallback(self) == -1) { @@ -2469,10 +2524,30 @@ static PyNumberMethods Vector_NumMethods = { /* Vector axis: `vector.x/y/z/w`. */ -PyDoc_STRVAR(Vector_axis_x_doc, "Vector X axis.\n\n:type: float"); -PyDoc_STRVAR(Vector_axis_y_doc, "Vector Y axis.\n\n:type: float"); -PyDoc_STRVAR(Vector_axis_z_doc, "Vector Z axis (3D Vectors only).\n\n:type: float"); -PyDoc_STRVAR(Vector_axis_w_doc, "Vector W axis (4D Vectors only).\n\n:type: float"); +PyDoc_STRVAR( + /* Wrap. */ + Vector_axis_x_doc, + "Vector X axis.\n" + "\n" + ":type: float"); +PyDoc_STRVAR( + /* Wrap. */ + Vector_axis_y_doc, + "Vector Y axis.\n" + "\n" + ":type: float"); +PyDoc_STRVAR( + /* Wrap. */ + Vector_axis_z_doc, + "Vector Z axis (3D Vectors only).\n" + "\n" + ":type: float"); +PyDoc_STRVAR( + /* Wrap. */ + Vector_axis_w_doc, + "Vector W axis (4D Vectors only).\n" + "\n" + ":type: float"); static PyObject *Vector_axis_get(VectorObject *self, void *type) { @@ -2486,7 +2561,12 @@ static int Vector_axis_set(VectorObject *self, PyObject *value, void *type) /* `Vector.length`. */ -PyDoc_STRVAR(Vector_length_doc, "Vector Length.\n\n:type: float"); +PyDoc_STRVAR( + /* Wrap. */ + Vector_length_doc, + "Vector Length.\n" + "\n" + ":type: float"); static PyObject *Vector_length_get(VectorObject *self, void * /*closure*/) { if (BaseMath_ReadCallback(self) == -1) { @@ -2541,7 +2621,12 @@ static int Vector_length_set(VectorObject *self, PyObject *value) } /* `Vector.length_squared`. */ -PyDoc_STRVAR(Vector_length_squared_doc, "Vector length squared (v.dot(v)).\n\n:type: float"); +PyDoc_STRVAR( + /* Wrap. */ + Vector_length_squared_doc, + "Vector length squared (v.dot(v)).\n" + "\n" + ":type: float"); static PyObject *Vector_length_squared_get(VectorObject *self, void * /*closure*/) { if (BaseMath_ReadCallback(self) == -1) { @@ -3343,13 +3428,15 @@ static PyMethodDef Vector_methods[] = { # define Vector_str nullptr #endif -PyDoc_STRVAR(vector_doc, - ".. class:: Vector(seq)\n" - "\n" - " This object gives access to Vectors in Blender.\n" - "\n" - " :arg seq: Components of the vector, must be a sequence of at least two\n" - " :type seq: sequence of numbers\n"); +PyDoc_STRVAR( + /* Wrap. */ + vector_doc, + ".. class:: Vector(seq)\n" + "\n" + " This object gives access to Vectors in Blender.\n" + "\n" + " :arg seq: Components of the vector, must be a sequence of at least two\n" + " :type seq: sequence of numbers\n"); PyTypeObject vector_Type = { /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0) /*tp_name*/ "Vector", diff --git a/source/blender/python/mathutils/mathutils_bvhtree.cc b/source/blender/python/mathutils/mathutils_bvhtree.cc index cde0b6e897a..c9d8f28afb6 100644 --- a/source/blender/python/mathutils/mathutils_bvhtree.cc +++ b/source/blender/python/mathutils/mathutils_bvhtree.cc @@ -319,16 +319,18 @@ static void py_bvhtree_nearest_point_cb(void *userdata, } } -PyDoc_STRVAR(py_bvhtree_ray_cast_doc, - ".. method:: ray_cast(origin, direction, distance=sys.float_info.max)\n" - "\n" - " Cast a ray onto the mesh.\n" - "\n" - " :arg origin: Start location of the ray in object space.\n" - " :type origin: :class:`Vector`\n" - " :arg direction: Direction of the ray in object space.\n" - " :type direction: :class:`Vector`\n" PYBVH_FIND_GENERIC_DISTANCE_DOC - PYBVH_FIND_GENERIC_RETURN_DOC); +PyDoc_STRVAR( + /* Wrap. */ + py_bvhtree_ray_cast_doc, + ".. method:: ray_cast(origin, direction, distance=sys.float_info.max)\n" + "\n" + " Cast a ray onto the mesh.\n" + "\n" + " :arg origin: Start location of the ray in object space.\n" + " :type origin: :class:`Vector`\n" + " :arg direction: Direction of the ray in object space.\n" + " :type direction: :class:`Vector`\n" PYBVH_FIND_GENERIC_DISTANCE_DOC + PYBVH_FIND_GENERIC_RETURN_DOC); static PyObject *py_bvhtree_ray_cast(PyBVHTree *self, PyObject *args) { const char *error_prefix = "ray_cast"; @@ -368,15 +370,17 @@ static PyObject *py_bvhtree_ray_cast(PyBVHTree *self, PyObject *args) return py_bvhtree_raycast_to_py_none(); } -PyDoc_STRVAR(py_bvhtree_find_nearest_doc, - ".. method:: find_nearest(origin, distance=" PYBVH_MAX_DIST_STR - ")\n" - "\n" - " Find the nearest element (typically face index) to a point.\n" - "\n" - " :arg co: Find nearest element to this point.\n" - " :type co: :class:`Vector`\n" PYBVH_FIND_GENERIC_DISTANCE_DOC - PYBVH_FIND_GENERIC_RETURN_DOC); +PyDoc_STRVAR( + /* Wrap. */ + py_bvhtree_find_nearest_doc, + ".. method:: find_nearest(origin, distance=" PYBVH_MAX_DIST_STR + ")\n" + "\n" + " Find the nearest element (typically face index) to a point.\n" + "\n" + " :arg co: Find nearest element to this point.\n" + " :type co: :class:`Vector`\n" PYBVH_FIND_GENERIC_DISTANCE_DOC + PYBVH_FIND_GENERIC_RETURN_DOC); static PyObject *py_bvhtree_find_nearest(PyBVHTree *self, PyObject *args) { const char *error_prefix = "find_nearest"; @@ -452,6 +456,7 @@ static void py_bvhtree_nearest_point_range_cb(void *userdata, } PyDoc_STRVAR( + /* Wrap. */ py_bvhtree_find_nearest_range_doc, ".. method:: find_nearest_range(origin, distance=" PYBVH_MAX_DIST_STR ")\n" @@ -545,6 +550,7 @@ static bool py_bvhtree_overlap_cb(void *userdata, int index_a, int index_b, int } PyDoc_STRVAR( + /* Wrap. */ py_bvhtree_overlap_doc, ".. method:: overlap(other_tree)\n" "\n" @@ -630,6 +636,7 @@ static PyObject *py_bvhtree_overlap(PyBVHTree *self, PyBVHTree *other) * \{ */ PyDoc_STRVAR( + /* Wrap. */ C_BVHTree_FromPolygons_doc, ".. classmethod:: FromPolygons(vertices, polygons, all_triangles=False, epsilon=0.0)\n" "\n" @@ -921,13 +928,15 @@ static PyObject *C_BVHTree_FromPolygons(PyObject * /*cls*/, PyObject *args, PyOb #ifndef MATH_STANDALONE -PyDoc_STRVAR(C_BVHTree_FromBMesh_doc, - ".. classmethod:: FromBMesh(bmesh, epsilon=0.0)\n" - "\n" - " BVH tree based on :class:`BMesh` data.\n" - "\n" - " :arg bmesh: BMesh data.\n" - " :type bmesh: :class:`BMesh`\n" PYBVH_FROM_GENERIC_EPSILON_DOC); +PyDoc_STRVAR( + /* Wrap. */ + C_BVHTree_FromBMesh_doc, + ".. classmethod:: FromBMesh(bmesh, epsilon=0.0)\n" + "\n" + " BVH tree based on :class:`BMesh` data.\n" + "\n" + " :arg bmesh: BMesh data.\n" + " :type bmesh: :class:`BMesh`\n" PYBVH_FROM_GENERIC_EPSILON_DOC); static PyObject *C_BVHTree_FromBMesh(PyObject * /*cls*/, PyObject *args, PyObject *kwargs) { const char *keywords[] = {"bmesh", "epsilon", nullptr}; @@ -1091,20 +1100,22 @@ static const Mesh *bvh_get_mesh(const char *funcname, return mesh_create_eval_no_deform(depsgraph, scene, ob, &data_masks); } -PyDoc_STRVAR(C_BVHTree_FromObject_doc, - ".. classmethod:: FromObject(object, depsgraph, deform=True, render=False, " - "cage=False, epsilon=0.0)\n" - "\n" - " BVH tree based on :class:`Object` data.\n" - "\n" - " :arg object: Object data.\n" - " :type object: :class:`Object`\n" - " :arg depsgraph: Depsgraph to use for evaluating the mesh.\n" - " :type depsgraph: :class:`Depsgraph`\n" - " :arg deform: Use mesh with deformations.\n" - " :type deform: bool\n" - " :arg cage: Use modifiers cage.\n" - " :type cage: bool\n" PYBVH_FROM_GENERIC_EPSILON_DOC); +PyDoc_STRVAR( + /* Wrap. */ + C_BVHTree_FromObject_doc, + ".. classmethod:: FromObject(object, depsgraph, deform=True, render=False, " + "cage=False, epsilon=0.0)\n" + "\n" + " BVH tree based on :class:`Object` data.\n" + "\n" + " :arg object: Object data.\n" + " :type object: :class:`Object`\n" + " :arg depsgraph: Depsgraph to use for evaluating the mesh.\n" + " :type depsgraph: :class:`Depsgraph`\n" + " :arg deform: Use mesh with deformations.\n" + " :type deform: bool\n" + " :arg cage: Use modifiers cage.\n" + " :type cage: bool\n" PYBVH_FROM_GENERIC_EPSILON_DOC); static PyObject *C_BVHTree_FromObject(PyObject * /*cls*/, PyObject *args, PyObject *kwargs) { /* NOTE: options here match #bpy_bmesh_from_object. */ @@ -1313,8 +1324,10 @@ PyTypeObject PyBVHTree_Type = { /* -------------------------------------------------------------------- */ /* Module definition */ -PyDoc_STRVAR(py_bvhtree_doc, - "BVH tree structures for proximity searches and ray casts on geometry."); +PyDoc_STRVAR( + /* Wrap. */ + py_bvhtree_doc, + "BVH tree structures for proximity searches and ray casts on geometry."); static PyModuleDef bvhtree_moduledef = { /*m_base*/ PyModuleDef_HEAD_INIT, /*m_name*/ "mathutils.bvhtree", diff --git a/source/blender/python/mathutils/mathutils_geometry.cc b/source/blender/python/mathutils/mathutils_geometry.cc index 59913bc2e20..a7de379bcda 100644 --- a/source/blender/python/mathutils/mathutils_geometry.cc +++ b/source/blender/python/mathutils/mathutils_geometry.cc @@ -30,31 +30,36 @@ #include "../generic/python_utildefines.h" /*-------------------------DOC STRINGS ---------------------------*/ -PyDoc_STRVAR(M_Geometry_doc, "The Blender geometry module"); +PyDoc_STRVAR( + /* Wrap. */ + M_Geometry_doc, + "The Blender geometry module"); /* ---------------------------------INTERSECTION FUNCTIONS-------------------- */ -PyDoc_STRVAR(M_Geometry_intersect_ray_tri_doc, - ".. function:: intersect_ray_tri(v1, v2, v3, ray, orig, clip=True)\n" - "\n" - " Returns the intersection between a ray and a triangle, if possible, returns None " - "otherwise.\n" - "\n" - " :arg v1: Point1\n" - " :type v1: :class:`mathutils.Vector`\n" - " :arg v2: Point2\n" - " :type v2: :class:`mathutils.Vector`\n" - " :arg v3: Point3\n" - " :type v3: :class:`mathutils.Vector`\n" - " :arg ray: Direction of the projection\n" - " :type ray: :class:`mathutils.Vector`\n" - " :arg orig: Origin\n" - " :type orig: :class:`mathutils.Vector`\n" - " :arg clip: When False, don't restrict the intersection to the area of the " - "triangle, use the infinite plane defined by the triangle.\n" - " :type clip: boolean\n" - " :return: The point of intersection or None if no intersection is found\n" - " :rtype: :class:`mathutils.Vector` or None\n"); +PyDoc_STRVAR( + /* Wrap. */ + M_Geometry_intersect_ray_tri_doc, + ".. function:: intersect_ray_tri(v1, v2, v3, ray, orig, clip=True)\n" + "\n" + " Returns the intersection between a ray and a triangle, if possible, returns None " + "otherwise.\n" + "\n" + " :arg v1: Point1\n" + " :type v1: :class:`mathutils.Vector`\n" + " :arg v2: Point2\n" + " :type v2: :class:`mathutils.Vector`\n" + " :arg v3: Point3\n" + " :type v3: :class:`mathutils.Vector`\n" + " :arg ray: Direction of the projection\n" + " :type ray: :class:`mathutils.Vector`\n" + " :arg orig: Origin\n" + " :type orig: :class:`mathutils.Vector`\n" + " :arg clip: When False, don't restrict the intersection to the area of the " + "triangle, use the infinite plane defined by the triangle.\n" + " :type clip: boolean\n" + " :return: The point of intersection or None if no intersection is found\n" + " :rtype: :class:`mathutils.Vector` or None\n"); static PyObject *M_Geometry_intersect_ray_tri(PyObject * /*self*/, PyObject *args) { const char *error_prefix = "intersect_ray_tri"; @@ -144,20 +149,22 @@ static PyObject *M_Geometry_intersect_ray_tri(PyObject * /*self*/, PyObject *arg /* Line-Line intersection using algorithm from mathworld.wolfram.com */ -PyDoc_STRVAR(M_Geometry_intersect_line_line_doc, - ".. function:: intersect_line_line(v1, v2, v3, v4)\n" - "\n" - " Returns a tuple with the points on each line respectively closest to the other.\n" - "\n" - " :arg v1: First point of the first line\n" - " :type v1: :class:`mathutils.Vector`\n" - " :arg v2: Second point of the first line\n" - " :type v2: :class:`mathutils.Vector`\n" - " :arg v3: First point of the second line\n" - " :type v3: :class:`mathutils.Vector`\n" - " :arg v4: Second point of the second line\n" - " :type v4: :class:`mathutils.Vector`\n" - " :rtype: tuple of :class:`mathutils.Vector`'s\n"); +PyDoc_STRVAR( + /* Wrap. */ + M_Geometry_intersect_line_line_doc, + ".. function:: intersect_line_line(v1, v2, v3, v4)\n" + "\n" + " Returns a tuple with the points on each line respectively closest to the other.\n" + "\n" + " :arg v1: First point of the first line\n" + " :type v1: :class:`mathutils.Vector`\n" + " :arg v2: Second point of the first line\n" + " :type v2: :class:`mathutils.Vector`\n" + " :arg v3: First point of the second line\n" + " :type v3: :class:`mathutils.Vector`\n" + " :arg v4: Second point of the second line\n" + " :type v4: :class:`mathutils.Vector`\n" + " :rtype: tuple of :class:`mathutils.Vector`'s\n"); static PyObject *M_Geometry_intersect_line_line(PyObject * /*self*/, PyObject *args) { const char *error_prefix = "intersect_line_line"; @@ -221,6 +228,7 @@ static PyObject *M_Geometry_intersect_line_line(PyObject * /*self*/, PyObject *a /* Line-Line intersection using algorithm from mathworld.wolfram.com */ PyDoc_STRVAR( + /* Wrap. */ M_Geometry_intersect_sphere_sphere_2d_doc, ".. function:: intersect_sphere_sphere_2d(p_a, radius_a, p_b, radius_b)\n" "\n" @@ -293,12 +301,14 @@ static PyObject *M_Geometry_intersect_sphere_sphere_2d(PyObject * /*self*/, PyOb return ret; } -PyDoc_STRVAR(M_Geometry_intersect_tri_tri_2d_doc, - ".. function:: intersect_tri_tri_2d(tri_a1, tri_a2, tri_a3, tri_b1, tri_b2, tri_b3)\n" - "\n" - " Check if two 2D triangles intersect.\n" - "\n" - " :rtype: bool\n"); +PyDoc_STRVAR( + /* Wrap. */ + M_Geometry_intersect_tri_tri_2d_doc, + ".. function:: intersect_tri_tri_2d(tri_a1, tri_a2, tri_a3, tri_b1, tri_b2, tri_b3)\n" + "\n" + " Check if two 2D triangles intersect.\n" + "\n" + " :rtype: bool\n"); static PyObject *M_Geometry_intersect_tri_tri_2d(PyObject * /*self*/, PyObject *args) { const char *error_prefix = "intersect_tri_tri_2d"; @@ -331,14 +341,16 @@ static PyObject *M_Geometry_intersect_tri_tri_2d(PyObject * /*self*/, PyObject * return PyBool_FromLong(ret); } -PyDoc_STRVAR(M_Geometry_normal_doc, - ".. function:: normal(vectors)\n" - "\n" - " Returns the normal of a 3D polygon.\n" - "\n" - " :arg vectors: Vectors to calculate normals with\n" - " :type vectors: sequence of 3 or more 3d vector\n" - " :rtype: :class:`mathutils.Vector`\n"); +PyDoc_STRVAR( + /* Wrap. */ + M_Geometry_normal_doc, + ".. function:: normal(vectors)\n" + "\n" + " Returns the normal of a 3D polygon.\n" + "\n" + " :arg vectors: Vectors to calculate normals with\n" + " :type vectors: sequence of 3 or more 3d vector\n" + " :rtype: :class:`mathutils.Vector`\n"); static PyObject *M_Geometry_normal(PyObject * /*self*/, PyObject *args) { float(*coords)[3]; @@ -372,18 +384,20 @@ finally: /* --------------------------------- AREA FUNCTIONS-------------------- */ -PyDoc_STRVAR(M_Geometry_area_tri_doc, - ".. function:: area_tri(v1, v2, v3)\n" - "\n" - " Returns the area size of the 2D or 3D triangle defined.\n" - "\n" - " :arg v1: Point1\n" - " :type v1: :class:`mathutils.Vector`\n" - " :arg v2: Point2\n" - " :type v2: :class:`mathutils.Vector`\n" - " :arg v3: Point3\n" - " :type v3: :class:`mathutils.Vector`\n" - " :rtype: float\n"); +PyDoc_STRVAR( + /* Wrap. */ + M_Geometry_area_tri_doc, + ".. function:: area_tri(v1, v2, v3)\n" + "\n" + " Returns the area size of the 2D or 3D triangle defined.\n" + "\n" + " :arg v1: Point1\n" + " :type v1: :class:`mathutils.Vector`\n" + " :arg v2: Point2\n" + " :type v2: :class:`mathutils.Vector`\n" + " :arg v3: Point3\n" + " :type v3: :class:`mathutils.Vector`\n" + " :rtype: float\n"); static PyObject *M_Geometry_area_tri(PyObject * /*self*/, PyObject *args) { const char *error_prefix = "area_tri"; @@ -405,20 +419,22 @@ static PyObject *M_Geometry_area_tri(PyObject * /*self*/, PyObject *args) return PyFloat_FromDouble((len == 3 ? area_tri_v3 : area_tri_v2)(UNPACK3(tri))); } -PyDoc_STRVAR(M_Geometry_volume_tetrahedron_doc, - ".. function:: volume_tetrahedron(v1, v2, v3, v4)\n" - "\n" - " Return the volume formed by a tetrahedron (points can be in any order).\n" - "\n" - " :arg v1: Point1\n" - " :type v1: :class:`mathutils.Vector`\n" - " :arg v2: Point2\n" - " :type v2: :class:`mathutils.Vector`\n" - " :arg v3: Point3\n" - " :type v3: :class:`mathutils.Vector`\n" - " :arg v4: Point4\n" - " :type v4: :class:`mathutils.Vector`\n" - " :rtype: float\n"); +PyDoc_STRVAR( + /* Wrap. */ + M_Geometry_volume_tetrahedron_doc, + ".. function:: volume_tetrahedron(v1, v2, v3, v4)\n" + "\n" + " Return the volume formed by a tetrahedron (points can be in any order).\n" + "\n" + " :arg v1: Point1\n" + " :type v1: :class:`mathutils.Vector`\n" + " :arg v2: Point2\n" + " :type v2: :class:`mathutils.Vector`\n" + " :arg v3: Point3\n" + " :type v3: :class:`mathutils.Vector`\n" + " :arg v4: Point4\n" + " :type v4: :class:`mathutils.Vector`\n" + " :rtype: float\n"); static PyObject *M_Geometry_volume_tetrahedron(PyObject * /*self*/, PyObject *args) { const char *error_prefix = "volume_tetrahedron"; @@ -440,6 +456,7 @@ static PyObject *M_Geometry_volume_tetrahedron(PyObject * /*self*/, PyObject *ar } PyDoc_STRVAR( + /* Wrap. */ M_Geometry_intersect_line_line_2d_doc, ".. function:: intersect_line_line_2d(lineA_p1, lineA_p2, lineB_p1, lineB_p2)\n" "\n" @@ -484,6 +501,7 @@ static PyObject *M_Geometry_intersect_line_line_2d(PyObject * /*self*/, PyObject } PyDoc_STRVAR( + /* Wrap. */ M_Geometry_intersect_line_plane_doc, ".. function:: intersect_line_plane(line_a, line_b, plane_co, plane_no, no_flip=False)\n" "\n" @@ -538,6 +556,7 @@ static PyObject *M_Geometry_intersect_line_plane(PyObject * /*self*/, PyObject * } PyDoc_STRVAR( + /* Wrap. */ M_Geometry_intersect_plane_plane_doc, ".. function:: intersect_plane_plane(plane_a_co, plane_a_no, plane_b_co, plane_b_no)\n" "\n" @@ -607,6 +626,7 @@ static PyObject *M_Geometry_intersect_plane_plane(PyObject * /*self*/, PyObject } PyDoc_STRVAR( + /* Wrap. */ M_Geometry_intersect_line_sphere_doc, ".. function:: intersect_line_sphere(line_a, line_b, sphere_co, sphere_radius, clip=True)\n" "\n" @@ -697,6 +717,7 @@ static PyObject *M_Geometry_intersect_line_sphere(PyObject * /*self*/, PyObject /* keep in sync with M_Geometry_intersect_line_sphere */ PyDoc_STRVAR( + /* Wrap. */ M_Geometry_intersect_line_sphere_2d_doc, ".. function:: intersect_line_sphere_2d(line_a, line_b, sphere_co, sphere_radius, clip=True)\n" "\n" @@ -786,6 +807,7 @@ static PyObject *M_Geometry_intersect_line_sphere_2d(PyObject * /*self*/, PyObje } PyDoc_STRVAR( + /* Wrap. */ M_Geometry_intersect_point_line_doc, ".. function:: intersect_point_line(pt, line_p1, line_p2)\n" "\n" @@ -832,22 +854,24 @@ static PyObject *M_Geometry_intersect_point_line(PyObject * /*self*/, PyObject * return ret; } -PyDoc_STRVAR(M_Geometry_intersect_point_tri_doc, - ".. function:: intersect_point_tri(pt, tri_p1, tri_p2, tri_p3)\n" - "\n" - " Takes 4 vectors: one is the point and the next 3 define the triangle. Projects " - "the point onto the triangle plane and checks if it is within the triangle.\n" - "\n" - " :arg pt: Point\n" - " :type pt: :class:`mathutils.Vector`\n" - " :arg tri_p1: First point of the triangle\n" - " :type tri_p1: :class:`mathutils.Vector`\n" - " :arg tri_p2: Second point of the triangle\n" - " :type tri_p2: :class:`mathutils.Vector`\n" - " :arg tri_p3: Third point of the triangle\n" - " :type tri_p3: :class:`mathutils.Vector`\n" - " :return: Point on the triangles plane or None if its outside the triangle\n" - " :rtype: :class:`mathutils.Vector` or None\n"); +PyDoc_STRVAR( + /* Wrap. */ + M_Geometry_intersect_point_tri_doc, + ".. function:: intersect_point_tri(pt, tri_p1, tri_p2, tri_p3)\n" + "\n" + " Takes 4 vectors: one is the point and the next 3 define the triangle. Projects " + "the point onto the triangle plane and checks if it is within the triangle.\n" + "\n" + " :arg pt: Point\n" + " :type pt: :class:`mathutils.Vector`\n" + " :arg tri_p1: First point of the triangle\n" + " :type tri_p1: :class:`mathutils.Vector`\n" + " :arg tri_p2: Second point of the triangle\n" + " :type tri_p2: :class:`mathutils.Vector`\n" + " :arg tri_p3: Third point of the triangle\n" + " :type tri_p3: :class:`mathutils.Vector`\n" + " :return: Point on the triangles plane or None if its outside the triangle\n" + " :rtype: :class:`mathutils.Vector` or None\n"); static PyObject *M_Geometry_intersect_point_tri(PyObject * /*self*/, PyObject *args) { const char *error_prefix = "intersect_point_tri"; @@ -879,21 +903,23 @@ static PyObject *M_Geometry_intersect_point_tri(PyObject * /*self*/, PyObject *a Py_RETURN_NONE; } -PyDoc_STRVAR(M_Geometry_closest_point_on_tri_doc, - ".. function:: closest_point_on_tri(pt, tri_p1, tri_p2, tri_p3)\n" - "\n" - " Takes 4 vectors: one is the point and the next 3 define the triangle.\n" - "\n" - " :arg pt: Point\n" - " :type pt: :class:`mathutils.Vector`\n" - " :arg tri_p1: First point of the triangle\n" - " :type tri_p1: :class:`mathutils.Vector`\n" - " :arg tri_p2: Second point of the triangle\n" - " :type tri_p2: :class:`mathutils.Vector`\n" - " :arg tri_p3: Third point of the triangle\n" - " :type tri_p3: :class:`mathutils.Vector`\n" - " :return: The closest point of the triangle.\n" - " :rtype: :class:`mathutils.Vector`\n"); +PyDoc_STRVAR( + /* Wrap. */ + M_Geometry_closest_point_on_tri_doc, + ".. function:: closest_point_on_tri(pt, tri_p1, tri_p2, tri_p3)\n" + "\n" + " Takes 4 vectors: one is the point and the next 3 define the triangle.\n" + "\n" + " :arg pt: Point\n" + " :type pt: :class:`mathutils.Vector`\n" + " :arg tri_p1: First point of the triangle\n" + " :type tri_p1: :class:`mathutils.Vector`\n" + " :arg tri_p2: Second point of the triangle\n" + " :type tri_p2: :class:`mathutils.Vector`\n" + " :arg tri_p3: Third point of the triangle\n" + " :type tri_p3: :class:`mathutils.Vector`\n" + " :return: The closest point of the triangle.\n" + " :rtype: :class:`mathutils.Vector`\n"); static PyObject *M_Geometry_closest_point_on_tri(PyObject * /*self*/, PyObject *args) { const char *error_prefix = "closest_point_on_tri"; @@ -924,6 +950,7 @@ static PyObject *M_Geometry_closest_point_on_tri(PyObject * /*self*/, PyObject * } PyDoc_STRVAR( + /* Wrap. */ M_Geometry_intersect_point_tri_2d_doc, ".. function:: intersect_point_tri_2d(pt, tri_p1, tri_p2, tri_p3)\n" "\n" @@ -962,26 +989,28 @@ static PyObject *M_Geometry_intersect_point_tri_2d(PyObject * /*self*/, PyObject return PyLong_FromLong(isect_point_tri_v2(pt, UNPACK3(tri))); } -PyDoc_STRVAR(M_Geometry_intersect_point_quad_2d_doc, - ".. function:: intersect_point_quad_2d(pt, quad_p1, quad_p2, quad_p3, quad_p4)\n" - "\n" - " Takes 5 vectors (using only the x and y coordinates): one is the point and the " - "next 4 define the quad,\n" - " only the x and y are used from the vectors. Returns 1 if the point is within the " - "quad, otherwise 0.\n" - " Works only with convex quads without singular edges.\n" - "\n" - " :arg pt: Point\n" - " :type pt: :class:`mathutils.Vector`\n" - " :arg quad_p1: First point of the quad\n" - " :type quad_p1: :class:`mathutils.Vector`\n" - " :arg quad_p2: Second point of the quad\n" - " :type quad_p2: :class:`mathutils.Vector`\n" - " :arg quad_p3: Third point of the quad\n" - " :type quad_p3: :class:`mathutils.Vector`\n" - " :arg quad_p4: Fourth point of the quad\n" - " :type quad_p4: :class:`mathutils.Vector`\n" - " :rtype: int\n"); +PyDoc_STRVAR( + /* Wrap. */ + M_Geometry_intersect_point_quad_2d_doc, + ".. function:: intersect_point_quad_2d(pt, quad_p1, quad_p2, quad_p3, quad_p4)\n" + "\n" + " Takes 5 vectors (using only the x and y coordinates): one is the point and the " + "next 4 define the quad,\n" + " only the x and y are used from the vectors. Returns 1 if the point is within the " + "quad, otherwise 0.\n" + " Works only with convex quads without singular edges.\n" + "\n" + " :arg pt: Point\n" + " :type pt: :class:`mathutils.Vector`\n" + " :arg quad_p1: First point of the quad\n" + " :type quad_p1: :class:`mathutils.Vector`\n" + " :arg quad_p2: Second point of the quad\n" + " :type quad_p2: :class:`mathutils.Vector`\n" + " :arg quad_p3: Third point of the quad\n" + " :type quad_p3: :class:`mathutils.Vector`\n" + " :arg quad_p4: Fourth point of the quad\n" + " :type quad_p4: :class:`mathutils.Vector`\n" + " :rtype: int\n"); static PyObject *M_Geometry_intersect_point_quad_2d(PyObject * /*self*/, PyObject *args) { const char *error_prefix = "intersect_point_quad_2d"; @@ -1005,19 +1034,21 @@ static PyObject *M_Geometry_intersect_point_quad_2d(PyObject * /*self*/, PyObjec return PyLong_FromLong(isect_point_quad_v2(pt, UNPACK4(quad))); } -PyDoc_STRVAR(M_Geometry_distance_point_to_plane_doc, - ".. function:: distance_point_to_plane(pt, plane_co, plane_no)\n" - "\n" - " Returns the signed distance between a point and a plane " - " (negative when below the normal).\n" - "\n" - " :arg pt: Point\n" - " :type pt: :class:`mathutils.Vector`\n" - " :arg plane_co: A point on the plane\n" - " :type plane_co: :class:`mathutils.Vector`\n" - " :arg plane_no: The direction the plane is facing\n" - " :type plane_no: :class:`mathutils.Vector`\n" - " :rtype: float\n"); +PyDoc_STRVAR( + /* Wrap. */ + M_Geometry_distance_point_to_plane_doc, + ".. function:: distance_point_to_plane(pt, plane_co, plane_no)\n" + "\n" + " Returns the signed distance between a point and a plane " + " (negative when below the normal).\n" + "\n" + " :arg pt: Point\n" + " :type pt: :class:`mathutils.Vector`\n" + " :arg plane_co: A point on the plane\n" + " :type plane_co: :class:`mathutils.Vector`\n" + " :arg plane_no: The direction the plane is facing\n" + " :type plane_no: :class:`mathutils.Vector`\n" + " :rtype: float\n"); static PyObject *M_Geometry_distance_point_to_plane(PyObject * /*self*/, PyObject *args) { const char *error_prefix = "distance_point_to_plane"; @@ -1042,6 +1073,7 @@ static PyObject *M_Geometry_distance_point_to_plane(PyObject * /*self*/, PyObjec } PyDoc_STRVAR( + /* Wrap. */ M_Geometry_barycentric_transform_doc, ".. function:: barycentric_transform(point, tri_a1, tri_a2, tri_a3, tri_b1, tri_b2, tri_b3)\n" "\n" @@ -1111,17 +1143,19 @@ static void points_in_planes_fn(const float co[3], int i, int j, int k, void *us user_data->planes_used[k] = true; } -PyDoc_STRVAR(M_Geometry_points_in_planes_doc, - ".. function:: points_in_planes(planes)\n" - "\n" - " Returns a list of points inside all planes given and a list of index values for " - "the planes used.\n" - "\n" - " :arg planes: List of planes (4D vectors).\n" - " :type planes: list of :class:`mathutils.Vector`\n" - " :return: two lists, once containing the vertices inside the planes, another " - "containing the plane indices used\n" - " :rtype: pair of lists\n"); +PyDoc_STRVAR( + /* Wrap. */ + M_Geometry_points_in_planes_doc, + ".. function:: points_in_planes(planes)\n" + "\n" + " Returns a list of points inside all planes given and a list of index values for " + "the planes used.\n" + "\n" + " :arg planes: List of planes (4D vectors).\n" + " :type planes: list of :class:`mathutils.Vector`\n" + " :return: two lists, once containing the vertices inside the planes, another " + "containing the plane indices used\n" + " :rtype: pair of lists\n"); static PyObject *M_Geometry_points_in_planes(PyObject * /*self*/, PyObject *args) { PyObject *py_planes; @@ -1175,23 +1209,25 @@ static PyObject *M_Geometry_points_in_planes(PyObject * /*self*/, PyObject *args #ifndef MATH_STANDALONE -PyDoc_STRVAR(M_Geometry_interpolate_bezier_doc, - ".. function:: interpolate_bezier(knot1, handle1, handle2, knot2, resolution)\n" - "\n" - " Interpolate a bezier spline segment.\n" - "\n" - " :arg knot1: First bezier spline point.\n" - " :type knot1: :class:`mathutils.Vector`\n" - " :arg handle1: First bezier spline handle.\n" - " :type handle1: :class:`mathutils.Vector`\n" - " :arg handle2: Second bezier spline handle.\n" - " :type handle2: :class:`mathutils.Vector`\n" - " :arg knot2: Second bezier spline point.\n" - " :type knot2: :class:`mathutils.Vector`\n" - " :arg resolution: Number of points to return.\n" - " :type resolution: int\n" - " :return: The interpolated points\n" - " :rtype: list of :class:`mathutils.Vector`'s\n"); +PyDoc_STRVAR( + /* Wrap. */ + M_Geometry_interpolate_bezier_doc, + ".. function:: interpolate_bezier(knot1, handle1, handle2, knot2, resolution)\n" + "\n" + " Interpolate a bezier spline segment.\n" + "\n" + " :arg knot1: First bezier spline point.\n" + " :type knot1: :class:`mathutils.Vector`\n" + " :arg handle1: First bezier spline handle.\n" + " :type handle1: :class:`mathutils.Vector`\n" + " :arg handle2: Second bezier spline handle.\n" + " :type handle2: :class:`mathutils.Vector`\n" + " :arg knot2: Second bezier spline point.\n" + " :type knot2: :class:`mathutils.Vector`\n" + " :arg resolution: Number of points to return.\n" + " :type resolution: int\n" + " :return: The interpolated points\n" + " :rtype: list of :class:`mathutils.Vector`'s\n"); static PyObject *M_Geometry_interpolate_bezier(PyObject * /*self*/, PyObject *args) { const char *error_prefix = "interpolate_bezier"; @@ -1237,15 +1273,17 @@ static PyObject *M_Geometry_interpolate_bezier(PyObject * /*self*/, PyObject *ar return list; } -PyDoc_STRVAR(M_Geometry_tessellate_polygon_doc, - ".. function:: tessellate_polygon(veclist_list)\n" - "\n" - " Takes a list of polylines (each point a pair or triplet of numbers) and returns " - "the point indices for a polyline filled with triangles. Does not handle degenerate " - "geometry (such as zero-length lines due to consecutive identical points).\n" - "\n" - " :arg veclist_list: list of polylines\n" - " :rtype: list\n"); +PyDoc_STRVAR( + /* Wrap. */ + M_Geometry_tessellate_polygon_doc, + ".. function:: tessellate_polygon(veclist_list)\n" + "\n" + " Takes a list of polylines (each point a pair or triplet of numbers) and returns " + "the point indices for a polyline filled with triangles. Does not handle degenerate " + "geometry (such as zero-length lines due to consecutive identical points).\n" + "\n" + " :arg veclist_list: list of polylines\n" + " :rtype: list\n"); /* PolyFill function, uses Blenders scan-fill to fill multiple poly lines. */ static PyObject *M_Geometry_tessellate_polygon(PyObject * /*self*/, PyObject *polyLineSeq) { @@ -1413,16 +1451,18 @@ static void boxPack_ToPyObject(PyObject *value, const BoxPack *boxarray) } } -PyDoc_STRVAR(M_Geometry_box_pack_2d_doc, - ".. function:: box_pack_2d(boxes)\n" - "\n" - " Returns a tuple with the width and height of the packed bounding box.\n" - "\n" - " :arg boxes: list of boxes, each box is a list where the first 4 items are [x, y, " - "width, height, ...] other items are ignored.\n" - " :type boxes: list\n" - " :return: the width and height of the packed bounding box\n" - " :rtype: tuple, pair of floats\n"); +PyDoc_STRVAR( + /* Wrap. */ + M_Geometry_box_pack_2d_doc, + ".. function:: box_pack_2d(boxes)\n" + "\n" + " Returns a tuple with the width and height of the packed bounding box.\n" + "\n" + " :arg boxes: list of boxes, each box is a list where the first 4 items are [x, y, " + "width, height, ...] other items are ignored.\n" + " :type boxes: list\n" + " :return: the width and height of the packed bounding box\n" + " :rtype: tuple, pair of floats\n"); static PyObject *M_Geometry_box_pack_2d(PyObject * /*self*/, PyObject *boxlist) { float tot_width = 0.0f, tot_height = 0.0f; @@ -1455,15 +1495,17 @@ static PyObject *M_Geometry_box_pack_2d(PyObject * /*self*/, PyObject *boxlist) return ret; } -PyDoc_STRVAR(M_Geometry_box_fit_2d_doc, - ".. function:: box_fit_2d(points)\n" - "\n" - " Returns an angle that best fits the points to an axis aligned rectangle\n" - "\n" - " :arg points: list of 2d points.\n" - " :type points: list\n" - " :return: angle\n" - " :rtype: float\n"); +PyDoc_STRVAR( + /* Wrap. */ + M_Geometry_box_fit_2d_doc, + ".. function:: box_fit_2d(points)\n" + "\n" + " Returns an angle that best fits the points to an axis aligned rectangle\n" + "\n" + " :arg points: list of 2d points.\n" + " :type points: list\n" + " :return: angle\n" + " :rtype: float\n"); static PyObject *M_Geometry_box_fit_2d(PyObject * /*self*/, PyObject *pointlist) { float(*points)[2]; @@ -1486,15 +1528,17 @@ static PyObject *M_Geometry_box_fit_2d(PyObject * /*self*/, PyObject *pointlist) return PyFloat_FromDouble(angle); } -PyDoc_STRVAR(M_Geometry_convex_hull_2d_doc, - ".. function:: convex_hull_2d(points)\n" - "\n" - " Returns a list of indices into the list given\n" - "\n" - " :arg points: list of 2d points.\n" - " :type points: list\n" - " :return: a list of indices\n" - " :rtype: list of ints\n"); +PyDoc_STRVAR( + /* Wrap. */ + M_Geometry_convex_hull_2d_doc, + ".. function:: convex_hull_2d(points)\n" + "\n" + " Returns a list of indices into the list given\n" + "\n" + " :arg points: list of 2d points.\n" + " :type points: list\n" + " :return: a list of indices\n" + " :rtype: list of ints\n"); static PyObject *M_Geometry_convex_hull_2d(PyObject * /*self*/, PyObject *pointlist) { float(*points)[2]; @@ -1554,6 +1598,7 @@ static PyObject *list_of_lists_from_arrays(const blender::Spantp_free((PyObject *)self); } -PyDoc_STRVAR(py_kdtree_insert_doc, - ".. method:: insert(co, index)\n" - "\n" - " Insert a point into the KDTree.\n" - "\n" - " :arg co: Point 3d position.\n" - " :type co: float triplet\n" - " :arg index: The index of the point.\n" - " :type index: int\n"); +PyDoc_STRVAR( + /* Wrap. */ + py_kdtree_insert_doc, + ".. method:: insert(co, index)\n" + "\n" + " Insert a point into the KDTree.\n" + "\n" + " :arg co: Point 3d position.\n" + " :type co: float triplet\n" + " :arg index: The index of the point.\n" + " :type index: int\n"); static PyObject *py_kdtree_insert(PyKDTree *self, PyObject *args, PyObject *kwargs) { PyObject *py_co; @@ -147,14 +149,16 @@ static PyObject *py_kdtree_insert(PyKDTree *self, PyObject *args, PyObject *kwar Py_RETURN_NONE; } -PyDoc_STRVAR(py_kdtree_balance_doc, - ".. method:: balance()\n" - "\n" - " Balance the tree.\n" - "\n" - ".. note::\n" - "\n" - " This builds the entire tree, avoid calling after each insertion.\n"); +PyDoc_STRVAR( + /* Wrap. */ + py_kdtree_balance_doc, + ".. method:: balance()\n" + "\n" + " Balance the tree.\n" + "\n" + ".. note::\n" + "\n" + " This builds the entire tree, avoid calling after each insertion.\n"); static PyObject *py_kdtree_balance(PyKDTree *self) { BLI_kdtree_3d_balance(self->obj); @@ -191,18 +195,20 @@ static int py_find_nearest_cb(void *user_data, int index, const float co[3], flo return -1; } -PyDoc_STRVAR(py_kdtree_find_doc, - ".. method:: find(co, filter=None)\n" - "\n" - " Find nearest point to ``co``.\n" - "\n" - " :arg co: 3d coordinates.\n" - " :type co: float triplet\n" - " :arg filter: function which takes an index and returns True for indices to " - "include in the search.\n" - " :type filter: callable\n" - " :return: Returns (:class:`Vector`, index, distance).\n" - " :rtype: :class:`tuple`\n"); +PyDoc_STRVAR( + /* Wrap. */ + py_kdtree_find_doc, + ".. method:: find(co, filter=None)\n" + "\n" + " Find nearest point to ``co``.\n" + "\n" + " :arg co: 3d coordinates.\n" + " :type co: float triplet\n" + " :arg filter: function which takes an index and returns True for indices to " + "include in the search.\n" + " :type filter: callable\n" + " :return: Returns (:class:`Vector`, index, distance).\n" + " :rtype: :class:`tuple`\n"); static PyObject *py_kdtree_find(PyKDTree *self, PyObject *args, PyObject *kwargs) { PyObject *py_co, *py_filter = nullptr; @@ -246,17 +252,19 @@ static PyObject *py_kdtree_find(PyKDTree *self, PyObject *args, PyObject *kwargs return kdtree_nearest_to_py_and_check(&nearest); } -PyDoc_STRVAR(py_kdtree_find_n_doc, - ".. method:: find_n(co, n)\n" - "\n" - " Find nearest ``n`` points to ``co``.\n" - "\n" - " :arg co: 3d coordinates.\n" - " :type co: float triplet\n" - " :arg n: Number of points to find.\n" - " :type n: int\n" - " :return: Returns a list of tuples (:class:`Vector`, index, distance).\n" - " :rtype: :class:`list`\n"); +PyDoc_STRVAR( + /* Wrap. */ + py_kdtree_find_n_doc, + ".. method:: find_n(co, n)\n" + "\n" + " Find nearest ``n`` points to ``co``.\n" + "\n" + " :arg co: 3d coordinates.\n" + " :type co: float triplet\n" + " :arg n: Number of points to find.\n" + " :type n: int\n" + " :return: Returns a list of tuples (:class:`Vector`, index, distance).\n" + " :rtype: :class:`list`\n"); static PyObject *py_kdtree_find_n(PyKDTree *self, PyObject *args, PyObject *kwargs) { PyObject *py_list; @@ -300,17 +308,19 @@ static PyObject *py_kdtree_find_n(PyKDTree *self, PyObject *args, PyObject *kwar return py_list; } -PyDoc_STRVAR(py_kdtree_find_range_doc, - ".. method:: find_range(co, radius)\n" - "\n" - " Find all points within ``radius`` of ``co``.\n" - "\n" - " :arg co: 3d coordinates.\n" - " :type co: float triplet\n" - " :arg radius: Distance to search for points.\n" - " :type radius: float\n" - " :return: Returns a list of tuples (:class:`Vector`, index, distance).\n" - " :rtype: :class:`list`\n"); +PyDoc_STRVAR( + /* Wrap. */ + py_kdtree_find_range_doc, + ".. method:: find_range(co, radius)\n" + "\n" + " Find all points within ``radius`` of ``co``.\n" + "\n" + " :arg co: 3d coordinates.\n" + " :type co: float triplet\n" + " :arg radius: Distance to search for points.\n" + " :type radius: float\n" + " :return: Returns a list of tuples (:class:`Vector`, index, distance).\n" + " :rtype: :class:`list`\n"); static PyObject *py_kdtree_find_range(PyKDTree *self, PyObject *args, PyObject *kwargs) { PyObject *py_list; @@ -378,13 +388,15 @@ static PyMethodDef PyKDTree_methods[] = { # pragma GCC diagnostic pop #endif -PyDoc_STRVAR(py_KDtree_doc, - "KdTree(size) -> new kd-tree initialized to hold ``size`` items.\n" - "\n" - ".. note::\n" - "\n" - " :class:`KDTree.balance` must have been called before using any of the ``find`` " - "methods.\n"); +PyDoc_STRVAR( + /* Wrap. */ + py_KDtree_doc, + "KdTree(size) -> new kd-tree initialized to hold ``size`` items.\n" + "\n" + ".. note::\n" + "\n" + " :class:`KDTree.balance` must have been called before using any of the ``find`` " + "methods.\n"); PyTypeObject PyKDTree_Type = { /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0) @@ -438,7 +450,10 @@ PyTypeObject PyKDTree_Type = { /*tp_vectorcall*/ nullptr, }; -PyDoc_STRVAR(py_kdtree_doc, "Generic 3-dimensional kd-tree to perform spatial searches."); +PyDoc_STRVAR( + /* Wrap. */ + py_kdtree_doc, + "Generic 3-dimensional kd-tree to perform spatial searches."); static PyModuleDef kdtree_moduledef = { /*m_base*/ PyModuleDef_HEAD_INIT, /*m_name*/ "mathutils.kdtree", diff --git a/source/blender/python/mathutils/mathutils_noise.cc b/source/blender/python/mathutils/mathutils_noise.cc index 395341f42ea..2e0c1655dfc 100644 --- a/source/blender/python/mathutils/mathutils_noise.cc +++ b/source/blender/python/mathutils/mathutils_noise.cc @@ -275,33 +275,40 @@ static void vTurb(float x, } /*-------------------------DOC STRINGS ---------------------------*/ -PyDoc_STRVAR(M_Noise_doc, "The Blender noise module"); +PyDoc_STRVAR( + /* Wrap. */ + M_Noise_doc, + "The Blender noise module"); /*------------------------------------------------------------*/ /* Python Functions */ /*------------------------------------------------------------*/ -PyDoc_STRVAR(M_Noise_random_doc, - ".. function:: random()\n" - "\n" - " Returns a random number in the range [0, 1).\n" - "\n" - " :return: The random number.\n" - " :rtype: float\n"); +PyDoc_STRVAR( + /* Wrap. */ + M_Noise_random_doc, + ".. function:: random()\n" + "\n" + " Returns a random number in the range [0, 1).\n" + "\n" + " :return: The random number.\n" + " :rtype: float\n"); static PyObject *M_Noise_random(PyObject * /*self*/) { return PyFloat_FromDouble(frand()); } -PyDoc_STRVAR(M_Noise_random_unit_vector_doc, - ".. function:: random_unit_vector(size=3)\n" - "\n" - " Returns a unit vector with random entries.\n" - "\n" - " :arg size: The size of the vector to be produced, in the range [2, 4].\n" - " :type size: int\n" - " :return: The random unit vector.\n" - " :rtype: :class:`mathutils.Vector`\n"); +PyDoc_STRVAR( + /* Wrap. */ + M_Noise_random_unit_vector_doc, + ".. function:: random_unit_vector(size=3)\n" + "\n" + " Returns a unit vector with random entries.\n" + "\n" + " :arg size: The size of the vector to be produced, in the range [2, 4].\n" + " :type size: int\n" + " :return: The random unit vector.\n" + " :rtype: :class:`mathutils.Vector`\n"); static PyObject *M_Noise_random_unit_vector(PyObject * /*self*/, PyObject *args, PyObject *kw) { static const char *kwlist[] = {"size", nullptr}; @@ -327,15 +334,17 @@ static PyObject *M_Noise_random_unit_vector(PyObject * /*self*/, PyObject *args, return Vector_CreatePyObject(vec, vec_num, nullptr); } -PyDoc_STRVAR(M_Noise_random_vector_doc, - ".. function:: random_vector(size=3)\n" - "\n" - " Returns a vector with random entries in the range (-1, 1).\n" - "\n" - " :arg size: The size of the vector to be produced.\n" - " :type size: int\n" - " :return: The random vector.\n" - " :rtype: :class:`mathutils.Vector`\n"); +PyDoc_STRVAR( + /* Wrap. */ + M_Noise_random_vector_doc, + ".. function:: random_vector(size=3)\n" + "\n" + " Returns a vector with random entries in the range (-1, 1).\n" + "\n" + " :arg size: The size of the vector to be produced.\n" + " :type size: int\n" + " :return: The random vector.\n" + " :rtype: :class:`mathutils.Vector`\n"); static PyObject *M_Noise_random_vector(PyObject * /*self*/, PyObject *args, PyObject *kw) { static const char *kwlist[] = {"size", nullptr}; @@ -358,14 +367,16 @@ static PyObject *M_Noise_random_vector(PyObject * /*self*/, PyObject *args, PyOb return Vector_CreatePyObject_alloc(vec, vec_num, nullptr); } -PyDoc_STRVAR(M_Noise_seed_set_doc, - ".. function:: seed_set(seed)\n" - "\n" - " Sets the random seed used for random_unit_vector, and random.\n" - "\n" - " :arg seed: Seed used for the random generator.\n" - " When seed is zero, the current time will be used instead.\n" - " :type seed: int\n"); +PyDoc_STRVAR( + /* Wrap. */ + M_Noise_seed_set_doc, + ".. function:: seed_set(seed)\n" + "\n" + " Sets the random seed used for random_unit_vector, and random.\n" + "\n" + " :arg seed: Seed used for the random generator.\n" + " When seed is zero, the current time will be used instead.\n" + " :type seed: int\n"); static PyObject *M_Noise_seed_set(PyObject * /*self*/, PyObject *args) { int s; @@ -376,15 +387,17 @@ static PyObject *M_Noise_seed_set(PyObject * /*self*/, PyObject *args) Py_RETURN_NONE; } -PyDoc_STRVAR(M_Noise_noise_doc, - ".. function:: noise(position, noise_basis='PERLIN_ORIGINAL')\n" - "\n" - " Returns noise value from the noise basis at the position specified.\n" - "\n" - " :arg position: The position to evaluate the selected noise function.\n" - " :type position: :class:`mathutils.Vector`\n" BPY_NOISE_BASIS_ENUM_DOC - " :return: The noise value.\n" - " :rtype: float\n"); +PyDoc_STRVAR( + /* Wrap. */ + M_Noise_noise_doc, + ".. function:: noise(position, noise_basis='PERLIN_ORIGINAL')\n" + "\n" + " Returns noise value from the noise basis at the position specified.\n" + "\n" + " :arg position: The position to evaluate the selected noise function.\n" + " :type position: :class:`mathutils.Vector`\n" BPY_NOISE_BASIS_ENUM_DOC + " :return: The noise value.\n" + " :rtype: float\n"); static PyObject *M_Noise_noise(PyObject * /*self*/, PyObject *args, PyObject *kw) { static const char *kwlist[] = {"", "noise_basis", nullptr}; @@ -417,15 +430,17 @@ static PyObject *M_Noise_noise(PyObject * /*self*/, PyObject *args, PyObject *kw 1.0f)); } -PyDoc_STRVAR(M_Noise_noise_vector_doc, - ".. function:: noise_vector(position, noise_basis='PERLIN_ORIGINAL')\n" - "\n" - " Returns the noise vector from the noise basis at the specified position.\n" - "\n" - " :arg position: The position to evaluate the selected noise function.\n" - " :type position: :class:`mathutils.Vector`\n" BPY_NOISE_BASIS_ENUM_DOC - " :return: The noise vector.\n" - " :rtype: :class:`mathutils.Vector`\n"); +PyDoc_STRVAR( + /* Wrap. */ + M_Noise_noise_vector_doc, + ".. function:: noise_vector(position, noise_basis='PERLIN_ORIGINAL')\n" + "\n" + " Returns the noise vector from the noise basis at the specified position.\n" + "\n" + " :arg position: The position to evaluate the selected noise function.\n" + " :type position: :class:`mathutils.Vector`\n" BPY_NOISE_BASIS_ENUM_DOC + " :return: The noise vector.\n" + " :rtype: :class:`mathutils.Vector`\n"); static PyObject *M_Noise_noise_vector(PyObject * /*self*/, PyObject *args, PyObject *kw) { static const char *kwlist[] = {"", "noise_basis", nullptr}; @@ -458,25 +473,27 @@ static PyObject *M_Noise_noise_vector(PyObject * /*self*/, PyObject *args, PyObj return Vector_CreatePyObject(r_vec, 3, nullptr); } -PyDoc_STRVAR(M_Noise_turbulence_doc, - ".. function:: turbulence(position, octaves, hard, noise_basis='PERLIN_ORIGINAL', " - "amplitude_scale=0.5, frequency_scale=2.0)\n" - "\n" - " Returns the turbulence value from the noise basis at the specified position.\n" - "\n" - " :arg position: The position to evaluate the selected noise function.\n" - " :type position: :class:`mathutils.Vector`\n" - " :arg octaves: The number of different noise frequencies used.\n" - " :type octaves: int\n" - " :arg hard: Specifies whether returned turbulence is hard (sharp transitions) or " - "soft (smooth transitions).\n" - " :type hard: boolean\n" BPY_NOISE_BASIS_ENUM_DOC - " :arg amplitude_scale: The amplitude scaling factor.\n" - " :type amplitude_scale: float\n" - " :arg frequency_scale: The frequency scaling factor\n" - " :type frequency_scale: float\n" - " :return: The turbulence value.\n" - " :rtype: float\n"); +PyDoc_STRVAR( + /* Wrap. */ + M_Noise_turbulence_doc, + ".. function:: turbulence(position, octaves, hard, noise_basis='PERLIN_ORIGINAL', " + "amplitude_scale=0.5, frequency_scale=2.0)\n" + "\n" + " Returns the turbulence value from the noise basis at the specified position.\n" + "\n" + " :arg position: The position to evaluate the selected noise function.\n" + " :type position: :class:`mathutils.Vector`\n" + " :arg octaves: The number of different noise frequencies used.\n" + " :type octaves: int\n" + " :arg hard: Specifies whether returned turbulence is hard (sharp transitions) or " + "soft (smooth transitions).\n" + " :type hard: boolean\n" BPY_NOISE_BASIS_ENUM_DOC + " :arg amplitude_scale: The amplitude scaling factor.\n" + " :type amplitude_scale: float\n" + " :arg frequency_scale: The frequency scaling factor\n" + " :type frequency_scale: float\n" + " :return: The turbulence value.\n" + " :rtype: float\n"); static PyObject *M_Noise_turbulence(PyObject * /*self*/, PyObject *args, PyObject *kw) { static const char *kwlist[] = { @@ -517,25 +534,27 @@ static PyObject *M_Noise_turbulence(PyObject * /*self*/, PyObject *args, PyObjec return PyFloat_FromDouble(turb(vec[0], vec[1], vec[2], oct, hd, noise_basis_enum, as, fs)); } -PyDoc_STRVAR(M_Noise_turbulence_vector_doc, - ".. function:: turbulence_vector(position, octaves, hard, " - "noise_basis='PERLIN_ORIGINAL', amplitude_scale=0.5, frequency_scale=2.0)\n" - "\n" - " Returns the turbulence vector from the noise basis at the specified position.\n" - "\n" - " :arg position: The position to evaluate the selected noise function.\n" - " :type position: :class:`mathutils.Vector`\n" - " :arg octaves: The number of different noise frequencies used.\n" - " :type octaves: int\n" - " :arg hard: Specifies whether returned turbulence is hard (sharp transitions) or " - "soft (smooth transitions).\n" - " :type hard: boolean\n" BPY_NOISE_BASIS_ENUM_DOC - " :arg amplitude_scale: The amplitude scaling factor.\n" - " :type amplitude_scale: float\n" - " :arg frequency_scale: The frequency scaling factor\n" - " :type frequency_scale: float\n" - " :return: The turbulence vector.\n" - " :rtype: :class:`mathutils.Vector`\n"); +PyDoc_STRVAR( + /* Wrap. */ + M_Noise_turbulence_vector_doc, + ".. function:: turbulence_vector(position, octaves, hard, " + "noise_basis='PERLIN_ORIGINAL', amplitude_scale=0.5, frequency_scale=2.0)\n" + "\n" + " Returns the turbulence vector from the noise basis at the specified position.\n" + "\n" + " :arg position: The position to evaluate the selected noise function.\n" + " :type position: :class:`mathutils.Vector`\n" + " :arg octaves: The number of different noise frequencies used.\n" + " :type octaves: int\n" + " :arg hard: Specifies whether returned turbulence is hard (sharp transitions) or " + "soft (smooth transitions).\n" + " :type hard: boolean\n" BPY_NOISE_BASIS_ENUM_DOC + " :arg amplitude_scale: The amplitude scaling factor.\n" + " :type amplitude_scale: float\n" + " :arg frequency_scale: The frequency scaling factor\n" + " :type frequency_scale: float\n" + " :return: The turbulence vector.\n" + " :rtype: :class:`mathutils.Vector`\n"); static PyObject *M_Noise_turbulence_vector(PyObject * /*self*/, PyObject *args, PyObject *kw) { static const char *kwlist[] = { @@ -580,6 +599,7 @@ static PyObject *M_Noise_turbulence_vector(PyObject * /*self*/, PyObject *args, /* F. Kenton Musgrave's fractal functions */ PyDoc_STRVAR( + /* Wrap. */ M_Noise_fractal_doc, ".. function:: fractal(position, H, lacunarity, octaves, noise_basis='PERLIN_ORIGINAL')\n" "\n" @@ -629,6 +649,7 @@ static PyObject *M_Noise_fractal(PyObject * /*self*/, PyObject *args, PyObject * } PyDoc_STRVAR( + /* Wrap. */ M_Noise_multi_fractal_doc, ".. function:: multi_fractal(position, H, lacunarity, octaves, " "noise_basis='PERLIN_ORIGINAL')\n" @@ -684,29 +705,31 @@ static PyObject *M_Noise_multi_fractal(PyObject * /*self*/, PyObject *args, PyOb BLI_noise_mg_multi_fractal(vec[0], vec[1], vec[2], H, lac, oct, noise_basis_enum)); } -PyDoc_STRVAR(M_Noise_variable_lacunarity_doc, - ".. function:: variable_lacunarity(position, distortion, " - "noise_type1='PERLIN_ORIGINAL', noise_type2='PERLIN_ORIGINAL')\n" - "\n" - " Returns variable lacunarity noise value, a distorted variety of noise, from " - "noise type 1 distorted by noise type 2 at the specified position.\n" - "\n" - " :arg position: The position to evaluate the selected noise function.\n" - " :type position: :class:`mathutils.Vector`\n" - " :arg distortion: The amount of distortion.\n" - " :type distortion: float\n" - " :arg noise_type1: Enumerator in ['BLENDER', 'PERLIN_ORIGINAL', 'PERLIN_NEW', " - "'VORONOI_F1', 'VORONOI_F2', " - "'VORONOI_F3', 'VORONOI_F4', 'VORONOI_F2F1', 'VORONOI_CRACKLE', " - "'CELLNOISE'].\n" - " :type noise_type1: string\n" - " :arg noise_type2: Enumerator in ['BLENDER', 'PERLIN_ORIGINAL', 'PERLIN_NEW', " - "'VORONOI_F1', 'VORONOI_F2', " - "'VORONOI_F3', 'VORONOI_F4', 'VORONOI_F2F1', 'VORONOI_CRACKLE', " - "'CELLNOISE'].\n" - " :type noise_type2: string\n" - " :return: The variable lacunarity noise value.\n" - " :rtype: float\n"); +PyDoc_STRVAR( + /* Wrap. */ + M_Noise_variable_lacunarity_doc, + ".. function:: variable_lacunarity(position, distortion, " + "noise_type1='PERLIN_ORIGINAL', noise_type2='PERLIN_ORIGINAL')\n" + "\n" + " Returns variable lacunarity noise value, a distorted variety of noise, from " + "noise type 1 distorted by noise type 2 at the specified position.\n" + "\n" + " :arg position: The position to evaluate the selected noise function.\n" + " :type position: :class:`mathutils.Vector`\n" + " :arg distortion: The amount of distortion.\n" + " :type distortion: float\n" + " :arg noise_type1: Enumerator in ['BLENDER', 'PERLIN_ORIGINAL', 'PERLIN_NEW', " + "'VORONOI_F1', 'VORONOI_F2', " + "'VORONOI_F3', 'VORONOI_F4', 'VORONOI_F2F1', 'VORONOI_CRACKLE', " + "'CELLNOISE'].\n" + " :type noise_type1: string\n" + " :arg noise_type2: Enumerator in ['BLENDER', 'PERLIN_ORIGINAL', 'PERLIN_NEW', " + "'VORONOI_F1', 'VORONOI_F2', " + "'VORONOI_F3', 'VORONOI_F4', 'VORONOI_F2F1', 'VORONOI_CRACKLE', " + "'CELLNOISE'].\n" + " :type noise_type2: string\n" + " :return: The variable lacunarity noise value.\n" + " :rtype: float\n"); static PyObject *M_Noise_variable_lacunarity(PyObject * /*self*/, PyObject *args, PyObject *kw) { static const char *kwlist[] = {"", "", "noise_type1", "noise_type2", nullptr}; @@ -756,6 +779,7 @@ static PyObject *M_Noise_variable_lacunarity(PyObject * /*self*/, PyObject *args } PyDoc_STRVAR( + /* Wrap. */ M_Noise_hetero_terrain_doc, ".. function:: hetero_terrain(position, H, lacunarity, octaves, offset, " "noise_basis='PERLIN_ORIGINAL')\n" @@ -815,6 +839,7 @@ static PyObject *M_Noise_hetero_terrain(PyObject * /*self*/, PyObject *args, PyO } PyDoc_STRVAR( + /* Wrap. */ M_Noise_hybrid_multi_fractal_doc, ".. function:: hybrid_multi_fractal(position, H, lacunarity, octaves, offset, gain, " "noise_basis='PERLIN_ORIGINAL')\n" @@ -879,6 +904,7 @@ static PyObject *M_Noise_hybrid_multi_fractal(PyObject * /*self*/, PyObject *arg } PyDoc_STRVAR( + /* Wrap. */ M_Noise_ridged_multi_fractal_doc, ".. function:: ridged_multi_fractal(position, H, lacunarity, octaves, offset, gain, " "noise_basis='PERLIN_ORIGINAL')\n" @@ -942,17 +968,19 @@ static PyObject *M_Noise_ridged_multi_fractal(PyObject * /*self*/, PyObject *arg vec[0], vec[1], vec[2], H, lac, oct, ofs, gn, noise_basis_enum)); } -PyDoc_STRVAR(M_Noise_voronoi_doc, - ".. function:: voronoi(position, distance_metric='DISTANCE', exponent=2.5)\n" - "\n" - " Returns a list of distances to the four closest features and their locations.\n" - "\n" - " :arg position: The position to evaluate the selected noise function.\n" - " :type position: :class:`mathutils.Vector`\n" BPY_NOISE_METRIC_ENUM_DOC - " :arg exponent: The exponent for Minkowski distance metric.\n" - " :type exponent: float\n" - " :return: A list of distances to the four closest features and their locations.\n" - " :rtype: list of four floats, list of four :class:`mathutils.Vector` types\n"); +PyDoc_STRVAR( + /* Wrap. */ + M_Noise_voronoi_doc, + ".. function:: voronoi(position, distance_metric='DISTANCE', exponent=2.5)\n" + "\n" + " Returns a list of distances to the four closest features and their locations.\n" + "\n" + " :arg position: The position to evaluate the selected noise function.\n" + " :type position: :class:`mathutils.Vector`\n" BPY_NOISE_METRIC_ENUM_DOC + " :arg exponent: The exponent for Minkowski distance metric.\n" + " :type exponent: float\n" + " :return: A list of distances to the four closest features and their locations.\n" + " :rtype: list of four floats, list of four :class:`mathutils.Vector` types\n"); static PyObject *M_Noise_voronoi(PyObject * /*self*/, PyObject *args, PyObject *kw) { static const char *kwlist[] = {"", "distance_metric", "exponent", nullptr}; @@ -998,15 +1026,17 @@ static PyObject *M_Noise_voronoi(PyObject * /*self*/, PyObject *args, PyObject * return ret; } -PyDoc_STRVAR(M_Noise_cell_doc, - ".. function:: cell(position)\n" - "\n" - " Returns cell noise value at the specified position.\n" - "\n" - " :arg position: The position to evaluate the selected noise function.\n" - " :type position: :class:`mathutils.Vector`\n" - " :return: The cell noise value.\n" - " :rtype: float\n"); +PyDoc_STRVAR( + /* Wrap. */ + M_Noise_cell_doc, + ".. function:: cell(position)\n" + "\n" + " Returns cell noise value at the specified position.\n" + "\n" + " :arg position: The position to evaluate the selected noise function.\n" + " :type position: :class:`mathutils.Vector`\n" + " :return: The cell noise value.\n" + " :rtype: float\n"); static PyObject *M_Noise_cell(PyObject * /*self*/, PyObject *args) { PyObject *value; @@ -1023,15 +1053,17 @@ static PyObject *M_Noise_cell(PyObject * /*self*/, PyObject *args) return PyFloat_FromDouble(BLI_noise_cell(vec[0], vec[1], vec[2])); } -PyDoc_STRVAR(M_Noise_cell_vector_doc, - ".. function:: cell_vector(position)\n" - "\n" - " Returns cell noise vector at the specified position.\n" - "\n" - " :arg position: The position to evaluate the selected noise function.\n" - " :type position: :class:`mathutils.Vector`\n" - " :return: The cell noise vector.\n" - " :rtype: :class:`mathutils.Vector`\n"); +PyDoc_STRVAR( + /* Wrap. */ + M_Noise_cell_vector_doc, + ".. function:: cell_vector(position)\n" + "\n" + " Returns cell noise vector at the specified position.\n" + "\n" + " :arg position: The position to evaluate the selected noise function.\n" + " :type position: :class:`mathutils.Vector`\n" + " :return: The cell noise vector.\n" + " :rtype: :class:`mathutils.Vector`\n"); static PyObject *M_Noise_cell_vector(PyObject * /*self*/, PyObject *args) { PyObject *value;