|
Blender V5.3
|
#include "BPy_Stroke.h"#include "../BPy_Convert.h"#include "../BPy_Id.h"#include "../BPy_MediumType.h"#include "../Interface0D/BPy_SVertex.h"#include "../Interface0D/CurvePoint/BPy_StrokeVertex.h"#include "../Iterator/BPy_StrokeVertexIterator.h"#include "BLI_sys_types.hh"Go to the source code of this file.
Functions | |
| 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(*args)\n" "\n" " Accepted call signatures:\n" "\n" " - ``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) |
| static PyObject * | Stroke_iter (PyObject *self) |
| static Py_ssize_t | Stroke_sq_length (BPy_Stroke *self) |
| static PyObject * | Stroke_sq_item (BPy_Stroke *self, Py_ssize_t 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" " :param 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\n") | |
| static PyObject * | Stroke_compute_sampling (BPy_Stroke *self, PyObject *args, PyObject *kwds) |
| PyDoc_STRVAR (Stroke_resample_doc, ".. method:: resample(*args)\n" "\n" " Accepted call signatures:\n" "\n" " - ``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" " :param 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" " :param 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\n") | |
| static PyObject * | Stroke_resample (BPy_Stroke *self, PyObject *args, PyObject *kwds) |
| 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" " :param vertex: The StrokeVertex to insert in the Stroke.\n" " :type vertex: :class:`StrokeVertex`\n" " :param next: A StrokeVertexIterator pointing to the StrokeVertex\n" " before which vertex must be inserted.\n" " :type next: :class:`StrokeVertexIterator`\n") | |
| static PyObject * | Stroke_insert_vertex (BPy_Stroke *self, PyObject *args, PyObject *kwds) |
| 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" " :param vertex: the StrokeVertex to remove from the Stroke.\n" " :type vertex: :class:`StrokeVertex`\n") | |
| static PyObject * | Stroke_remove_vertex (BPy_Stroke *self, PyObject *args, PyObject *kwds) |
| PyDoc_STRVAR (Stroke_remove_all_vertices_doc, ".. method:: remove_all_vertices()\n" "\n" " Removes all vertices from the Stroke.\n") | |
| static PyObject * | Stroke_remove_all_vertices (BPy_Stroke *self) |
| PyDoc_STRVAR (Stroke_update_length_doc, ".. method:: update_length()\n" "\n" " Updates the 2D length of the Stroke.\n") | |
| static PyObject * | Stroke_update_length (BPy_Stroke *self) |
| 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" " :param 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`\n") | |
| static PyObject * | Stroke_stroke_vertices_begin (BPy_Stroke *self, PyObject *args, PyObject *kwds) |
| 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`\n") | |
| static PyObject * | Stroke_stroke_vertices_end (BPy_Stroke *self) |
| PyDoc_STRVAR (Stroke_reversed_doc, ".. method:: __reversed__()\n" "\n" " Returns a StrokeVertexIterator iterating over the vertices of the Stroke\n" " in the reversed order (from the last to the first).\n" "\n" " :return: A StrokeVertexIterator pointing after the last StrokeVertex.\n" " :rtype: :class:`StrokeVertexIterator`\n") | |
| static PyObject * | Stroke_reversed (BPy_Stroke *self) |
| 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\n") | |
| static PyObject * | Stroke_stroke_vertices_size (BPy_Stroke *self) |
| PyDoc_STRVAR (Stroke_medium_type_doc, "The MediumType used for this Stroke.\n" "\n" ":type: :class:`MediumType`\n") | |
| static PyObject * | Stroke_medium_type_get (BPy_Stroke *self, void *) |
| static int | Stroke_medium_type_set (BPy_Stroke *self, PyObject *value, void *) |
| PyDoc_STRVAR (Stroke_texture_id_doc, "The ID of the texture used to simulate th marks system for this Stroke.\n" "\n" ":type: int\n") | |
| static PyObject * | Stroke_texture_id_get (BPy_Stroke *self, void *) |
| static int | Stroke_texture_id_set (BPy_Stroke *self, PyObject *value, void *) |
| PyDoc_STRVAR (Stroke_tips_doc, "True if this Stroke uses a texture with tips, and false otherwise.\n" "\n" ":type: bool\n") | |
| static PyObject * | Stroke_tips_get (BPy_Stroke *self, void *) |
| static int | Stroke_tips_set (BPy_Stroke *self, PyObject *value, void *) |
| PyDoc_STRVAR (Stroke_length_2d_doc, "The 2D length of the Stroke.\n" "\n" ":type: float\n") | |
| static PyObject * | Stroke_length_2d_get (BPy_Stroke *self, void *) |
| static int | Stroke_length_2d_set (BPy_Stroke *self, PyObject *value, void *) |
| PyDoc_STRVAR (Stroke_id_doc, "The Id of this Stroke.\n" "\n" ":type: :class:`Id`\n") | |
| static PyObject * | Stroke_id_get (BPy_Stroke *self, void *) |
| static int | Stroke_id_set (BPy_Stroke *self, PyObject *value, void *) |
Variables | |
| static PyMethodDef | BPy_Stroke_methods [] |
| static PyGetSetDef | BPy_Stroke_getseters [] |
| static PySequenceMethods | BPy_Stroke_as_sequence |
| PyTypeObject | Stroke_Type |
| 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" " :param 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\n" | ) |
References PyDoc_STRVAR().
| 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 *args\n" "\n" " Accepted call signatures:\n" "\n" " - ``Stroke()``\n" " - ``Stroke(brother)``\n" "\n" " Creates a :class:`Stroke` using the default constructor or copy constructor\n" | ) |
References PyDoc_STRVAR().
References PyDoc_STRVAR().
| 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" " :param vertex: The StrokeVertex to insert in the Stroke.\n" " :type vertex: :class:`StrokeVertex`\n" " :param next: A StrokeVertexIterator pointing to the StrokeVertex\n" " before which vertex must be inserted.\n" " :type next: :class:`StrokeVertexIterator`\n" | ) |
References PyDoc_STRVAR().
References PyDoc_STRVAR().
| PyDoc_STRVAR | ( | Stroke_medium_type_doc | , |
| "The MediumType used for this Stroke.\n" "\n" ":type: :class:`MediumType`\n" | ) |
References PyDoc_STRVAR().
| PyDoc_STRVAR | ( | Stroke_remove_all_vertices_doc | , |
| ".. method:: remove_all_vertices()\n" "\n" " Removes all vertices from the Stroke.\n" | ) |
References PyDoc_STRVAR().
| 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" " :param vertex: the StrokeVertex to remove from the Stroke.\n" " :type vertex: :class:`StrokeVertex`\n" | ) |
References PyDoc_STRVAR().
| PyDoc_STRVAR | ( | Stroke_resample_doc | , |
| ".. method:: resample*args\n" "\n" " Accepted call signatures:\n" "\n" " - ``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" " :param 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" " :param 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\n" | ) |
References PyDoc_STRVAR().
| 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`\n" | ) |
References PyDoc_STRVAR().
| 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" " :param 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`\n" | ) |
References PyDoc_STRVAR().
| 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`\n" | ) |
References PyDoc_STRVAR().
| 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\n" | ) |
References PyDoc_STRVAR().
| PyDoc_STRVAR | ( | Stroke_texture_id_doc | , |
| "The ID of the texture used to simulate th marks system for this Stroke.\n" "\n" ":type: int\n" | ) |
References PyDoc_STRVAR().
| PyDoc_STRVAR | ( | Stroke_tips_doc | , |
| "True if this Stroke uses a texture with | tips, | ||
| and false otherwise.\n" "\n" ":type:bool\n" | ) |
References PyDoc_STRVAR().
| PyDoc_STRVAR | ( | Stroke_update_length_doc | , |
| ".. method:: update_length()\n" "\n" " Updates the 2D length of the Stroke.\n" | ) |
References PyDoc_STRVAR().
|
static |
Definition at line 116 of file BPy_Stroke.cpp.
References Freestyle::Stroke::ComputeSampling(), BPy_Stroke::s, and Stroke_compute_sampling().
Referenced by Stroke_compute_sampling().
|
static |
Definition at line 519 of file BPy_Stroke.cpp.
References BPy_Id_from_Id(), Freestyle::Stroke::getId(), BPy_Stroke::s, and Stroke_id_get().
Referenced by Stroke_id_get().
|
static |
Definition at line 525 of file BPy_Stroke.cpp.
References BPy_Id_Check, BPy_Stroke::s, Freestyle::Stroke::setId(), and Stroke_id_set().
Referenced by Stroke_id_set().
|
static |
Definition at line 50 of file BPy_Stroke.cpp.
References BPy_Interface1D::borrowed, BPy_Interface1D::if1D, BPy_Stroke::py_if1D, BPy_Stroke::s, Freestyle::Stroke::Stroke(), Stroke_init(), and Stroke_Type.
Referenced by Stroke_init().
|
static |
Definition at line 207 of file BPy_Stroke.cpp.
References Freestyle::Stroke::InsertVertex(), BPy_Stroke::s, Stroke_insert_vertex(), StrokeVertex_Type, and StrokeVertexIterator_Type.
Referenced by Stroke_insert_vertex().
|
static |
Definition at line 77 of file BPy_Stroke.cpp.
References BPy_StrokeVertexIterator_from_StrokeVertexIterator(), and Stroke_iter().
Referenced by Stroke_iter().
|
static |
Definition at line 496 of file BPy_Stroke.cpp.
References Freestyle::Stroke::getLength2D(), BPy_Stroke::s, and Stroke_length_2d_get().
Referenced by Stroke_length_2d_get().
|
static |
Definition at line 501 of file BPy_Stroke.cpp.
References BPy_Stroke::s, Freestyle::Stroke::setLength(), and Stroke_length_2d_set().
Referenced by Stroke_length_2d_set().
|
static |
Definition at line 434 of file BPy_Stroke.cpp.
References BPy_MediumType_from_MediumType(), Freestyle::Stroke::getMediumType(), BPy_Stroke::s, and Stroke_medium_type_get().
Referenced by Stroke_medium_type_get().
|
static |
Definition at line 439 of file BPy_Stroke.cpp.
References BPy_MediumType_Check, MediumType_from_BPy_MediumType(), BPy_Stroke::s, Freestyle::Stroke::setMediumType(), and Stroke_medium_type_set().
Referenced by Stroke_medium_type_set().
|
static |
Definition at line 276 of file BPy_Stroke.cpp.
References Freestyle::Stroke::RemoveAllVertices(), BPy_Stroke::s, and Stroke_remove_all_vertices().
Referenced by Stroke_remove_all_vertices().
|
static |
Definition at line 245 of file BPy_Stroke.cpp.
References Freestyle::Stroke::RemoveVertex(), BPy_Stroke::s, Stroke_remove_vertex(), and StrokeVertex_Type.
Referenced by Stroke_remove_vertex().
|
static |
Definition at line 154 of file BPy_Stroke.cpp.
References Freestyle::Stroke::Resample(), BPy_Stroke::s, and Stroke_resample().
Referenced by Stroke_resample().
|
static |
Definition at line 353 of file BPy_Stroke.cpp.
References BPy_StrokeVertexIterator_from_StrokeVertexIterator(), BPy_Stroke::s, Stroke_reversed(), and Freestyle::Stroke::strokeVerticesEnd().
Referenced by Stroke_reversed().
|
static |
Definition at line 88 of file BPy_Stroke.cpp.
References BPy_StrokeVertex_from_StrokeVertex(), BPy_Stroke::s, Stroke_sq_item(), Stroke_sq_length(), and Freestyle::Stroke::strokeVerticeAt().
Referenced by Stroke_sq_item().
|
static |
Definition at line 83 of file BPy_Stroke.cpp.
References BPy_Stroke::s, Stroke_sq_length(), and Freestyle::Stroke::strokeVerticesSize().
Referenced by Stroke_sq_item(), and Stroke_sq_length().
|
static |
Definition at line 308 of file BPy_Stroke.cpp.
References BPy_StrokeVertexIterator_from_StrokeVertexIterator(), BPy_Stroke::s, Stroke_stroke_vertices_begin(), and Freestyle::Stroke::strokeVerticesBegin().
Referenced by Stroke_stroke_vertices_begin().
|
static |
Definition at line 337 of file BPy_Stroke.cpp.
References BPy_StrokeVertexIterator_from_StrokeVertexIterator(), BPy_Stroke::s, Stroke_stroke_vertices_end(), and Freestyle::Stroke::strokeVerticesEnd().
Referenced by Stroke_stroke_vertices_end().
|
static |
Definition at line 368 of file BPy_Stroke.cpp.
References BPy_Stroke::s, Stroke_stroke_vertices_size(), and Freestyle::Stroke::strokeVerticesSize().
Referenced by Stroke_stroke_vertices_size().
|
static |
Definition at line 455 of file BPy_Stroke.cpp.
References Freestyle::Stroke::getTextureId(), BPy_Stroke::s, and Stroke_texture_id_get().
Referenced by Stroke_texture_id_get().
|
static |
Definition at line 460 of file BPy_Stroke.cpp.
References BPy_Stroke::s, Freestyle::Stroke::setTextureId(), and Stroke_texture_id_set().
Referenced by Stroke_texture_id_set().
|
static |
Definition at line 476 of file BPy_Stroke.cpp.
References Freestyle::Stroke::hasTips(), PyBool_from_bool(), BPy_Stroke::s, and Stroke_tips_get().
Referenced by Stroke_tips_get().
|
static |
Definition at line 481 of file BPy_Stroke.cpp.
References bool_from_PyBool(), BPy_Stroke::s, Freestyle::Stroke::setTips(), and Stroke_tips_set().
Referenced by Stroke_tips_set().
|
static |
Definition at line 288 of file BPy_Stroke.cpp.
References BPy_Stroke::s, Stroke_update_length(), and Freestyle::Stroke::UpdateLength().
Referenced by Stroke_update_length().
|
static |
Definition at line 558 of file BPy_Stroke.cpp.
|
static |
Definition at line 535 of file BPy_Stroke.cpp.
|
static |
Definition at line 383 of file BPy_Stroke.cpp.
| PyTypeObject Stroke_Type |
Definition at line 571 of file BPy_Stroke.cpp.
Referenced by BPy_Stroke_from_Stroke(), Interface1D_Init(), Stroke_init(), StrokeShader_shade(), and StrokeVertexIterator_init().