Blender  V3.3
BPy_GetViewMapGradientNormF0D.cpp
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
8 
9 #include "../../../stroke/AdvancedFunctions0D.h"
10 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 using namespace Freestyle;
16 
18 
19 //------------------------INSTANCE METHODS ----------------------------------
20 
22  "Class hierarchy: :class:`freestyle.types.UnaryFunction0D` > "
23  ":class:`freestyle.types.UnaryFunction0DFloat` > :class:`GetViewMapGradientNormF0D`\n"
24  "\n"
25  ".. method:: __init__(level)\n"
26  "\n"
27  " Builds a GetViewMapGradientNormF0D object.\n"
28  "\n"
29  " :arg level: The level of the pyramid from which the pixel must be\n"
30  " read.\n"
31  " :type level: int\n"
32  "\n"
33  ".. method:: __call__(it)\n"
34  "\n"
35  " Returns the norm of the gradient of the global viewmap density\n"
36  " image.\n"
37  "\n"
38  " :arg it: An Interface0DIterator object.\n"
39  " :type it: :class:`freestyle.types.Interface0DIterator`\n"
40  " :return: The norm of the gradient of the global viewmap density\n"
41  " image.\n"
42  " :rtype: float\n";
43 
45  PyObject *args,
46  PyObject *kwds)
47 {
48  static const char *kwlist[] = {"level", nullptr};
49  int i;
50 
51  if (!PyArg_ParseTupleAndKeywords(args, kwds, "i", (char **)kwlist, &i)) {
52  return -1;
53  }
54  self->py_uf0D_float.uf0D_float = new Functions0D::GetViewMapGradientNormF0D(i);
55  self->py_uf0D_float.uf0D_float->py_uf0D = (PyObject *)self;
56  return 0;
57 }
58 
59 /*-----------------------BPy_GetViewMapGradientNormF0D type definition --------------------------*/
60 
62  PyVarObject_HEAD_INIT(nullptr, 0) "GetViewMapGradientNormF0D", /* tp_name */
63  sizeof(BPy_GetViewMapGradientNormF0D), /* tp_basicsize */
64  0, /* tp_itemsize */
65  nullptr, /* tp_dealloc */
66  0, /* tp_vectorcall_offset */
67  nullptr, /* tp_getattr */
68  nullptr, /* tp_setattr */
69  nullptr, /* tp_reserved */
70  nullptr, /* tp_repr */
71  nullptr, /* tp_as_number */
72  nullptr, /* tp_as_sequence */
73  nullptr, /* tp_as_mapping */
74  nullptr, /* tp_hash */
75  nullptr, /* tp_call */
76  nullptr, /* tp_str */
77  nullptr, /* tp_getattro */
78  nullptr, /* tp_setattro */
79  nullptr, /* tp_as_buffer */
80  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
82  nullptr, /* tp_traverse */
83  nullptr, /* tp_clear */
84  nullptr, /* tp_richcompare */
85  0, /* tp_weaklistoffset */
86  nullptr, /* tp_iter */
87  nullptr, /* tp_iternext */
88  nullptr, /* tp_methods */
89  nullptr, /* tp_members */
90  nullptr, /* tp_getset */
91  &UnaryFunction0DFloat_Type, /* tp_base */
92  nullptr, /* tp_dict */
93  nullptr, /* tp_descr_get */
94  nullptr, /* tp_descr_set */
95  0, /* tp_dictoffset */
96  (initproc)GetViewMapGradientNormF0D___init__, /* tp_init */
97  nullptr, /* tp_alloc */
98  nullptr, /* tp_new */
99 };
100 
102 
103 #ifdef __cplusplus
104 }
105 #endif
static char GetViewMapGradientNormF0D___doc__[]
PyTypeObject GetViewMapGradientNormF0D_Type
static int GetViewMapGradientNormF0D___init__(BPy_GetViewMapGradientNormF0D *self, PyObject *args, PyObject *kwds)
PyTypeObject UnaryFunction0DFloat_Type
inherits from class Rep
Definition: AppCanvas.cpp:18