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