25 "Class hierarchy: :class:`Interface0D` > :class:`CurvePoint` > :class:`StrokeVertex`\n"
27 "Class to define a stroke vertex.\n"
29 ".. method:: __init__(*args)\n"
31 " Accepted call signatures:\n"
34 " - ``__init__(brother)``\n"
35 " - ``__init__(first_vertex, second_vertex, t3d)``\n"
36 " - ``__init__(point)``\n"
37 " - ``__init__(svertex)``\n"
38 " - ``__init__(svertex, attribute)``\n"
40 " Builds a :class:`StrokeVertex` using the default constructor,\n"
41 " copy constructor, from 2 :class:`StrokeVertex` and an interpolation parameter,\n"
42 " from a CurvePoint, from a SVertex, or a :class:`SVertex`"
43 " and a :class:`StrokeAttribute` object.\n"
45 " :param brother: A StrokeVertex object.\n"
46 " :type brother: :class:`StrokeVertex`\n"
47 " :param first_vertex: The first StrokeVertex.\n"
48 " :type first_vertex: :class:`StrokeVertex`\n"
49 " :param second_vertex: The second StrokeVertex.\n"
50 " :type second_vertex: :class:`StrokeVertex`\n"
51 " :param t3d: An interpolation parameter.\n"
53 " :param point: A CurvePoint object.\n"
54 " :type point: :class:`CurvePoint`\n"
55 " :param svertex: An SVertex object.\n"
56 " :type svertex: :class:`SVertex`\n"
57 " :param svertex: An SVertex object.\n"
58 " :type svertex: :class:`SVertex`\n"
59 " :param attribute: A StrokeAttribute object.\n"
60 " :type attribute: :class:`StrokeAttribute`\n");
63 static const char *kwlist_1[] = {
"brother",
nullptr};
64 static const char *kwlist_2[] = {
"first_vertex",
"second_vertex",
"t3d",
nullptr};
65 static const char *kwlist_3[] = {
"point",
nullptr};
66 static const char *kwlist_4[] = {
"svertex",
"attribute",
nullptr};
67 PyObject *obj1 =
nullptr, *obj2 =
nullptr;
70 if (PyArg_ParseTupleAndKeywords(args,
84 PyErr_SetString(PyExc_TypeError,
"argument 1 is an invalid StrokeVertex object");
90 else if ((
void)PyErr_Clear(),
91 PyArg_ParseTupleAndKeywords(args,
106 if (!sv1 || (sv1->
A() ==
nullptr && sv1->
B() ==
nullptr)) {
107 PyErr_SetString(PyExc_TypeError,
"argument 1 is an invalid StrokeVertex object");
110 if (!sv2 || (sv2->
A() ==
nullptr && sv2->
B() ==
nullptr)) {
111 PyErr_SetString(PyExc_TypeError,
"argument 2 is an invalid StrokeVertex object");
116 else if ((
void)PyErr_Clear(),
117 PyArg_ParseTupleAndKeywords(args,
126 if (!cp || cp->
A() ==
nullptr || cp->
B() ==
nullptr) {
127 PyErr_SetString(PyExc_TypeError,
"argument 1 is an invalid CurvePoint object");
132 else if ((
void)PyErr_Clear(),
133 (
void)(obj2 =
nullptr),
134 PyArg_ParseTupleAndKeywords(args,
154 PyErr_SetString(PyExc_TypeError,
"invalid argument(s)");
179 bmo->data[0] =
float(self->
sv->
x());
180 bmo->data[1] =
float(self->
sv->
y());
199 bmo->data[0] =
float(self->
sv->
x());
202 bmo->data[1] =
float(self->
sv->
y());
247 StrokeVertex_attribute_doc,
248 "StrokeAttribute for this StrokeVertex.\n"
250 ":type: :class:`StrokeAttribute`\n");
259 PyErr_SetString(PyExc_TypeError,
"value must be a StrokeAttribute object");
268 StrokeVertex_curvilinear_abscissa_doc,
269 "Curvilinear abscissa of this StrokeVertex in the Stroke.\n"
282 if ((scalar = PyFloat_AsDouble(value)) == -1.0f && PyErr_Occurred()) {
284 PyErr_SetString(PyExc_TypeError,
"value must be a number");
293 StrokeVertex_point_doc,
294 "2D point coordinates.\n"
296 ":type: :class:`mathutils.Vector`\n");
317 StrokeVertex_stroke_length_doc,
318 "Stroke length (it is only a value retained by the StrokeVertex,\n"
319 "and it won't change the real stroke length).\n"
332 if ((scalar = PyFloat_AsDouble(value)) == -1.0f && PyErr_Occurred()) {
334 PyErr_SetString(PyExc_TypeError,
"value must be a number");
344 "Curvilinear abscissa of this StrokeVertex in the Stroke.\n"
349 return PyFloat_FromDouble(self->
sv->
u());
356 StrokeVertex_attribute_doc,
358 {
"curvilinear_abscissa",
361 StrokeVertex_curvilinear_abscissa_doc,
366 StrokeVertex_point_doc,
371 StrokeVertex_stroke_length_doc,
374 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr}
380 PyVarObject_HEAD_INIT(
nullptr, 0)
399 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
PyObject * BPy_StrokeAttribute_from_StrokeAttribute(StrokeAttribute &sa)
PyTypeObject CurvePoint_Type
PyDoc_STRVAR(FalseBP1D___doc__, "Class hierarchy: :class:`freestyle.types.BinaryPredicate1D` > :class:`FalseBP1D`\n" "\n" ".. method:: __call__(inter1, inter2)\n" "\n" " Always returns false.\n" "\n" " :param inter1: The first Interface1D object.\n" " :type inter1: :class:`freestyle.types.Interface1D`\n" " :param inter2: The second Interface1D object.\n" " :type inter2: :class:`freestyle.types.Interface1D`\n" " :return: False.\n" " :rtype: bool\n")
PyTypeObject SVertex_Type
PyTypeObject StrokeAttribute_Type
#define BPy_StrokeAttribute_Check(v)
static int StrokeVertex_mathutils_get_index(blender::BaseMathObject *bmo, int, int index)
static PyGetSetDef BPy_StrokeVertex_getseters[]
static int StrokeVertex_mathutils_set_index(blender::BaseMathObject *bmo, int, int index)
static blender::Mathutils_Callback StrokeVertex_mathutils_cb
static int StrokeVertex_point_set(BPy_StrokeVertex *self, PyObject *value, void *)
static int StrokeVertex_curvilinear_abscissa_set(BPy_StrokeVertex *self, PyObject *value, void *)
static PyObject * StrokeVertex_point_get(BPy_StrokeVertex *self, void *)
static PyObject * StrokeVertex_attribute_get(BPy_StrokeVertex *self, void *)
static int StrokeVertex_stroke_length_set(BPy_StrokeVertex *self, PyObject *value, void *)
static int StrokeVertex_mathutils_get(blender::BaseMathObject *bmo, int)
static int StrokeVertex_init(BPy_StrokeVertex *self, PyObject *args, PyObject *kwds)
static PyObject * StrokeVertex_curvilinear_abscissa_get(BPy_StrokeVertex *self, void *)
static PyObject * StrokeVertex_u_get(BPy_StrokeVertex *self, void *)
static uchar StrokeVertex_mathutils_cb_index
void StrokeVertex_mathutils_register_callback()
static PyObject * StrokeVertex_stroke_length_get(BPy_StrokeVertex *self, void *)
static int StrokeVertex_mathutils_check(blender::BaseMathObject *bmo)
static int StrokeVertex_attribute_set(BPy_StrokeVertex *self, PyObject *value, void *)
PyTypeObject StrokeVertex_Type
static int StrokeVertex_mathutils_set(blender::BaseMathObject *bmo, int)
#define BPy_StrokeVertex_Check(v)
float curvilinearAbscissa() const
void setCurvilinearAbscissa(float iAbscissa)
void setAttribute(const StrokeAttribute &iAttribute)
float strokeLength() const
const StrokeAttribute & attribute() const
void setStrokeLength(float iLength)
PyObject * Vector_CreatePyObject_cb(PyObject *cb_user, int vec_num, uchar cb_type, uchar cb_subtype)
int mathutils_array_parse(float *array, int array_num_min, int array_num_max, PyObject *value, const char *error_prefix)
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
Freestyle::CurvePoint * cp
PyObject_HEAD Freestyle::Interface0D * if0D
Freestyle::StrokeVertex * sv