Blender V4.3
bmesh_py_api.cc File Reference
#include <Python.h>
#include "BLI_utildefines.h"
#include "bmesh.hh"
#include "bmesh_py_types.hh"
#include "bmesh_py_types_customdata.hh"
#include "bmesh_py_types_meshdata.hh"
#include "bmesh_py_types_select.hh"
#include "bmesh_py_geometry.hh"
#include "bmesh_py_ops.hh"
#include "bmesh_py_utils.hh"
#include "BKE_editmesh.hh"
#include "BKE_mesh_types.hh"
#include "DNA_mesh_types.h"
#include "../generic/py_capi_utils.hh"
#include "bmesh_py_api.hh"

Go to the source code of this file.

Functions

 PyDoc_STRVAR (bpy_bm_new_doc, ".. method:: new(use_operators=True)\n" "\n" " :arg 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_new (PyObject *, PyObject *args, PyObject *kw)
 
 PyDoc_STRVAR (bpy_bm_from_edit_mesh_doc, ".. method:: from_edit_mesh(mesh)\n" "\n" " Return a BMesh from this mesh, currently the mesh must already be in editmode.\n" "\n" " :arg mesh: The editmode mesh.\n" " :type mesh: :class:`bpy.types.Mesh`\n" " :return: the BMesh associated with this mesh.\n" " :rtype: :class:`bmesh.types.BMesh`\n")
 
static PyObject * bpy_bm_from_edit_mesh (PyObject *, PyObject *value)
 
void EDBM_update_extern (Mesh *mesh, const bool do_tessface, const bool is_destructive)
 
 PyDoc_STRVAR (bpy_bm_update_edit_mesh_doc, ".. method:: update_edit_mesh(mesh, loop_triangles=True, destructive=True)\n" "\n" " Update the mesh after changes to the BMesh in editmode,\n" " optionally recalculating n-gon tessellation.\n" "\n" " :arg mesh: The editmode mesh.\n" " :type mesh: :class:`bpy.types.Mesh`\n" " :arg loop_triangles: Option to recalculate n-gon tessellation.\n" " :type loop_triangles: bool\n" " :arg destructive: Use when geometry has been added or removed.\n" " :type destructive: bool\n")
 
static PyObject * bpy_bm_update_edit_mesh (PyObject *, PyObject *args, PyObject *kw)
 
 PyDoc_STRVAR (BPy_BM_doc, "This module provides access to blenders bmesh data structures.\n" "\n" ".. include:: include__bmesh.rst\n")
 
PyObject * BPyInit_bmesh ()
 

Variables

static PyMethodDef BPy_BM_methods []
 
static PyModuleDef BPy_BM_module_def
 

Detailed Description

This file defines the 'bmesh' module.

Definition in file bmesh_py_api.cc.

Function Documentation

◆ bpy_bm_from_edit_mesh()

static PyObject * bpy_bm_from_edit_mesh ( PyObject * ,
PyObject * value )
static

◆ bpy_bm_new()

static PyObject * bpy_bm_new ( PyObject * ,
PyObject * args,
PyObject * kw )
static

◆ bpy_bm_update_edit_mesh()

static PyObject * bpy_bm_update_edit_mesh ( PyObject * ,
PyObject * args,
PyObject * kw )
static

Definition at line 112 of file bmesh_py_api.cc.

References EDBM_update_extern(), mesh, PyC_ParseBool(), and PyC_RNA_AsPointer().

◆ BPyInit_bmesh()

◆ EDBM_update_extern()

void EDBM_update_extern ( Mesh * mesh,
const bool do_tessface,
const bool is_destructive )

Bad level call from Python API.

Definition at line 1698 of file editmesh_utils.cc.

Referenced by bpy_bm_update_edit_mesh().

◆ PyDoc_STRVAR() [1/4]

PyDoc_STRVAR ( BPy_BM_doc ,
"This module provides access to blenders bmesh data structures.\n" "\n" ".. include:: include__bmesh.rst\n"  )

◆ PyDoc_STRVAR() [2/4]

PyDoc_STRVAR ( bpy_bm_from_edit_mesh_doc ,
".. method:: from_edit_mesh(mesh)\n" "\n" " Return a BMesh from this mesh,
currently the mesh must already be in editmode.\n" "\n" " :arg mesh:The editmode mesh.\n" " :type mesh::class:`bpy.types.Mesh`\n" " :return:the BMesh associated with this mesh.\n" " :rtype::class:`bmesh.types.BMesh`\n"  )

◆ PyDoc_STRVAR() [3/4]

PyDoc_STRVAR ( bpy_bm_new_doc ,
".. method:: new(use_operators=True)\n" "\n" " :arg 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"  )

◆ PyDoc_STRVAR() [4/4]

PyDoc_STRVAR ( bpy_bm_update_edit_mesh_doc ,
".. method:: update_edit_mesh(mesh, loop_triangles=True, destructive=True)\n" "\n" " Update the mesh after changes to the BMesh in editmode,
\n" " optionally recalculating n-gon tessellation.\n" "\n" " :arg mesh:The editmode mesh.\n" " :type mesh::class:`bpy.types.Mesh`\n" " :arg loop_triangles:Option to recalculate n-gon tessellation.\n" " :type loop_triangles:bool\n" " :arg destructive:Use when geometry has been added or removed.\n" " :type destructive:bool\n"  )

Variable Documentation

◆ BPy_BM_methods

PyMethodDef BPy_BM_methods[]
static
Initial value:
= {
{"new", (PyCFunction)bpy_bm_new, METH_VARARGS | METH_KEYWORDS, bpy_bm_new_doc},
{"from_edit_mesh", (PyCFunction)bpy_bm_from_edit_mesh, METH_O, bpy_bm_from_edit_mesh_doc},
{"update_edit_mesh",
METH_VARARGS | METH_KEYWORDS,
bpy_bm_update_edit_mesh_doc},
{nullptr, nullptr, 0, nullptr},
}
static PyObject * bpy_bm_from_edit_mesh(PyObject *, PyObject *value)
static PyObject * bpy_bm_update_edit_mesh(PyObject *, PyObject *args, PyObject *kw)
static PyObject * bpy_bm_new(PyObject *, PyObject *args, PyObject *kw)

Definition at line 156 of file bmesh_py_api.cc.

◆ BPy_BM_module_def

PyModuleDef BPy_BM_module_def
static
Initial value:
= {
PyModuleDef_HEAD_INIT,
"bmesh",
BPy_BM_doc,
0,
nullptr,
nullptr,
nullptr,
nullptr,
}
static PyMethodDef BPy_BM_methods[]

Definition at line 176 of file bmesh_py_api.cc.

Referenced by BPyInit_bmesh().