Blender  V2.93
BPy_ShapeIdF0D.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_ShapeIdF0D.h"
22 
23 #include "../../../view_map/Functions0D.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 using namespace Freestyle;
30 
32 
33 //------------------------INSTANCE METHODS ----------------------------------
34 
35 static char ShapeIdF0D___doc__[] =
36  "Class hierarchy: :class:`freestyle.types.UnaryFunction0D` > "
37  ":class:`freestyle.types.UnaryFunction0DId` > :class:`ShapeIdF0D`\n"
38  "\n"
39  ".. method:: __init__()\n"
40  "\n"
41  " Builds a ShapeIdF0D object.\n"
42  "\n"
43  ".. method:: __call__(it)\n"
44  "\n"
45  " Returns the :class:`freestyle.types.Id` of the Shape the\n"
46  " :class:`freestyle.types.Interface0D` pointed by the\n"
47  " Interface0DIterator belongs to. This evaluation can be ambiguous (in\n"
48  " the case of a :class:`freestyle.types.TVertex` for example). This\n"
49  " functor tries to remove this ambiguity using the context offered by\n"
50  " the 1D element to which the Interface0DIterator belongs to. However,\n"
51  " there still can be problematic cases, and the user willing to deal\n"
52  " with this cases in a specific way should implement its own\n"
53  " getShapeIdF0D functor.\n"
54  "\n"
55  " :arg it: An Interface0DIterator object.\n"
56  " :type it: :class:`freestyle.types.Interface0DIterator`\n"
57  " :return: The Id of the Shape the pointed Interface0D belongs to.\n"
58  " :rtype: :class:`freestyle.types.Id`\n";
59 
60 static int ShapeIdF0D___init__(BPy_ShapeIdF0D *self, PyObject *args, PyObject *kwds)
61 {
62  static const char *kwlist[] = {nullptr};
63 
64  if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
65  return -1;
66  }
67  self->py_uf0D_id.uf0D_id = new Functions0D::ShapeIdF0D();
68  self->py_uf0D_id.uf0D_id->py_uf0D = (PyObject *)self;
69  return 0;
70 }
71 
72 /*-----------------------BPy_ShapeIdF0D type definition ------------------------------*/
73 
74 PyTypeObject ShapeIdF0D_Type = {
75  PyVarObject_HEAD_INIT(nullptr, 0) "ShapeIdF0D", /* tp_name */
76  sizeof(BPy_ShapeIdF0D), /* tp_basicsize */
77  0, /* tp_itemsize */
78  nullptr, /* tp_dealloc */
79  0, /* tp_vectorcall_offset */
80  nullptr, /* tp_getattr */
81  nullptr, /* tp_setattr */
82  nullptr, /* tp_reserved */
83  nullptr, /* tp_repr */
84  nullptr, /* tp_as_number */
85  nullptr, /* tp_as_sequence */
86  nullptr, /* tp_as_mapping */
87  nullptr, /* tp_hash */
88  nullptr, /* tp_call */
89  nullptr, /* tp_str */
90  nullptr, /* tp_getattro */
91  nullptr, /* tp_setattro */
92  nullptr, /* tp_as_buffer */
93  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
94  ShapeIdF0D___doc__, /* tp_doc */
95  nullptr, /* tp_traverse */
96  nullptr, /* tp_clear */
97  nullptr, /* tp_richcompare */
98  0, /* tp_weaklistoffset */
99  nullptr, /* tp_iter */
100  nullptr, /* tp_iternext */
101  nullptr, /* tp_methods */
102  nullptr, /* tp_members */
103  nullptr, /* tp_getset */
104  &UnaryFunction0DId_Type, /* tp_base */
105  nullptr, /* tp_dict */
106  nullptr, /* tp_descr_get */
107  nullptr, /* tp_descr_set */
108  0, /* tp_dictoffset */
109  (initproc)ShapeIdF0D___init__, /* tp_init */
110  nullptr, /* tp_alloc */
111  nullptr, /* tp_new */
112 };
113 
115 
116 #ifdef __cplusplus
117 }
118 #endif
static char ShapeIdF0D___doc__[]
static int ShapeIdF0D___init__(BPy_ShapeIdF0D *self, PyObject *args, PyObject *kwds)
PyTypeObject ShapeIdF0D_Type
PyTypeObject UnaryFunction0DId_Type
inherits from class Rep
Definition: AppCanvas.cpp:32