Blender V4.3
BPy_CurveNatureF1D.cpp
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2004-2022 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
10
12#include "../../BPy_Convert.h"
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19using namespace Freestyle;
20
22
23//------------------------INSTANCE METHODS ----------------------------------
24
26 /* Wrap. */
27 CurveNatureF1D___doc__,
28 "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > "
29 ":class:`freestyle.types.UnaryFunction1DEdgeNature` > :class:`CurveNatureF1D`\n"
30 "\n"
31 ".. method:: __init__(integration_type=IntegrationType.MEAN)\n"
32 "\n"
33 " Builds a CurveNatureF1D object.\n"
34 "\n"
35 " :arg integration_type: The integration method used to compute a single value\n"
36 " from a set of values.\n"
37 " :type integration_type: :class:`freestyle.types.IntegrationType`\n"
38 "\n"
39 ".. method:: __call__(inter)\n"
40 "\n"
41 " Returns the nature of the Interface1D (silhouette, ridge, crease, and\n"
42 " so on). Except if the Interface1D is a\n"
43 " :class:`freestyle.types.ViewEdge`, this result might be ambiguous.\n"
44 " Indeed, the Interface1D might result from the gathering of several 1D\n"
45 " elements, each one being of a different nature. An integration\n"
46 " method, such as the MEAN, might give, in this case, irrelevant\n"
47 " results.\n"
48 "\n"
49 " :arg inter: An Interface1D object.\n"
50 " :type inter: :class:`freestyle.types.Interface1D`\n"
51 " :return: The nature of the Interface1D.\n"
52 " :rtype: :class:`freestyle.types.Nature`\n");
53
54static int CurveNatureF1D___init__(BPy_CurveNatureF1D *self, PyObject *args, PyObject *kwds)
55{
56 static const char *kwlist[] = {"integration_type", nullptr};
57 PyObject *obj = nullptr;
58
59 if (!PyArg_ParseTupleAndKeywords(
60 args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
61 {
62 return -1;
63 }
65 self->py_uf1D_edgenature.uf1D_edgenature = new Functions1D::CurveNatureF1D(t);
66 return 0;
67}
68
69/*-----------------------BPy_CurveNatureF1D type definition ------------------------------*/
70
71PyTypeObject CurveNatureF1D_Type = {
72 /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0)
73 /*tp_name*/ "CurveNatureF1D",
74 /*tp_basicsize*/ sizeof(BPy_CurveNatureF1D),
75 /*tp_itemsize*/ 0,
76 /*tp_dealloc*/ nullptr,
77 /*tp_vectorcall_offset*/ 0,
78 /*tp_getattr*/ nullptr,
79 /*tp_setattr*/ nullptr,
80 /*tp_as_async*/ nullptr,
81 /*tp_repr*/ nullptr,
82 /*tp_as_number*/ nullptr,
83 /*tp_as_sequence*/ nullptr,
84 /*tp_as_mapping*/ nullptr,
85 /*tp_hash*/ nullptr,
86 /*tp_call*/ nullptr,
87 /*tp_str*/ nullptr,
88 /*tp_getattro*/ nullptr,
89 /*tp_setattro*/ nullptr,
90 /*tp_as_buffer*/ nullptr,
91 /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
92 /*tp_doc*/ CurveNatureF1D___doc__,
93 /*tp_traverse*/ nullptr,
94 /*tp_clear*/ nullptr,
95 /*tp_richcompare*/ nullptr,
96 /*tp_weaklistoffset*/ 0,
97 /*tp_iter*/ nullptr,
98 /*tp_iternext*/ nullptr,
99 /*tp_methods*/ nullptr,
100 /*tp_members*/ nullptr,
101 /*tp_getset*/ nullptr,
103 /*tp_dict*/ nullptr,
104 /*tp_descr_get*/ nullptr,
105 /*tp_descr_set*/ nullptr,
106 /*tp_dictoffset*/ 0,
107 /*tp_init*/ (initproc)CurveNatureF1D___init__,
108 /*tp_alloc*/ nullptr,
109 /*tp_new*/ nullptr,
110};
111
113
114#ifdef __cplusplus
115}
116#endif
IntegrationType IntegrationType_from_BPy_IntegrationType(PyObject *obj)
PyDoc_STRVAR(CurveNatureF1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > " ":class:`freestyle.types.UnaryFunction1DEdgeNature` > :class:`CurveNatureF1D`\n" "\n" ".. method:: __init__(integration_type=IntegrationType.MEAN)\n" "\n" " Builds a CurveNatureF1D object.\n" "\n" " :arg integration_type: The integration method used to compute a single value\n" " from a set of values.\n" " :type integration_type: :class:`freestyle.types.IntegrationType`\n" "\n" ".. method:: __call__(inter)\n" "\n" " Returns the nature of the Interface1D (silhouette, ridge, crease, and\n" " so on). Except if the Interface1D is a\n" " :class:`freestyle.types.ViewEdge`, this result might be ambiguous.\n" " Indeed, the Interface1D might result from the gathering of several 1D\n" " elements, each one being of a different nature. An integration\n" " method, such as the MEAN, might give, in this case, irrelevant\n" " results.\n" "\n" " :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")
static int CurveNatureF1D___init__(BPy_CurveNatureF1D *self, PyObject *args, PyObject *kwds)
PyTypeObject CurveNatureF1D_Type
PyTypeObject IntegrationType_Type
PyTypeObject UnaryFunction1DEdgeNature_Type
Functions taking 1D input.
PyObject * self
inherits from class Rep
Definition AppCanvas.cpp:20