9 #include "../../BPy_Convert.h"
10 #include "../../Interface0D/BPy_SVertex.h"
23 "Class hierarchy: :class:`Interface1D` > :class:`FEdge` > :class:`FEdgeSmooth`\n"
25 "Class defining a smooth edge. This kind of edge typically runs across\n"
26 "a face of the input mesh. It can be a silhouette, a ridge or valley,\n"
27 "a suggestive contour.\n"
29 ".. method:: __init__()\n"
30 " __init__(brother)\n"
31 " __init__(first_vertex, second_vertex)\n"
33 " Builds an :class:`FEdgeSmooth` using the default constructor,\n"
34 " copy constructor, or between two :class:`SVertex`.\n"
36 " :arg brother: An FEdgeSmooth object.\n"
37 " :type brother: :class:`FEdgeSmooth`\n"
38 " :arg first_vertex: The first SVertex object.\n"
39 " :type first_vertex: :class:`SVertex`\n"
40 " :arg second_vertex: The second SVertex object.\n"
41 " :type second_vertex: :class:`SVertex`");
45 static const char *kwlist_1[] = {
"brother",
nullptr};
46 static const char *kwlist_2[] = {
"first_vertex",
"second_vertex",
nullptr};
47 PyObject *obj1 =
nullptr, *obj2 =
nullptr;
49 if (PyArg_ParseTupleAndKeywords(
58 else if ((
void)PyErr_Clear(),
59 PyArg_ParseTupleAndKeywords(args,
70 PyErr_SetString(PyExc_TypeError,
"invalid argument(s)");
73 self->py_fe.fe =
self->fes;
74 self->py_fe.py_if1D.if1D =
self->fes;
75 self->py_fe.py_if1D.borrowed =
false;
102 Vec3r p(bmo->data[0], bmo->data[1], bmo->data[2]);
103 self->fes->setNormal(p);
111 bmo->data[index] = p[index];
119 p[index] = bmo->data[index];
120 self->fes->setNormal(p);
142 "The normal of the face that this FEdge is running across.\n"
144 ":type: :class:`mathutils.Vector`");
158 self->fes->setNormal(p);
163 "The index of the material of the face that this FEdge is running across.\n"
169 return PyLong_FromLong(
self->fes->frs_materialIndex());
176 unsigned int i = PyLong_AsUnsignedLong(value);
177 if (PyErr_Occurred()) {
180 self->fes->setFrsMaterialIndex(i);
185 "The material of the face that this FEdge is running across.\n"
187 ":type: :class:`Material`");
195 "The face mark of the face that this FEdge is running across.\n"
206 if (!PyBool_Check(value)) {
217 FEdgeSmooth_normal_doc,
222 FEdgeSmooth_material_index_doc,
227 FEdgeSmooth_material_doc,
232 FEdgeSmooth_face_mark_doc,
234 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr}
240 PyVarObject_HEAD_INIT(
nullptr, 0)
"FEdgeSmooth",
258 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
PyObject * PyBool_from_bool(bool b)
bool bool_from_PyBool(PyObject *b)
PyObject * BPy_FrsMaterial_from_FrsMaterial(const FrsMaterial &m)
static Mathutils_Callback FEdgeSmooth_mathutils_cb
static PyObject * FEdgeSmooth_normal_get(BPy_FEdgeSmooth *self, void *UNUSED(closure))
static PyObject * FEdgeSmooth_face_mark_get(BPy_FEdgeSmooth *self, void *UNUSED(closure))
static int FEdgeSmooth_material_index_set(BPy_FEdgeSmooth *self, PyObject *value, void *UNUSED(closure))
static int FEdgeSmooth_mathutils_get(BaseMathObject *bmo, int)
static PyObject * FEdgeSmooth_material_index_get(BPy_FEdgeSmooth *self, void *UNUSED(closure))
void FEdgeSmooth_mathutils_register_callback()
static int FEdgeSmooth_mathutils_set_index(BaseMathObject *bmo, int, int index)
static int FEdgeSmooth_normal_set(BPy_FEdgeSmooth *self, PyObject *value, void *UNUSED(closure))
static PyObject * FEdgeSmooth_material_get(BPy_FEdgeSmooth *self, void *UNUSED(closure))
static int FEdgeSmooth_mathutils_check(BaseMathObject *bmo)
PyTypeObject FEdgeSmooth_Type
static int FEdgeSmooth_mathutils_set(BaseMathObject *bmo, int)
static int FEdgeSmooth_init(BPy_FEdgeSmooth *self, PyObject *args, PyObject *kwds)
PyDoc_STRVAR(FEdgeSmooth_doc, "Class hierarchy: :class:`Interface1D` > :class:`FEdge` > :class:`FEdgeSmooth`\n" "\n" "Class defining a smooth edge. This kind of edge typically runs across\n" "a face of the input mesh. It can be a silhouette, a ridge or valley,\n" "a suggestive contour.\n" "\n" ".. method:: __init__()\n" " __init__(brother)\n" " __init__(first_vertex, second_vertex)\n" "\n" " Builds an :class:`FEdgeSmooth` using the default constructor,\n" " copy constructor, or between two :class:`SVertex`.\n" "\n" " :arg brother: An FEdgeSmooth object.\n" " :type brother: :class:`FEdgeSmooth`\n" " :arg first_vertex: The first SVertex object.\n" " :type first_vertex: :class:`SVertex`\n" " :arg second_vertex: The second SVertex object.\n" " :type second_vertex: :class:`SVertex`")
static unsigned char FEdgeSmooth_mathutils_cb_index
static int FEdgeSmooth_mathutils_get_index(BaseMathObject *bmo, int, int index)
static PyGetSetDef BPy_FEdgeSmooth_getseters[]
static int FEdgeSmooth_face_mark_set(BPy_FEdgeSmooth *self, PyObject *value, void *UNUSED(closure))
#define BPy_FEdgeSmooth_Check(v)
PyTypeObject SVertex_Type
ATTR_WARN_UNUSED_RESULT const BMVert * v
int mathutils_array_parse(float *array, int array_num_min, int array_num_max, PyObject *value, const char *error_prefix)
uchar Mathutils_RegisterCallback(Mathutils_Callback *cb)
PyObject * Vector_CreatePyObject_cb(PyObject *cb_user, int vec_num, uchar cb_type, uchar cb_subtype)