Blender  V2.93
BPy_SameShapeIdBP1D.cpp
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
21 #include "BPy_SameShapeIdBP1D.h"
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 using namespace Freestyle;
28 
30 
31 //------------------------INSTANCE METHODS ----------------------------------
32 
33 static char SameShapeIdBP1D___doc__[] =
34  "Class hierarchy: :class:`freestyle.types.BinaryPredicate1D` > :class:`SameShapeIdBP1D`\n"
35  "\n"
36  ".. method:: __call__(inter1, inter2)\n"
37  "\n"
38  " Returns true if inter1 and inter2 belong to the same shape.\n"
39  "\n"
40  " :arg inter1: The first Interface1D object.\n"
41  " :type inter1: :class:`freestyle.types.Interface1D`\n"
42  " :arg inter2: The second Interface1D object.\n"
43  " :type inter2: :class:`freestyle.types.Interface1D`\n"
44  " :return: True or false.\n"
45  " :rtype: bool\n";
46 
47 static int SameShapeIdBP1D___init__(BPy_SameShapeIdBP1D *self, PyObject *args, PyObject *kwds)
48 {
49  static const char *kwlist[] = {nullptr};
50 
51  if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
52  return -1;
53  }
54  self->py_bp1D.bp1D = new Predicates1D::SameShapeIdBP1D();
55  return 0;
56 }
57 
58 /*-----------------------BPy_SameShapeIdBP1D type definition ------------------------------*/
59 
60 PyTypeObject SameShapeIdBP1D_Type = {
61  PyVarObject_HEAD_INIT(nullptr, 0) "SameShapeIdBP1D", /* tp_name */
62  sizeof(BPy_SameShapeIdBP1D), /* tp_basicsize */
63  0, /* tp_itemsize */
64  nullptr, /* tp_dealloc */
65  0, /* tp_vectorcall_offset */
66  nullptr, /* tp_getattr */
67  nullptr, /* tp_setattr */
68  nullptr, /* tp_reserved */
69  nullptr, /* tp_repr */
70  nullptr, /* tp_as_number */
71  nullptr, /* tp_as_sequence */
72  nullptr, /* tp_as_mapping */
73  nullptr, /* tp_hash */
74  nullptr, /* tp_call */
75  nullptr, /* tp_str */
76  nullptr, /* tp_getattro */
77  nullptr, /* tp_setattro */
78  nullptr, /* tp_as_buffer */
79  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
80  SameShapeIdBP1D___doc__, /* tp_doc */
81  nullptr, /* tp_traverse */
82  nullptr, /* tp_clear */
83  nullptr, /* tp_richcompare */
84  0, /* tp_weaklistoffset */
85  nullptr, /* tp_iter */
86  nullptr, /* tp_iternext */
87  nullptr, /* tp_methods */
88  nullptr, /* tp_members */
89  nullptr, /* tp_getset */
90  &BinaryPredicate1D_Type, /* tp_base */
91  nullptr, /* tp_dict */
92  nullptr, /* tp_descr_get */
93  nullptr, /* tp_descr_set */
94  0, /* tp_dictoffset */
95  (initproc)SameShapeIdBP1D___init__, /* tp_init */
96  nullptr, /* tp_alloc */
97  nullptr, /* tp_new */
98 };
99 
101 
102 #ifdef __cplusplus
103 }
104 #endif
PyTypeObject BinaryPredicate1D_Type
static char SameShapeIdBP1D___doc__[]
PyTypeObject SameShapeIdBP1D_Type
static int SameShapeIdBP1D___init__(BPy_SameShapeIdBP1D *self, PyObject *args, PyObject *kwds)
inherits from class Rep
Definition: AppCanvas.cpp:32