29 "Class hierarchy: :class:`Interface1D` > :class:`FEdge` > :class:`FEdgeSmooth`\n"
31 "Class defining a smooth edge. This kind of edge typically runs across\n"
32 "a face of the input mesh. It can be a silhouette, a ridge or valley,\n"
33 "a suggestive contour.\n"
35 ".. method:: __init__()\n"
36 " __init__(brother)\n"
37 " __init__(first_vertex, second_vertex)\n"
39 " Builds an :class:`FEdgeSmooth` using the default constructor,\n"
40 " copy constructor, or between two :class:`SVertex`.\n"
42 " :arg brother: An FEdgeSmooth object.\n"
43 " :type brother: :class:`FEdgeSmooth`\n"
44 " :arg first_vertex: The first SVertex object.\n"
45 " :type first_vertex: :class:`SVertex`\n"
46 " :arg second_vertex: The second SVertex object.\n"
47 " :type second_vertex: :class:`SVertex`");
51 static const char *kwlist_1[] = {
"brother",
nullptr};
52 static const char *kwlist_2[] = {
"first_vertex",
"second_vertex",
nullptr};
53 PyObject *obj1 =
nullptr, *obj2 =
nullptr;
55 if (PyArg_ParseTupleAndKeywords(args, kwds,
"|O!", (
char **)kwlist_1, &
FEdgeSmooth_Type, &obj1))
64 else if ((
void)PyErr_Clear(),
65 PyArg_ParseTupleAndKeywords(
71 PyErr_SetString(PyExc_TypeError,
"invalid argument(s)");
75 self->py_fe.py_if1D.if1D =
self->fes;
76 self->py_fe.py_if1D.borrowed =
false;
103 Vec3r p(bmo->data[0], bmo->data[1], bmo->data[2]);
104 self->fes->setNormal(p);
112 bmo->data[index] = p[index];
120 p[index] = bmo->data[index];
121 self->fes->setNormal(p);
144 FEdgeSmooth_normal_doc,
145 "The normal of the face that this FEdge is running across.\n"
147 ":type: :class:`mathutils.Vector`");
161 self->fes->setNormal(p);
167 FEdgeSmooth_material_index_doc,
168 "The index of the material of the face that this FEdge is running across.\n"
174 return PyLong_FromLong(
self->fes->frs_materialIndex());
181 uint i = PyLong_AsUnsignedLong(value);
182 if (PyErr_Occurred()) {
185 self->fes->setFrsMaterialIndex(i);
191 FEdgeSmooth_material_doc,
192 "The material of the face that this FEdge is running across.\n"
194 ":type: :class:`Material`");
203 FEdgeSmooth_face_mark_doc,
204 "The face mark of the face that this FEdge is running across.\n"
215 if (!PyBool_Check(value)) {
226 FEdgeSmooth_normal_doc,
231 FEdgeSmooth_material_index_doc,
236 FEdgeSmooth_material_doc,
241 FEdgeSmooth_face_mark_doc,
243 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr}
249 PyVarObject_HEAD_INIT(
nullptr, 0)
268 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
bool bool_from_PyBool(PyObject *b)
PyObject * PyBool_from_bool(bool b)
PyObject * BPy_FrsMaterial_from_FrsMaterial(const FrsMaterial &m)
static Mathutils_Callback FEdgeSmooth_mathutils_cb
static int FEdgeSmooth_material_index_set(BPy_FEdgeSmooth *self, PyObject *value, void *)
static int FEdgeSmooth_mathutils_get(BaseMathObject *bmo, int)
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`")
void FEdgeSmooth_mathutils_register_callback()
static int FEdgeSmooth_mathutils_set_index(BaseMathObject *bmo, int, int index)
static PyObject * FEdgeSmooth_normal_get(BPy_FEdgeSmooth *self, void *)
static int FEdgeSmooth_normal_set(BPy_FEdgeSmooth *self, PyObject *value, void *)
static PyObject * FEdgeSmooth_material_index_get(BPy_FEdgeSmooth *self, void *)
static int FEdgeSmooth_mathutils_check(BaseMathObject *bmo)
PyTypeObject FEdgeSmooth_Type
static PyObject * FEdgeSmooth_face_mark_get(BPy_FEdgeSmooth *self, void *)
static int FEdgeSmooth_mathutils_set(BaseMathObject *bmo, int)
static int FEdgeSmooth_init(BPy_FEdgeSmooth *self, PyObject *args, PyObject *kwds)
static uchar FEdgeSmooth_mathutils_cb_index
static PyObject * FEdgeSmooth_material_get(BPy_FEdgeSmooth *self, void *)
static int FEdgeSmooth_face_mark_set(BPy_FEdgeSmooth *self, PyObject *value, void *)
static int FEdgeSmooth_mathutils_get_index(BaseMathObject *bmo, int, int index)
static PyGetSetDef BPy_FEdgeSmooth_getseters[]
#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)