Blender V4.3
BPy_ShapeUP1D.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
9#include "BPy_ShapeUP1D.h"
10
11#include "BLI_sys_types.h"
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17using namespace Freestyle;
18
20
21//------------------------INSTANCE METHODS ----------------------------------
22
24 /* Wrap. */
25 ShapeUP1D___doc__,
26 "Class hierarchy: :class:`freestyle.types.UnaryPredicate1D` > :class:`ShapeUP1D`\n"
27 "\n"
28 ".. method:: __init__(first, second=0)\n"
29 "\n"
30 " Builds a ShapeUP1D object.\n"
31 "\n"
32 " :arg first: The first Id component.\n"
33 " :type first: int\n"
34 " :arg second: The second Id component.\n"
35 " :type second: int\n"
36 "\n"
37 ".. method:: __call__(inter)\n"
38 "\n"
39 " Returns true if the shape to which the Interface1D belongs to has the\n"
40 " same :class:`freestyle.types.Id` as the one specified by the user.\n"
41 "\n"
42 " :arg inter: An Interface1D object.\n"
43 " :type inter: :class:`freestyle.types.Interface1D`\n"
44 " :return: True if Interface1D belongs to the shape of the\n"
45 " user-specified Id.\n"
46 " :rtype: bool\n");
47
48static int ShapeUP1D___init__(BPy_ShapeUP1D *self, PyObject *args, PyObject *kwds)
49{
50 static const char *kwlist[] = {"first", "second", nullptr};
51 uint u1, u2 = 0;
52
53 if (!PyArg_ParseTupleAndKeywords(args, kwds, "I|I", (char **)kwlist, &u1, &u2)) {
54 return -1;
55 }
56 self->py_up1D.up1D = new Predicates1D::ShapeUP1D(u1, u2);
57 return 0;
58}
59
60/*-----------------------BPy_ShapeUP1D type definition ------------------------------*/
61
62PyTypeObject ShapeUP1D_Type = {
63 /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0)
64 /*tp_name*/ "ShapeUP1D",
65 /*tp_basicsize*/ sizeof(BPy_ShapeUP1D),
66 /*tp_itemsize*/ 0,
67 /*tp_dealloc*/ nullptr,
68 /*tp_vectorcall_offset*/ 0,
69 /*tp_getattr*/ nullptr,
70 /*tp_setattr*/ nullptr,
71 /*tp_as_async*/ nullptr,
72 /*tp_repr*/ nullptr,
73 /*tp_as_number*/ nullptr,
74 /*tp_as_sequence*/ nullptr,
75 /*tp_as_mapping*/ nullptr,
76 /*tp_hash*/ nullptr,
77 /*tp_call*/ nullptr,
78 /*tp_str*/ nullptr,
79 /*tp_getattro*/ nullptr,
80 /*tp_setattro*/ nullptr,
81 /*tp_as_buffer*/ nullptr,
82 /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
83 /*tp_doc*/ ShapeUP1D___doc__,
84 /*tp_traverse*/ nullptr,
85 /*tp_clear*/ nullptr,
86 /*tp_richcompare*/ nullptr,
87 /*tp_weaklistoffset*/ 0,
88 /*tp_iter*/ nullptr,
89 /*tp_iternext*/ nullptr,
90 /*tp_methods*/ nullptr,
91 /*tp_members*/ nullptr,
92 /*tp_getset*/ nullptr,
93 /*tp_base*/ &UnaryPredicate1D_Type,
94 /*tp_dict*/ nullptr,
95 /*tp_descr_get*/ nullptr,
96 /*tp_descr_set*/ nullptr,
97 /*tp_dictoffset*/ 0,
98 /*tp_init*/ (initproc)ShapeUP1D___init__,
99 /*tp_alloc*/ nullptr,
100 /*tp_new*/ nullptr,
101};
102
104
105#ifdef __cplusplus
106}
107#endif
unsigned int uint
PyDoc_STRVAR(ShapeUP1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryPredicate1D` > :class:`ShapeUP1D`\n" "\n" ".. method:: __init__(first, second=0)\n" "\n" " Builds a ShapeUP1D object.\n" "\n" " :arg first: The first Id component.\n" " :type first: int\n" " :arg second: The second Id component.\n" " :type second: int\n" "\n" ".. method:: __call__(inter)\n" "\n" " Returns true if the shape to which the Interface1D belongs to has the\n" " same :class:`freestyle.types.Id` as the one specified by the user.\n" "\n" " :arg inter: An Interface1D object.\n" " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: True if Interface1D belongs to the shape of the\n" " user-specified Id.\n" " :rtype: bool\n")
static int ShapeUP1D___init__(BPy_ShapeUP1D *self, PyObject *args, PyObject *kwds)
PyTypeObject ShapeUP1D_Type
PyTypeObject UnaryPredicate1D_Type
PyObject * self
inherits from class Rep
Definition AppCanvas.cpp:20