Blender  V3.3
BPy_Stroke.cpp
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
7 #include "BPy_Stroke.h"
8 
9 #include "../BPy_Convert.h"
10 #include "../BPy_Id.h"
11 #include "../BPy_MediumType.h"
12 #include "../Interface0D/BPy_SVertex.h"
13 #include "../Interface0D/CurvePoint/BPy_StrokeVertex.h"
14 #include "../Iterator/BPy_StrokeVertexIterator.h"
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 using namespace Freestyle;
21 
23 
24 /*----------------------Stroke methods ----------------------------*/
25 
26 // Stroke ()
27 // template<class InputVertexIterator> Stroke (InputVertexIterator begin, InputVertexIterator end)
28 //
29 // pb: - need to be able to switch representation: InputVertexIterator <=> position
30 // - is it even used ? not even in SWIG version
31 
32 PyDoc_STRVAR(Stroke_doc,
33  "Class hierarchy: :class:`Interface1D` > :class:`Stroke`\n"
34  "\n"
35  "Class to define a stroke. A stroke is made of a set of 2D vertices\n"
36  "(:class:`StrokeVertex`), regularly spaced out. This set of vertices\n"
37  "defines the stroke's backbone geometry. Each of these stroke vertices\n"
38  "defines the stroke's shape and appearance at this vertex position.\n"
39  "\n"
40  ".. method:: Stroke()\n"
41  " Stroke(brother)\n"
42  "\n"
43  " Creates a :class:`Stroke` using the default constructor or copy constructor\n");
44 
45 static int Stroke_init(BPy_Stroke *self, PyObject *args, PyObject *kwds)
46 {
47  static const char *kwlist[] = {"brother", nullptr};
48  PyObject *brother = nullptr;
49 
50  if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &Stroke_Type, &brother)) {
51  return -1;
52  }
53  if (!brother) {
54  self->s = new Stroke();
55  }
56  else {
57  self->s = new Stroke(*(((BPy_Stroke *)brother)->s));
58  }
59  self->py_if1D.if1D = self->s;
60  self->py_if1D.borrowed = false;
61  return 0;
62 }
63 
64 static PyObject *Stroke_iter(PyObject *self)
65 {
66  StrokeInternal::StrokeVertexIterator sv_it(((BPy_Stroke *)self)->s->strokeVerticesBegin());
68 }
69 
70 static Py_ssize_t Stroke_sq_length(BPy_Stroke *self)
71 {
72  return self->s->strokeVerticesSize();
73 }
74 
75 static PyObject *Stroke_sq_item(BPy_Stroke *self, int keynum)
76 {
77  if (keynum < 0) {
78  keynum += Stroke_sq_length(self);
79  }
80  if (keynum < 0 || keynum >= Stroke_sq_length(self)) {
81  PyErr_Format(PyExc_IndexError, "Stroke[index]: index %d out of range", keynum);
82  return nullptr;
83  }
84  return BPy_StrokeVertex_from_StrokeVertex(self->s->strokeVerticeAt(keynum));
85 }
86 
87 PyDoc_STRVAR(Stroke_compute_sampling_doc,
88  ".. method:: compute_sampling(n)\n"
89  "\n"
90  " Compute the sampling needed to get N vertices. If the\n"
91  " specified number of vertices is less than the actual number of\n"
92  " vertices, the actual sampling value is returned. (To remove Vertices,\n"
93  " use the RemoveVertex() method of this class.)\n"
94  "\n"
95  " :arg n: The number of stroke vertices we eventually want\n"
96  " in our Stroke.\n"
97  " :type n: int\n"
98  " :return: The sampling that must be used in the Resample(float)\n"
99  " method.\n"
100  " :rtype: float");
101 
102 static PyObject *Stroke_compute_sampling(BPy_Stroke *self, PyObject *args, PyObject *kwds)
103 {
104  static const char *kwlist[] = {"n", nullptr};
105  int i;
106 
107  if (!PyArg_ParseTupleAndKeywords(args, kwds, "i", (char **)kwlist, &i)) {
108  return nullptr;
109  }
110  return PyFloat_FromDouble(self->s->ComputeSampling(i));
111 }
112 
113 PyDoc_STRVAR(Stroke_resample_doc,
114  ".. method:: resample(n)\n"
115  " resample(sampling)\n"
116  "\n"
117  " Resamples the stroke so using one of two methods with the goal\n"
118  " of creating a stroke with fewer points and the same shape.\n"
119  "\n"
120  " :arg n: Resamples the stroke so that it eventually has N points. That means\n"
121  " it is going to add N-vertices_size, where vertices_size is the\n"
122  " number of points we already have. If vertices_size >= N, no\n"
123  " resampling is done.\n"
124  " :type n: int\n"
125  " :arg sampling: Resamples the stroke with a given sampling value. If the\n"
126  " sampling is smaller than the actual sampling value, no resampling is done.\n"
127  " :type sampling: float");
128 
129 static PyObject *Stroke_resample(BPy_Stroke *self, PyObject *args, PyObject *kwds)
130 {
131  static const char *kwlist_1[] = {"n", nullptr};
132  static const char *kwlist_2[] = {"sampling", nullptr};
133  int i;
134  float f;
135 
136  if (PyArg_ParseTupleAndKeywords(args, kwds, "i", (char **)kwlist_1, &i)) {
137  if (self->s->Resample(i) < 0) {
138  PyErr_SetString(PyExc_RuntimeError, "Stroke resampling (by vertex count) failed");
139  return nullptr;
140  }
141  }
142  else if ((void)PyErr_Clear(),
143  PyArg_ParseTupleAndKeywords(args, kwds, "f", (char **)kwlist_2, &f)) {
144  if (self->s->Resample(f) < 0) {
145  PyErr_SetString(PyExc_RuntimeError, "Stroke resampling (by vertex interval) failed");
146  return nullptr;
147  }
148  }
149  else {
150  PyErr_SetString(PyExc_TypeError, "invalid argument");
151  return nullptr;
152  }
153  Py_RETURN_NONE;
154 }
155 
156 PyDoc_STRVAR(Stroke_insert_vertex_doc,
157  ".. method:: insert_vertex(vertex, next)\n"
158  "\n"
159  " Inserts the StrokeVertex given as argument into the Stroke before the\n"
160  " point specified by next. The length and curvilinear abscissa are\n"
161  " updated consequently.\n"
162  "\n"
163  " :arg vertex: The StrokeVertex to insert in the Stroke.\n"
164  " :type vertex: :class:`StrokeVertex`\n"
165  " :arg next: A StrokeVertexIterator pointing to the StrokeVertex\n"
166  " before which vertex must be inserted.\n"
167  " :type next: :class:`StrokeVertexIterator`");
168 
169 static PyObject *Stroke_insert_vertex(BPy_Stroke *self, PyObject *args, PyObject *kwds)
170 {
171  static const char *kwlist[] = {"vertex", "next", nullptr};
172  PyObject *py_sv = nullptr, *py_sv_it = nullptr;
173 
174  if (!PyArg_ParseTupleAndKeywords(args,
175  kwds,
176  "O!O!",
177  (char **)kwlist,
179  &py_sv,
181  &py_sv_it)) {
182  return nullptr;
183  }
184 
185  /* Make the wrapped StrokeVertex internal. */
186  ((BPy_StrokeVertex *)py_sv)->py_cp.py_if0D.borrowed = true;
187 
188  StrokeVertex *sv = ((BPy_StrokeVertex *)py_sv)->sv;
189  StrokeInternal::StrokeVertexIterator sv_it(*(((BPy_StrokeVertexIterator *)py_sv_it)->sv_it));
190  self->s->InsertVertex(sv, sv_it);
191  Py_RETURN_NONE;
192 }
193 
194 PyDoc_STRVAR(Stroke_remove_vertex_doc,
195  ".. method:: remove_vertex(vertex)\n"
196  "\n"
197  " Removes the StrokeVertex given as argument from the Stroke. The length\n"
198  " and curvilinear abscissa are updated consequently.\n"
199  "\n"
200  " :arg vertex: the StrokeVertex to remove from the Stroke.\n"
201  " :type vertex: :class:`StrokeVertex`");
202 
203 static PyObject *Stroke_remove_vertex(BPy_Stroke *self, PyObject *args, PyObject *kwds)
204 {
205  static const char *kwlist[] = {"vertex", nullptr};
206  PyObject *py_sv = nullptr;
207 
208  if (!PyArg_ParseTupleAndKeywords(
209  args, kwds, "O!", (char **)kwlist, &StrokeVertex_Type, &py_sv)) {
210  return nullptr;
211  }
212  if (((BPy_StrokeVertex *)py_sv)->sv) {
213  self->s->RemoveVertex(((BPy_StrokeVertex *)py_sv)->sv);
214  }
215  else {
216  PyErr_SetString(PyExc_TypeError, "invalid argument");
217  return nullptr;
218  }
219  Py_RETURN_NONE;
220 }
221 
222 PyDoc_STRVAR(Stroke_remove_all_vertices_doc,
223  ".. method:: remove_all_vertices()\n"
224  "\n"
225  " Removes all vertices from the Stroke.");
226 
227 static PyObject *Stroke_remove_all_vertices(BPy_Stroke *self)
228 {
229  self->s->RemoveAllVertices();
230  Py_RETURN_NONE;
231 }
232 
233 PyDoc_STRVAR(Stroke_update_length_doc,
234  ".. method:: update_length()\n"
235  "\n"
236  " Updates the 2D length of the Stroke.");
237 
238 static PyObject *Stroke_update_length(BPy_Stroke *self)
239 {
240  self->s->UpdateLength();
241  Py_RETURN_NONE;
242 }
243 
244 PyDoc_STRVAR(Stroke_stroke_vertices_begin_doc,
245  ".. method:: stroke_vertices_begin(t=0.0)\n"
246  "\n"
247  " Returns a StrokeVertexIterator pointing on the first StrokeVertex of\n"
248  " the Stroke. One can specify a sampling value to re-sample the Stroke\n"
249  " on the fly if needed.\n"
250  "\n"
251  " :arg t: The resampling value with which we want our Stroke to be\n"
252  " resampled. If 0 is specified, no resampling is done.\n"
253  " :type t: float\n"
254  " :return: A StrokeVertexIterator pointing on the first StrokeVertex.\n"
255  " :rtype: :class:`StrokeVertexIterator`");
256 
257 static PyObject *Stroke_stroke_vertices_begin(BPy_Stroke *self, PyObject *args, PyObject *kwds)
258 {
259  static const char *kwlist[] = {"t", nullptr};
260  float f = 0.0f;
261 
262  if (!PyArg_ParseTupleAndKeywords(args, kwds, "|f", (char **)kwlist, &f)) {
263  return nullptr;
264  }
265  StrokeInternal::StrokeVertexIterator sv_it(self->s->strokeVerticesBegin(f));
267 }
268 
269 PyDoc_STRVAR(Stroke_stroke_vertices_end_doc,
270  ".. method:: stroke_vertices_end()\n"
271  "\n"
272  " Returns a StrokeVertexIterator pointing after the last StrokeVertex\n"
273  " of the Stroke.\n"
274  "\n"
275  " :return: A StrokeVertexIterator pointing after the last StrokeVertex.\n"
276  " :rtype: :class:`StrokeVertexIterator`");
277 
278 static PyObject *Stroke_stroke_vertices_end(BPy_Stroke *self)
279 {
280  StrokeInternal::StrokeVertexIterator sv_it(self->s->strokeVerticesEnd());
282 }
283 
284 PyDoc_STRVAR(Stroke_reversed_doc,
285  ".. method:: __reversed__()\n"
286  "\n"
287  " Returns a StrokeVertexIterator iterating over the vertices of the Stroke\n"
288  " in the reversed order (from the last to the first).\n"
289  "\n"
290  " :return: A StrokeVertexIterator pointing after the last StrokeVertex.\n"
291  " :rtype: :class:`StrokeVertexIterator`");
292 
293 static PyObject *Stroke_reversed(BPy_Stroke *self)
294 {
295  StrokeInternal::StrokeVertexIterator sv_it(self->s->strokeVerticesEnd());
297 }
298 
299 PyDoc_STRVAR(Stroke_stroke_vertices_size_doc,
300  ".. method:: stroke_vertices_size()\n"
301  "\n"
302  " Returns the number of StrokeVertex constituting the Stroke.\n"
303  "\n"
304  " :return: The number of stroke vertices.\n"
305  " :rtype: int");
306 
308 {
309  return PyLong_FromLong(self->s->strokeVerticesSize());
310 }
311 
312 static PyMethodDef BPy_Stroke_methods[] = {
313  {"compute_sampling",
314  (PyCFunction)Stroke_compute_sampling,
315  METH_VARARGS | METH_KEYWORDS,
316  Stroke_compute_sampling_doc},
317  {"resample", (PyCFunction)Stroke_resample, METH_VARARGS | METH_KEYWORDS, Stroke_resample_doc},
318  {"remove_all_vertices",
319  (PyCFunction)Stroke_remove_all_vertices,
320  METH_NOARGS,
321  Stroke_remove_all_vertices_doc},
322  {"remove_vertex",
323  (PyCFunction)Stroke_remove_vertex,
324  METH_VARARGS | METH_KEYWORDS,
325  Stroke_remove_vertex_doc},
326  {"insert_vertex",
327  (PyCFunction)Stroke_insert_vertex,
328  METH_VARARGS | METH_KEYWORDS,
329  Stroke_insert_vertex_doc},
330  {"update_length", (PyCFunction)Stroke_update_length, METH_NOARGS, Stroke_update_length_doc},
331  {"stroke_vertices_begin",
332  (PyCFunction)Stroke_stroke_vertices_begin,
333  METH_VARARGS | METH_KEYWORDS,
334  Stroke_stroke_vertices_begin_doc},
335  {"stroke_vertices_end",
336  (PyCFunction)Stroke_stroke_vertices_end,
337  METH_NOARGS,
338  Stroke_stroke_vertices_end_doc},
339  {"__reversed__", (PyCFunction)Stroke_reversed, METH_NOARGS, Stroke_reversed_doc},
340  {"stroke_vertices_size",
341  (PyCFunction)Stroke_stroke_vertices_size,
342  METH_NOARGS,
343  Stroke_stroke_vertices_size_doc},
344  {nullptr, nullptr, 0, nullptr},
345 };
346 
347 /*----------------------Stroke get/setters ----------------------------*/
348 
349 PyDoc_STRVAR(Stroke_medium_type_doc,
350  "The MediumType used for this Stroke.\n"
351  "\n"
352  ":type: :class:`MediumType`");
353 
354 static PyObject *Stroke_medium_type_get(BPy_Stroke *self, void *UNUSED(closure))
355 {
356  return BPy_MediumType_from_MediumType(self->s->getMediumType());
357 }
358 
359 static int Stroke_medium_type_set(BPy_Stroke *self, PyObject *value, void *UNUSED(closure))
360 {
361  if (!BPy_MediumType_Check(value)) {
362  PyErr_SetString(PyExc_TypeError, "value must be a MediumType");
363  return -1;
364  }
365  self->s->setMediumType(MediumType_from_BPy_MediumType(value));
366  return 0;
367 }
368 
369 PyDoc_STRVAR(Stroke_texture_id_doc,
370  "The ID of the texture used to simulate th marks system for this Stroke.\n"
371  "\n"
372  ":type: int");
373 
374 static PyObject *Stroke_texture_id_get(BPy_Stroke *self, void *UNUSED(closure))
375 {
376  return PyLong_FromLong(self->s->getTextureId());
377 }
378 
379 static int Stroke_texture_id_set(BPy_Stroke *self, PyObject *value, void *UNUSED(closure))
380 {
381  unsigned int i = PyLong_AsUnsignedLong(value);
382  if (PyErr_Occurred()) {
383  return -1;
384  }
385  self->s->setTextureId(i);
386  return 0;
387 }
388 
389 PyDoc_STRVAR(Stroke_tips_doc,
390  "True if this Stroke uses a texture with tips, and false otherwise.\n"
391  "\n"
392  ":type: bool");
393 
394 static PyObject *Stroke_tips_get(BPy_Stroke *self, void *UNUSED(closure))
395 {
396  return PyBool_from_bool(self->s->hasTips());
397 }
398 
399 static int Stroke_tips_set(BPy_Stroke *self, PyObject *value, void *UNUSED(closure))
400 {
401  if (!PyBool_Check(value)) {
402  return -1;
403  }
404  self->s->setTips(bool_from_PyBool(value));
405  return 0;
406 }
407 
408 PyDoc_STRVAR(Stroke_length_2d_doc,
409  "The 2D length of the Stroke.\n"
410  "\n"
411  ":type: float");
412 
413 static PyObject *Stroke_length_2d_get(BPy_Stroke *self, void *UNUSED(closure))
414 {
415  return PyFloat_FromDouble(self->s->getLength2D());
416 }
417 
418 static int Stroke_length_2d_set(BPy_Stroke *self, PyObject *value, void *UNUSED(closure))
419 {
420  float scalar;
421  if ((scalar = PyFloat_AsDouble(value)) == -1.0f && PyErr_Occurred()) {
422  /* parsed item not a number */
423  PyErr_SetString(PyExc_TypeError, "value must be a number");
424  return -1;
425  }
426  self->s->setLength(scalar);
427  return 0;
428 }
429 
430 PyDoc_STRVAR(Stroke_id_doc,
431  "The Id of this Stroke.\n"
432  "\n"
433  ":type: :class:`Id`");
434 
435 static PyObject *Stroke_id_get(BPy_Stroke *self, void *UNUSED(closure))
436 {
437  Id id(self->s->getId());
438  return BPy_Id_from_Id(id); // return a copy
439 }
440 
441 static int Stroke_id_set(BPy_Stroke *self, PyObject *value, void *UNUSED(closure))
442 {
443  if (!BPy_Id_Check(value)) {
444  PyErr_SetString(PyExc_TypeError, "value must be an Id");
445  return -1;
446  }
447  self->s->setId(*(((BPy_Id *)value)->id));
448  return 0;
449 }
450 
451 static PyGetSetDef BPy_Stroke_getseters[] = {
452  {"medium_type",
453  (getter)Stroke_medium_type_get,
454  (setter)Stroke_medium_type_set,
455  Stroke_medium_type_doc,
456  nullptr},
457  {"texture_id",
458  (getter)Stroke_texture_id_get,
459  (setter)Stroke_texture_id_set,
460  Stroke_texture_id_doc,
461  nullptr},
462  {"tips", (getter)Stroke_tips_get, (setter)Stroke_tips_set, Stroke_tips_doc, nullptr},
463  {"length_2d",
464  (getter)Stroke_length_2d_get,
465  (setter)Stroke_length_2d_set,
466  Stroke_length_2d_doc,
467  nullptr},
468  {"id", (getter)Stroke_id_get, (setter)Stroke_id_set, Stroke_id_doc, nullptr},
469  {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
470 };
471 
472 /*-----------------------BPy_Stroke type definition ------------------------------*/
473 
474 static PySequenceMethods BPy_Stroke_as_sequence = {
475  (lenfunc)Stroke_sq_length, /* sq_length */
476  nullptr, /* sq_concat */
477  nullptr, /* sq_repeat */
478  (ssizeargfunc)Stroke_sq_item, /* sq_item */
479  nullptr, /* sq_slice */
480  nullptr, /* sq_ass_item */
481  nullptr, /* *was* sq_ass_slice */
482  nullptr, /* sq_contains */
483  nullptr, /* sq_inplace_concat */
484  nullptr, /* sq_inplace_repeat */
485 };
486 
487 PyTypeObject Stroke_Type = {
488  PyVarObject_HEAD_INIT(nullptr, 0) "Stroke", /* tp_name */
489  sizeof(BPy_Stroke), /* tp_basicsize */
490  0, /* tp_itemsize */
491  nullptr, /* tp_dealloc */
492  0, /* tp_vectorcall_offset */
493  nullptr, /* tp_getattr */
494  nullptr, /* tp_setattr */
495  nullptr, /* tp_reserved */
496  nullptr, /* tp_repr */
497  nullptr, /* tp_as_number */
498  &BPy_Stroke_as_sequence, /* tp_as_sequence */
499  nullptr, /* tp_as_mapping */
500  nullptr, /* tp_hash */
501  nullptr, /* tp_call */
502  nullptr, /* tp_str */
503  nullptr, /* tp_getattro */
504  nullptr, /* tp_setattro */
505  nullptr, /* tp_as_buffer */
506  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
507  Stroke_doc, /* tp_doc */
508  nullptr, /* tp_traverse */
509  nullptr, /* tp_clear */
510  nullptr, /* tp_richcompare */
511  0, /* tp_weaklistoffset */
512  (getiterfunc)Stroke_iter, /* tp_iter */
513  nullptr, /* tp_iternext */
514  BPy_Stroke_methods, /* tp_methods */
515  nullptr, /* tp_members */
516  BPy_Stroke_getseters, /* tp_getset */
517  &Interface1D_Type, /* tp_base */
518  nullptr, /* tp_dict */
519  nullptr, /* tp_descr_get */
520  nullptr, /* tp_descr_set */
521  0, /* tp_dictoffset */
522  (initproc)Stroke_init, /* tp_init */
523  nullptr, /* tp_alloc */
524  nullptr, /* tp_new */
525 };
526 
528 
529 #ifdef __cplusplus
530 }
531 #endif
#define UNUSED(x)
PyObject * BPy_MediumType_from_MediumType(Stroke::MediumType n)
PyObject * PyBool_from_bool(bool b)
Definition: BPy_Convert.cpp:59
bool bool_from_PyBool(PyObject *b)
PyObject * BPy_StrokeVertex_from_StrokeVertex(StrokeVertex &sv)
PyObject * BPy_Id_from_Id(Id &id)
Definition: BPy_Convert.cpp:90
Stroke::MediumType MediumType_from_BPy_MediumType(PyObject *obj)
PyObject * BPy_StrokeVertexIterator_from_StrokeVertexIterator(StrokeInternal::StrokeVertexIterator &sv_it, bool reversed)
#define BPy_Id_Check(v)
Definition: BPy_Id.h:25
PyTypeObject Interface1D_Type
#define BPy_MediumType_Check(v)
PyTypeObject StrokeVertexIterator_Type
PyTypeObject StrokeVertex_Type
static PyObject * Stroke_medium_type_get(BPy_Stroke *self, void *UNUSED(closure))
Definition: BPy_Stroke.cpp:354
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")
static Py_ssize_t Stroke_sq_length(BPy_Stroke *self)
Definition: BPy_Stroke.cpp:70
static PyObject * Stroke_remove_vertex(BPy_Stroke *self, PyObject *args, PyObject *kwds)
Definition: BPy_Stroke.cpp:203
PyTypeObject Stroke_Type
Definition: BPy_Stroke.cpp:487
static int Stroke_id_set(BPy_Stroke *self, PyObject *value, void *UNUSED(closure))
Definition: BPy_Stroke.cpp:441
static PyObject * Stroke_sq_item(BPy_Stroke *self, int keynum)
Definition: BPy_Stroke.cpp:75
static int Stroke_medium_type_set(BPy_Stroke *self, PyObject *value, void *UNUSED(closure))
Definition: BPy_Stroke.cpp:359
static PyObject * Stroke_reversed(BPy_Stroke *self)
Definition: BPy_Stroke.cpp:293
static PySequenceMethods BPy_Stroke_as_sequence
Definition: BPy_Stroke.cpp:474
static PyObject * Stroke_stroke_vertices_begin(BPy_Stroke *self, PyObject *args, PyObject *kwds)
Definition: BPy_Stroke.cpp:257
static PyMethodDef BPy_Stroke_methods[]
Definition: BPy_Stroke.cpp:312
static PyObject * Stroke_iter(PyObject *self)
Definition: BPy_Stroke.cpp:64
static PyObject * Stroke_stroke_vertices_size(BPy_Stroke *self)
Definition: BPy_Stroke.cpp:307
static PyObject * Stroke_stroke_vertices_end(BPy_Stroke *self)
Definition: BPy_Stroke.cpp:278
static PyObject * Stroke_length_2d_get(BPy_Stroke *self, void *UNUSED(closure))
Definition: BPy_Stroke.cpp:413
static PyObject * Stroke_remove_all_vertices(BPy_Stroke *self)
Definition: BPy_Stroke.cpp:227
static PyObject * Stroke_resample(BPy_Stroke *self, PyObject *args, PyObject *kwds)
Definition: BPy_Stroke.cpp:129
static PyObject * Stroke_texture_id_get(BPy_Stroke *self, void *UNUSED(closure))
Definition: BPy_Stroke.cpp:374
static int Stroke_tips_set(BPy_Stroke *self, PyObject *value, void *UNUSED(closure))
Definition: BPy_Stroke.cpp:399
static PyObject * Stroke_update_length(BPy_Stroke *self)
Definition: BPy_Stroke.cpp:238
static int Stroke_length_2d_set(BPy_Stroke *self, PyObject *value, void *UNUSED(closure))
Definition: BPy_Stroke.cpp:418
static int Stroke_init(BPy_Stroke *self, PyObject *args, PyObject *kwds)
Definition: BPy_Stroke.cpp:45
static PyObject * Stroke_compute_sampling(BPy_Stroke *self, PyObject *args, PyObject *kwds)
Definition: BPy_Stroke.cpp:102
static PyGetSetDef BPy_Stroke_getseters[]
Definition: BPy_Stroke.cpp:451
static PyObject * Stroke_tips_get(BPy_Stroke *self, void *UNUSED(closure))
Definition: BPy_Stroke.cpp:394
static PyObject * Stroke_insert_vertex(BPy_Stroke *self, PyObject *args, PyObject *kwds)
Definition: BPy_Stroke.cpp:169
static PyObject * Stroke_id_get(BPy_Stroke *self, void *UNUSED(closure))
Definition: BPy_Stroke.cpp:435
static int Stroke_texture_id_set(BPy_Stroke *self, PyObject *value, void *UNUSED(closure))
Definition: BPy_Stroke.cpp:379
PyObject * self
Definition: bpy_driver.c:165
inherits from class Rep
Definition: AppCanvas.cpp:18
Definition: BPy_Id.h:28