Blender V4.5
BPy_MaterialF0D.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_MaterialF0D.h"
10
12
13using namespace Freestyle;
14
16
17//------------------------INSTANCE METHODS ----------------------------------
18
20 /* Wrap. */
21 MaterialF0D___doc__,
22 "Class hierarchy: :class:`freestyle.types.UnaryFunction0D` > "
23 ":class:`freestyle.types.UnaryFunction0DMaterial` > :class:`MaterialF0D`\n"
24 "\n"
25 ".. method:: __init__()\n"
26 "\n"
27 " Builds a MaterialF0D object.\n"
28 "\n"
29 ".. method:: __call__(it)\n"
30 "\n"
31 " Returns the material of the object evaluated at the\n"
32 " :class:`freestyle.types.Interface0D` pointed by the\n"
33 " Interface0DIterator. This evaluation can be ambiguous (in the case of\n"
34 " a :class:`freestyle.types.TVertex` for example. This functor tries to\n"
35 " remove this ambiguity using the context offered by the 1D element to\n"
36 " which the Interface0DIterator belongs to and by arbitrary choosing the\n"
37 " material of the face that lies on its left when following the 1D\n"
38 " element if there are two different materials on each side of the\n"
39 " point. However, there still can be problematic cases, and the user\n"
40 " willing to deal with this cases in a specific way should implement its\n"
41 " own getMaterial functor.\n"
42 "\n"
43 " :arg it: An Interface0DIterator object.\n"
44 " :type it: :class:`freestyle.types.Interface0DIterator`\n"
45 " :return: The material of the object evaluated at the pointed\n"
46 " Interface0D.\n"
47 " :rtype: :class:`freestyle.types.Material`\n");
48
49static int MaterialF0D___init__(BPy_MaterialF0D *self, PyObject *args, PyObject *kwds)
50{
51 static const char *kwlist[] = {nullptr};
52
53 if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
54 return -1;
55 }
56 self->py_uf0D_material.uf0D_material = new Functions0D::MaterialF0D();
57 self->py_uf0D_material.uf0D_material->py_uf0D = (PyObject *)self;
58 return 0;
59}
60
61/*-----------------------BPy_MaterialF0D type definition ------------------------------*/
62
63PyTypeObject MaterialF0D_Type = {
64 /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0)
65 /*tp_name*/ "MaterialF0D",
66 /*tp_basicsize*/ sizeof(BPy_MaterialF0D),
67 /*tp_itemsize*/ 0,
68 /*tp_dealloc*/ nullptr,
69 /*tp_vectorcall_offset*/ 0,
70 /*tp_getattr*/ nullptr,
71 /*tp_setattr*/ nullptr,
72 /*tp_as_async*/ nullptr,
73 /*tp_repr*/ nullptr,
74 /*tp_as_number*/ nullptr,
75 /*tp_as_sequence*/ nullptr,
76 /*tp_as_mapping*/ nullptr,
77 /*tp_hash*/ nullptr,
78 /*tp_call*/ nullptr,
79 /*tp_str*/ nullptr,
80 /*tp_getattro*/ nullptr,
81 /*tp_setattro*/ nullptr,
82 /*tp_as_buffer*/ nullptr,
83 /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
84 /*tp_doc*/ MaterialF0D___doc__,
85 /*tp_traverse*/ nullptr,
86 /*tp_clear*/ nullptr,
87 /*tp_richcompare*/ nullptr,
88 /*tp_weaklistoffset*/ 0,
89 /*tp_iter*/ nullptr,
90 /*tp_iternext*/ nullptr,
91 /*tp_methods*/ nullptr,
92 /*tp_members*/ nullptr,
93 /*tp_getset*/ nullptr,
95 /*tp_dict*/ nullptr,
96 /*tp_descr_get*/ nullptr,
97 /*tp_descr_set*/ nullptr,
98 /*tp_dictoffset*/ 0,
99 /*tp_init*/ (initproc)MaterialF0D___init__,
100 /*tp_alloc*/ nullptr,
101 /*tp_new*/ nullptr,
102};
103
PyTypeObject MaterialF0D_Type
PyDoc_STRVAR(MaterialF0D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction0D` > " ":class:`freestyle.types.UnaryFunction0DMaterial` > :class:`MaterialF0D`\n" "\n" ".. method:: __init__()\n" "\n" " Builds a MaterialF0D object.\n" "\n" ".. method:: __call__(it)\n" "\n" " Returns the material of the object evaluated at the\n" " :class:`freestyle.types.Interface0D` pointed by the\n" " Interface0DIterator. This evaluation can be ambiguous (in the case of\n" " a :class:`freestyle.types.TVertex` for example. This functor tries to\n" " remove this ambiguity using the context offered by the 1D element to\n" " which the Interface0DIterator belongs to and by arbitrary choosing the\n" " material of the face that lies on its left when following the 1D\n" " element if there are two different materials on each side of the\n" " point. However, there still can be problematic cases, and the user\n" " willing to deal with this cases in a specific way should implement its\n" " own getMaterial functor.\n" "\n" " :arg it: An Interface0DIterator object.\n" " :type it: :class:`freestyle.types.Interface0DIterator`\n" " :return: The material of the object evaluated at the pointed\n" " Interface0D.\n" " :rtype: :class:`freestyle.types.Material`\n")
static int MaterialF0D___init__(BPy_MaterialF0D *self, PyObject *args, PyObject *kwds)
PyTypeObject UnaryFunction0DMaterial_Type
Functions taking 0D input.
PyObject * self
inherits from class Rep
Definition AppCanvas.cpp:20