Blender  V3.3
BPy_ShapeIdF0D.cpp
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
7 #include "BPy_ShapeIdF0D.h"
8 
9 #include "../../../view_map/Functions0D.h"
10 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 using namespace Freestyle;
16 
18 
19 //------------------------INSTANCE METHODS ----------------------------------
20 
21 static char ShapeIdF0D___doc__[] =
22  "Class hierarchy: :class:`freestyle.types.UnaryFunction0D` > "
23  ":class:`freestyle.types.UnaryFunction0DId` > :class:`ShapeIdF0D`\n"
24  "\n"
25  ".. method:: __init__()\n"
26  "\n"
27  " Builds a ShapeIdF0D object.\n"
28  "\n"
29  ".. method:: __call__(it)\n"
30  "\n"
31  " Returns the :class:`freestyle.types.Id` of the Shape the\n"
32  " :class:`freestyle.types.Interface0D` pointed by the\n"
33  " Interface0DIterator belongs to. This evaluation can be ambiguous (in\n"
34  " the case of a :class:`freestyle.types.TVertex` for example). This\n"
35  " functor tries to remove this ambiguity using the context offered by\n"
36  " the 1D element to which the Interface0DIterator belongs to. However,\n"
37  " there still can be problematic cases, and the user willing to deal\n"
38  " with this cases in a specific way should implement its own\n"
39  " getShapeIdF0D functor.\n"
40  "\n"
41  " :arg it: An Interface0DIterator object.\n"
42  " :type it: :class:`freestyle.types.Interface0DIterator`\n"
43  " :return: The Id of the Shape the pointed Interface0D belongs to.\n"
44  " :rtype: :class:`freestyle.types.Id`\n";
45 
46 static int ShapeIdF0D___init__(BPy_ShapeIdF0D *self, PyObject *args, PyObject *kwds)
47 {
48  static const char *kwlist[] = {nullptr};
49 
50  if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
51  return -1;
52  }
53  self->py_uf0D_id.uf0D_id = new Functions0D::ShapeIdF0D();
54  self->py_uf0D_id.uf0D_id->py_uf0D = (PyObject *)self;
55  return 0;
56 }
57 
58 /*-----------------------BPy_ShapeIdF0D type definition ------------------------------*/
59 
60 PyTypeObject ShapeIdF0D_Type = {
61  PyVarObject_HEAD_INIT(nullptr, 0) "ShapeIdF0D", /* tp_name */
62  sizeof(BPy_ShapeIdF0D), /* 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  ShapeIdF0D___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  &UnaryFunction0DId_Type, /* tp_base */
91  nullptr, /* tp_dict */
92  nullptr, /* tp_descr_get */
93  nullptr, /* tp_descr_set */
94  0, /* tp_dictoffset */
95  (initproc)ShapeIdF0D___init__, /* tp_init */
96  nullptr, /* tp_alloc */
97  nullptr, /* tp_new */
98 };
99 
101 
102 #ifdef __cplusplus
103 }
104 #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:18