39 ".. function:: new(*, use_operators=True)\n"
41 " :param use_operators: Support calling operators in :mod:`bmesh.ops` (uses some "
42 "extra memory per vert/edge/face).\n"
43 " :type use_operators: bool\n"
44 " :return: Return a new, empty BMesh.\n"
45 " :rtype: :class:`bmesh.types.BMesh`\n");
46static PyObject *
bpy_bm_new(PyObject * , PyObject *args, PyObject *kw)
48 static const char *kwlist[] = {
"use_operators",
nullptr};
51 bool use_operators =
true;
53 if (!PyArg_ParseTupleAndKeywords(args,
58 const_cast<char **
>(kwlist),
75 bpy_bm_from_edit_mesh_doc,
76 ".. function:: from_edit_mesh(mesh)\n"
78 " Return a BMesh from this mesh, currently the mesh must already be in editmode.\n"
80 " :param mesh: The editmode mesh.\n"
81 " :type mesh: :class:`bpy.types.Mesh`\n"
82 " :return: the BMesh associated with this mesh.\n"
83 " :rtype: :class:`bmesh.types.BMesh`\n");
88 if (
mesh ==
nullptr) {
92 if (
mesh->runtime->edit_mesh ==
nullptr) {
93 PyErr_SetString(PyExc_ValueError,
"The mesh must be in editmode");
106 bpy_bm_update_edit_mesh_doc,
107 ".. function:: update_edit_mesh(mesh, *, loop_triangles=True, destructive=True)\n"
109 " Update the mesh after changes to the BMesh in editmode,\n"
110 " optionally recalculating n-gon tessellation.\n"
112 " :param mesh: The editmode mesh.\n"
113 " :type mesh: :class:`bpy.types.Mesh`\n"
114 " :param loop_triangles: Option to recalculate n-gon tessellation.\n"
115 " :type loop_triangles: bool\n"
116 " :param destructive: Use when geometry has been added or removed.\n"
117 " :type destructive: bool\n");
120 static const char *kwlist[] = {
"mesh",
"loop_triangles",
"destructive",
nullptr};
123 bool do_loop_triangles =
true;
124 bool is_destructive =
true;
126 if (!PyArg_ParseTupleAndKeywords(args,
133 const_cast<char **
>(kwlist),
145 if (
mesh ==
nullptr) {
149 if (
mesh->runtime->edit_mesh ==
nullptr) {
150 PyErr_SetString(PyExc_ValueError,
"The mesh must be in editmode");
163# pragma clang diagnostic push
164# pragma clang diagnostic ignored "-Wcast-function-type"
166# pragma GCC diagnostic push
167# pragma GCC diagnostic ignored "-Wcast-function-type"
174 METH_VARARGS | METH_KEYWORDS,
179 bpy_bm_from_edit_mesh_doc},
182 METH_VARARGS | METH_KEYWORDS,
183 bpy_bm_update_edit_mesh_doc},
184 {
nullptr,
nullptr, 0,
nullptr},
189# pragma clang diagnostic pop
191# pragma GCC diagnostic pop
198 "This module provides access to Blender's bmesh data structures.\n"
200 ".. include:: include__bmesh.rst\n");
217 PyObject *sys_modules = PyImport_GetModuleDict();
VecBase< float, D > constexpr mod(VecOp< float, D >, VecOp< float, D >) RET
int PyC_ParseBool(PyObject *o, void *p)
BMesh * BKE_editmesh_bmesh_get_for_write(Mesh *mesh)
void BPy_BM_init_types_select()
PyObject * BPyInit_bmesh_ops()
static PyMethodDef BPy_BM_methods[]
PyObject * BPyInit_bmesh()
PyDoc_STRVAR(bpy_bm_new_doc, ".. function:: new(*, use_operators=True)\n" "\n" " :param use_operators: Support calling operators in :mod:`bmesh.ops` (uses some " "extra memory per vert/edge/face).\n" " :type use_operators: bool\n" " :return: Return a new, empty BMesh.\n" " :rtype: :class:`bmesh.types.BMesh`\n")
static PyObject * bpy_bm_from_edit_mesh(PyObject *, PyObject *value)
PyObject * BPyInit_bmesh_types()
static PyObject * bpy_bm_new(PyObject *, PyObject *args, PyObject *kw)
void BPy_BM_init_types_customdata()
static PyObject * bpy_bm_update_edit_mesh(PyObject *, PyObject *args, PyObject *kw)
static PyModuleDef BPy_BM_module_def
const BMAllocTemplate bm_mesh_allocsize_default
void * PyC_RNA_AsPointer(PyObject *value, const char *type_name)
void EDBM_update_extern(Mesh *mesh, bool do_tessellation, bool is_destructive)
int PyC_Module_AddToSysModules(PyObject *sys_modules, PyObject *module)
PyObject * BPy_BMesh_CreatePyObject(BMesh *bm, int flag)
PyObject * BPyInit_bmesh_geometry()
BMesh * BM_mesh_create(const BMAllocTemplate *allocsize, const BMeshCreateParams *params)
BMesh Make Mesh.
void BPy_BM_init_types_meshdata()
PyObject * BPyInit_bmesh_utils()