Blender  V3.3
BPy_ContourUP1D.cpp
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
7 #include "BPy_ContourUP1D.h"
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 using namespace Freestyle;
14 
16 
17 //------------------------INSTANCE METHODS ----------------------------------
18 
19 static char ContourUP1D___doc__[] =
20  "Class hierarchy: :class:`freestyle.types.UnaryPredicate1D` > :class:`ContourUP1D`\n"
21  "\n"
22  ".. method:: __call__(inter)\n"
23  "\n"
24  " Returns true if the Interface1D is a contour. An Interface1D is a\n"
25  " contour if it is bordered by a different shape on each of its sides.\n"
26  "\n"
27  " :arg inter: An Interface1D object.\n"
28  " :type inter: :class:`freestyle.types.Interface1D`\n"
29  " :return: True if the Interface1D is a contour, false otherwise.\n"
30  " :rtype: bool\n";
31 
32 static int ContourUP1D___init__(BPy_ContourUP1D *self, PyObject *args, PyObject *kwds)
33 {
34  static const char *kwlist[] = {nullptr};
35 
36  if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
37  return -1;
38  }
39  self->py_up1D.up1D = new Predicates1D::ContourUP1D();
40  return 0;
41 }
42 
43 /*-----------------------BPy_ContourUP1D type definition ------------------------------*/
44 
45 PyTypeObject ContourUP1D_Type = {
46  PyVarObject_HEAD_INIT(nullptr, 0) "ContourUP1D", /* tp_name */
47  sizeof(BPy_ContourUP1D), /* tp_basicsize */
48  0, /* tp_itemsize */
49  nullptr, /* tp_dealloc */
50  0, /* tp_vectorcall_offset */
51  nullptr, /* tp_getattr */
52  nullptr, /* tp_setattr */
53  nullptr, /* tp_reserved */
54  nullptr, /* tp_repr */
55  nullptr, /* tp_as_number */
56  nullptr, /* tp_as_sequence */
57  nullptr, /* tp_as_mapping */
58  nullptr, /* tp_hash */
59  nullptr, /* tp_call */
60  nullptr, /* tp_str */
61  nullptr, /* tp_getattro */
62  nullptr, /* tp_setattro */
63  nullptr, /* tp_as_buffer */
64  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
65  ContourUP1D___doc__, /* tp_doc */
66  nullptr, /* tp_traverse */
67  nullptr, /* tp_clear */
68  nullptr, /* tp_richcompare */
69  0, /* tp_weaklistoffset */
70  nullptr, /* tp_iter */
71  nullptr, /* tp_iternext */
72  nullptr, /* tp_methods */
73  nullptr, /* tp_members */
74  nullptr, /* tp_getset */
75  &UnaryPredicate1D_Type, /* tp_base */
76  nullptr, /* tp_dict */
77  nullptr, /* tp_descr_get */
78  nullptr, /* tp_descr_set */
79  0, /* tp_dictoffset */
80  (initproc)ContourUP1D___init__, /* tp_init */
81  nullptr, /* tp_alloc */
82  nullptr, /* tp_new */
83 };
84 
86 
87 #ifdef __cplusplus
88 }
89 #endif
static char ContourUP1D___doc__[]
PyTypeObject ContourUP1D_Type
static int ContourUP1D___init__(BPy_ContourUP1D *self, PyObject *args, PyObject *kwds)
PyTypeObject UnaryPredicate1D_Type
inherits from class Rep
Definition: AppCanvas.cpp:18