Blender V5.3
bmesh_py_types.cc File Reference
#include "BLI_array_utils.hh"
#include "BLI_math_geom_c.hh"
#include "BLI_math_matrix_c.hh"
#include "BLI_math_vector_c.hh"
#include "BLI_sort.hh"
#include "BLI_string_utils.hh"
#include "DNA_material_types.h"
#include "DNA_mesh_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "BKE_customdata.hh"
#include "BKE_global.hh"
#include "BKE_lib_id.hh"
#include "BKE_mesh.h"
#include "BKE_mesh_runtime.hh"
#include "BKE_mesh_types.hh"
#include "BKE_object.hh"
#include "DEG_depsgraph.hh"
#include "DEG_depsgraph_query.hh"
#include "bmesh.hh"
#include <Python.h>
#include "../generic/python_compat.hh"
#include "../mathutils/mathutils.hh"
#include "../generic/py_capi_utils.hh"
#include "../generic/python_utildefines.hh"
#include "bmesh_py_types.hh"
#include "bmesh_py_types_customdata.hh"
#include "bmesh_py_types_meshdata.hh"
#include "bmesh_py_types_select.hh"

Go to the source code of this file.

Namespaces

namespace  blender
 BMesh Iterators.

Macros

#define BPY_BM_HTYPE_NOLOOP   "'VERT', 'EDGE', 'FACE'"
#define BPY_BM_HFLAG_ALL_STR   "'SELECT', 'HIDE', 'SEAM', 'SMOOTH', 'TAG'"

Functions

static void blender::bm_dealloc_editmode_warn (BPy_BMesh *self)
 blender::PyDoc_STRVAR (bpy_bm_elem_select_doc, "Selected state of this element.\n" "\n" ":type: bool\n")
 blender::PyDoc_STRVAR (bpy_bm_elem_hide_doc, "Hidden state of this element.\n" "\n" ":type: bool\n")
 blender::PyDoc_STRVAR (bpy_bm_elem_tag_doc, "Generic attribute scripts can use for own logic\n" "\n" ":type: bool\n")
 blender::PyDoc_STRVAR (bpy_bm_elem_smooth_doc, "Smooth state of this element.\n" "\n" ":type: bool\n")
 blender::PyDoc_STRVAR (bpy_bm_elem_seam_doc, "Seam for UV unwrapping.\n" "\n" ":type: bool\n")
 blender::PyDoc_STRVAR (bpy_bm_elem_uv_select_doc, "UV selected state of this element.\n" "\n" ":type: bool\n")
 blender::PyDoc_STRVAR (bpy_bm_elem_uv_select_vert_doc, "UV vertex selected state of this loop.\n" "\n" ":type: bool\n")
 blender::PyDoc_STRVAR (bpy_bm_elem_uv_select_edge_doc, "UV edge selected state of this loop.\n" "\n" ":type: bool\n")
static PyObject * blender::bpy_bm_elem_hflag_get (BPy_BMElem *self, void *flag)
static int blender::bpy_bm_elem_hflag_set (BPy_BMElem *self, PyObject *value, void *flag)
 blender::PyDoc_STRVAR (bpy_bm_elem_index_doc, "Index of this element.\n" "\n" ":type: int\n" "\n" ".. note::\n" "\n" " This value is not necessarily valid, while editing the mesh it can become *dirty*.\n" "\n" " It's also possible to assign any number to this attribute for a scripts internal logic.\n" "\n" " To ensure the value is up to date - see :meth:`bmesh.types.BMElemSeq.index_update`.\n")
static PyObject * blender::bpy_bm_elem_index_get (BPy_BMElem *self, void *)
static int blender::bpy_bm_elem_index_set (BPy_BMElem *self, PyObject *value, void *)
 blender::PyDoc_STRVAR (bpy_bmvertseq_doc, "This mesh's vert sequence (read-only).\n" "\n" ":type: :class:`bmesh.types.BMVertSeq`\n")
static PyObject * blender::bpy_bmvertseq_get (BPy_BMesh *self, void *)
 blender::PyDoc_STRVAR (bpy_bmedgeseq_doc, "This mesh's edge sequence (read-only).\n" "\n" ":type: :class:`bmesh.types.BMEdgeSeq`\n")
static PyObject * blender::bpy_bmedgeseq_get (BPy_BMesh *self, void *)
 blender::PyDoc_STRVAR (bpy_bmfaceseq_doc, "This mesh's face sequence (read-only).\n" "\n" ":type: :class:`bmesh.types.BMFaceSeq`\n")
static PyObject * blender::bpy_bmfaceseq_get (BPy_BMesh *self, void *)
 blender::PyDoc_STRVAR (bpy_bmloopseq_doc, "This mesh's loops (read-only).\n" "\n" ":type: :class:`bmesh.types.BMLoopSeq`\n" "\n" ".. note::\n" "\n" " Loops must be accessed via faces, this is only exposed for layer access.\n")
static PyObject * blender::bpy_bmloopseq_get (BPy_BMesh *self, void *)
 blender::PyDoc_STRVAR (bpy_bmvert_link_edges_doc, "Edges connected to this vertex (read-only).\n" "\n" ":type: :class:`bmesh.types.BMElemSeq`\\ [:class:`bmesh.types.BMEdge`]\n")
 blender::PyDoc_STRVAR (bpy_bmvert_link_faces_doc, "Faces connected to this vertex (read-only).\n" "\n" ":type: :class:`bmesh.types.BMElemSeq`\\ [:class:`bmesh.types.BMFace`]\n")
 blender::PyDoc_STRVAR (bpy_bmvert_link_loops_doc, "Loops that use this vertex (read-only).\n" "\n" ":type: :class:`bmesh.types.BMElemSeq`\\ [:class:`bmesh.types.BMLoop`]\n")
 blender::PyDoc_STRVAR (bpy_bmedge_verts_doc, "Verts this edge uses (always 2), (read-only).\n" "\n" ":type: :class:`bmesh.types.BMElemSeq`\\ [:class:`bmesh.types.BMVert`]\n")
 blender::PyDoc_STRVAR (bpy_bmedge_link_faces_doc, "Faces connected to this edge, (read-only).\n" "\n" ":type: :class:`bmesh.types.BMElemSeq`\\ [:class:`bmesh.types.BMFace`]\n")
 blender::PyDoc_STRVAR (bpy_bmedge_link_loops_doc, "Loops connected to this edge, (read-only).\n" "\n" ":type: :class:`bmesh.types.BMElemSeq`\\ [:class:`bmesh.types.BMLoop`]\n")
 blender::PyDoc_STRVAR (bpy_bmface_verts_doc, "Verts of this face, (read-only).\n" "\n" ":type: :class:`bmesh.types.BMElemSeq`\\ [:class:`bmesh.types.BMVert`]\n")
 blender::PyDoc_STRVAR (bpy_bmface_edges_doc, "Edges of this face, (read-only).\n" "\n" ":type: :class:`bmesh.types.BMElemSeq`\\ [:class:`bmesh.types.BMEdge`]\n")
 blender::PyDoc_STRVAR (bpy_bmface_loops_doc, "Loops of this face, (read-only).\n" "\n" ":type: :class:`bmesh.types.BMElemSeq`\\ [:class:`bmesh.types.BMLoop`]\n")
 blender::PyDoc_STRVAR (bpy_bmloops_link_loops_doc, "Loops connected to this loop, (read-only).\n" "\n" ":type: :class:`bmesh.types.BMElemSeq`\\ [:class:`bmesh.types.BMLoop`]\n")
static PyObject * blender::bpy_bmelemseq_elem_get (BPy_BMElem *self, void *itype)
 blender::PyDoc_STRVAR (bpy_bm_is_valid_doc, "True when this element is valid (hasn't been freed or removed).\n" "\n" ":type: bool\n")
static PyObject * blender::bpy_bm_is_valid_get (BPy_BMGeneric *self, void *)
 blender::PyDoc_STRVAR (bpy_bmesh_is_wrapped_doc, "True when this mesh is owned by blender (typically the editmode BMesh).\n" "\n" ":type: bool\n")
static PyObject * blender::bpy_bmesh_is_wrapped_get (BPy_BMesh *self, void *)
 blender::PyDoc_STRVAR (bpy_bmesh_select_mode_doc, "The selection mode, cannot be assigned an empty set.\n" "\n" ":type: set[Literal[" BPY_BM_HTYPE_NOLOOP "]]\n")
static PyObject * blender::bpy_bmesh_select_mode_get (BPy_BMesh *self, void *)
static int blender::bpy_bmesh_select_mode_set (BPy_BMesh *self, PyObject *value, void *)
 blender::PyDoc_STRVAR (bpy_bmesh_select_history_doc, "Sequence of selected items (the last is displayed as active).\n" "\n" ":type: " ":class:`bmesh.types.BMEditSelSeq`\n")
static PyObject * blender::bpy_bmesh_select_history_get (BPy_BMesh *self, void *)
static int blender::bpy_bmesh_select_history_set (BPy_BMesh *self, PyObject *value, void *)
 blender::PyDoc_STRVAR (bpy_bmesh_uv_select_sync_valid_doc, "When true, the UV selection has been synchronized. " "Setting to False means the UV selection will be ignored. " "While setting to true is supported it is up to the script author to " "ensure a correct selection state before doing so.\n" "\n" ":type: bool\n")
static PyObject * blender::bpy_bmesh_uv_select_sync_valid_get (BPy_BMesh *self, void *)
static int blender::bpy_bmesh_uv_select_sync_valid_set (BPy_BMesh *self, PyObject *value, void *)
 blender::PyDoc_STRVAR (bpy_bmvert_co_doc, "The coordinates for this vertex as a 3D, wrapped vector.\n" "\n" ":type: " ":class:`mathutils.Vector`\n")
static PyObject * blender::bpy_bmvert_co_get (BPy_BMVert *self, void *)
static int blender::bpy_bmvert_co_set (BPy_BMVert *self, PyObject *value, void *)
 blender::PyDoc_STRVAR (bpy_bmvert_normal_doc, "The normal for this vertex as a 3D, wrapped vector.\n" "\n" ":type: :class:`mathutils.Vector`\n")
static PyObject * blender::bpy_bmvert_normal_get (BPy_BMVert *self, void *)
static int blender::bpy_bmvert_normal_set (BPy_BMVert *self, PyObject *value, void *)
 blender::PyDoc_STRVAR (bpy_bmvert_is_manifold_doc, "True when this vertex is manifold (read-only).\n" "\n" ":type: bool\n")
static PyObject * blender::bpy_bmvert_is_manifold_get (BPy_BMVert *self, void *)
 blender::PyDoc_STRVAR (bpy_bmvert_is_wire_doc, "True when this vertex is not connected to any faces (read-only).\n" "\n" ":type: bool\n")
static PyObject * blender::bpy_bmvert_is_wire_get (BPy_BMVert *self, void *)
 blender::PyDoc_STRVAR (bpy_bmvert_is_boundary_doc, "True when this vertex is connected to boundary edges (read-only).\n" "\n" ":type: bool\n")
static PyObject * blender::bpy_bmvert_is_boundary_get (BPy_BMVert *self, void *)
 blender::PyDoc_STRVAR (bpy_bmedge_is_manifold_doc, "True when this edge is manifold (read-only).\n" "\n" ":type: bool\n")
static PyObject * blender::bpy_bmedge_is_manifold_get (BPy_BMEdge *self, void *)
 blender::PyDoc_STRVAR (bpy_bmedge_is_contiguous_doc, "True when this edge is manifold, between two faces with the same winding " "(read-only).\n" "\n" ":type: bool\n")
static PyObject * blender::bpy_bmedge_is_contiguous_get (BPy_BMEdge *self, void *)
 blender::PyDoc_STRVAR (bpy_bmedge_is_convex_doc, "True when this edge joins two convex faces, depends on a valid face normal (read-only).\n" "\n" ":type: bool\n")
static PyObject * blender::bpy_bmedge_is_convex_get (BPy_BMEdge *self, void *)
 blender::PyDoc_STRVAR (bpy_bmedge_is_wire_doc, "True when this edge is not connected to any faces (read-only).\n" "\n" ":type: bool\n")
static PyObject * blender::bpy_bmedge_is_wire_get (BPy_BMEdge *self, void *)
 blender::PyDoc_STRVAR (bpy_bmedge_is_boundary_doc, "True when this edge is at the boundary of a face (read-only).\n" "\n" ":type: bool\n")
static PyObject * blender::bpy_bmedge_is_boundary_get (BPy_BMEdge *self, void *)
 blender::PyDoc_STRVAR (bpy_bmface_normal_doc, "The normal for this face as a 3D, wrapped vector.\n" "\n" ":type: :class:`mathutils.Vector`\n")
static PyObject * blender::bpy_bmface_normal_get (BPy_BMFace *self, void *)
static int blender::bpy_bmface_normal_set (BPy_BMFace *self, PyObject *value, void *)
 blender::PyDoc_STRVAR (bpy_bmface_material_index_doc, "The face's material index.\n" "\n" ":type: int\n")
static PyObject * blender::bpy_bmface_material_index_get (BPy_BMFace *self, void *)
static int blender::bpy_bmface_material_index_set (BPy_BMFace *self, PyObject *value, void *)
 blender::PyDoc_STRVAR (bpy_bmloop_vert_doc, "The loop's vertex (read-only).\n" "\n" ":type: :class:`bmesh.types.BMVert`\n")
static PyObject * blender::bpy_bmloop_vert_get (BPy_BMLoop *self, void *)
 blender::PyDoc_STRVAR (bpy_bmloop_edge_doc, "The loop's edge (between this loop and the next), (read-only).\n" "\n" ":type: :class:`bmesh.types.BMEdge`\n")
static PyObject * blender::bpy_bmloop_edge_get (BPy_BMLoop *self, void *)
 blender::PyDoc_STRVAR (bpy_bmloop_face_doc, "The face this loop belongs to (read-only).\n" "\n" ":type: :class:`bmesh.types.BMFace`\n")
static PyObject * blender::bpy_bmloop_face_get (BPy_BMLoop *self, void *)
 blender::PyDoc_STRVAR (bpy_bmloop_link_loop_next_doc, "The next face corner (read-only).\n" "\n" ":type: :class:`bmesh.types.BMLoop`\n")
static PyObject * blender::bpy_bmloop_link_loop_next_get (BPy_BMLoop *self, void *)
 blender::PyDoc_STRVAR (bpy_bmloop_link_loop_prev_doc, "The previous face corner (read-only).\n" "\n" ":type: :class:`bmesh.types.BMLoop`\n")
static PyObject * blender::bpy_bmloop_link_loop_prev_get (BPy_BMLoop *self, void *)
 blender::PyDoc_STRVAR (bpy_bmloop_link_loop_radial_next_doc, "The next loop around the edge (read-only).\n" "\n" ":type: :class:`bmesh.types.BMLoop`\n")
static PyObject * blender::bpy_bmloop_link_loop_radial_next_get (BPy_BMLoop *self, void *)
 blender::PyDoc_STRVAR (bpy_bmloop_link_loop_radial_prev_doc, "The previous loop around the edge (read-only).\n" "\n" ":type: :class:`bmesh.types.BMLoop`\n")
static PyObject * blender::bpy_bmloop_link_loop_radial_prev_get (BPy_BMLoop *self, void *)
 blender::PyDoc_STRVAR (bpy_bmloop_is_convex_doc, "True when this loop is at the convex corner of a face, depends on a valid face " "normal (read-only).\n" "\n" ":type: bool\n")
static PyObject * blender::bpy_bmloop_is_convex_get (BPy_BMLoop *self, void *)
 blender::PyDoc_STRVAR (bpy_bmelemseq_layers_vert_doc, "custom-data layers (read-only).\n" "\n" ":type: :class:`bmesh.types.BMLayerAccessVert`\n")
 blender::PyDoc_STRVAR (bpy_bmelemseq_layers_edge_doc, "custom-data layers (read-only).\n" "\n" ":type: :class:`bmesh.types.BMLayerAccessEdge`\n")
 blender::PyDoc_STRVAR (bpy_bmelemseq_layers_face_doc, "custom-data layers (read-only).\n" "\n" ":type: :class:`bmesh.types.BMLayerAccessFace`\n")
 blender::PyDoc_STRVAR (bpy_bmelemseq_layers_loop_doc, "custom-data layers (read-only).\n" "\n" ":type: :class:`bmesh.types.BMLayerAccessLoop`\n")
static PyObject * blender::bpy_bmelemseq_layers_get (BPy_BMElemSeq *self, void *htype)
 blender::PyDoc_STRVAR (bpy_bmfaceseq_active_doc, "active face.\n" "\n" ":type: :class:`bmesh.types.BMFace` | None\n")
static PyObject * blender::bpy_bmfaceseq_active_get (BPy_BMElemSeq *self, void *)
static int blender::bpy_bmfaceseq_active_set (BPy_BMElem *self, PyObject *value, void *)
 blender::PyDoc_STRVAR (bpy_bmesh_copy_doc, ".. method:: copy()\n" "\n" " :return: A copy of this BMesh.\n" " :rtype: :class:`bmesh.types.BMesh`\n")
static PyObject * blender::bpy_bmesh_copy (BPy_BMesh *self)
 blender::PyDoc_STRVAR (bpy_bmesh_clear_doc, ".. method:: clear()\n" "\n" " Clear all mesh data.\n")
static PyObject * blender::bpy_bmesh_clear (BPy_BMesh *self)
 blender::PyDoc_STRVAR (bpy_bmesh_free_doc, ".. method:: free()\n" "\n" " Explicitly free the BMesh data from memory, causing exceptions on further access.\n" "\n" " .. note::\n" "\n" " The BMesh is freed automatically, typically when the script finishes executing.\n" " However in some cases it's hard to predict when this will be and it's useful to\n" " explicitly free the data.\n")
static PyObject * blender::bpy_bmesh_free (BPy_BMesh *self)
 blender::PyDoc_STRVAR (bpy_bmesh_to_mesh_doc, ".. method:: to_mesh(mesh)\n" "\n" " Writes this BMesh data into an existing Mesh data-block.\n" "\n" " :param mesh: The mesh data to write into.\n" " :type mesh: :class:`bpy.types.Mesh`\n")
static PyObject * blender::bpy_bmesh_to_mesh (BPy_BMesh *self, PyObject *args)
 blender::PyDoc_STRVAR (bpy_bmesh_from_object_doc, ".. method:: from_object(object, depsgraph, *, " "cage=False, face_normals=True, vertex_normals=True)\n" "\n" " Initialize this bmesh from existing object data-block (only meshes are currently " "supported).\n" "\n" " :param object: The object data to load.\n" " :type object: :class:`bpy.types.Object`\n" " :param depsgraph: The dependency graph for evaluated data.\n" " :type depsgraph: :class:`bpy.types.Depsgraph`\n" " :param cage: Get the mesh as a deformed cage.\n" " :type cage: bool\n" " :param face_normals: Calculate face normals.\n" " :type face_normals: bool\n" " :param vertex_normals: Calculate vertex normals.\n" " :type vertex_normals: bool\n")
static PyObject * blender::bpy_bmesh_from_object (BPy_BMesh *self, PyObject *args, PyObject *kw)
 blender::PyDoc_STRVAR (bpy_bmesh_from_mesh_doc, ".. method:: from_mesh(mesh, *, " "face_normals=True, vertex_normals=True, use_shape_key=False, shape_key_index=0)\n" "\n" " Initialize this bmesh from existing mesh data-block.\n" "\n" " :param mesh: The mesh data to load.\n" " :type mesh: :class:`bpy.types.Mesh`\n" " :param face_normals: Calculate face normals.\n" " :type face_normals: bool\n" " :param vertex_normals: Calculate vertex normals.\n" " :type vertex_normals: bool\n" " :param use_shape_key: Use the locations from a shape key.\n" " :type use_shape_key: bool\n" " :param shape_key_index: The shape key index to use.\n" " :type shape_key_index: int\n" "\n" " .. note::\n" "\n" " Multiple calls can be used to join multiple meshes.\n" "\n" " Custom-data layers are only copied from ``mesh`` on initialization.\n" " Further calls will copy custom-data to matching layers, layers missing on the target " "mesh won't be added.\n")
static PyObject * blender::bpy_bmesh_from_mesh (BPy_BMesh *self, PyObject *args, PyObject *kw)
 blender::PyDoc_STRVAR (bpy_bmesh_select_flush_mode_doc, ".. method:: select_flush_mode(*, flush_down=False)\n" "\n" " Flush selection based on the current mode " ":attr:`bmesh.types.BMesh.select_mode`.\n" "\n" " :param flush_down: Flush selection down from faces to edges & verts " "or from edges to verts. " "This option is ignored when vertex selection mode is enabled.\n" " :type flush_down: bool\n")
static PyObject * blender::bpy_bmesh_select_flush_mode (BPy_BMesh *self, PyObject *args, PyObject *kw)
 blender::PyDoc_STRVAR (bpy_bmesh_select_flush_doc, ".. method:: select_flush(select)\n" "\n" " Flush selection from vertices, independent of the current selection mode.\n" "\n" " :param select: flush selection or de-selected elements.\n" " :type select: bool\n")
static PyObject * blender::bpy_bmesh_select_flush (BPy_BMesh *self, PyObject *value)
 blender::PyDoc_STRVAR (bpy_bmesh_normal_update_doc, ".. method:: normal_update()\n" "\n" " Update normals of mesh faces and verts.\n" "\n" " .. note::\n" "\n" " The normal of any vertex where :attr:`is_wire` is True will be a zero vector.\n")
static PyObject * blender::bpy_bmesh_normal_update (BPy_BMesh *self)
 blender::PyDoc_STRVAR (bpy_bmesh_transform_doc, ".. method:: transform(matrix, *, filter=None)\n" "\n" " Transform the mesh (optionally filtering flagged data only).\n" "\n" " :param matrix: 4x4 transform matrix.\n" " :type matrix: :class:`mathutils.Matrix`\n" " :param filter: Flag to filter vertices.\n" " :type filter: set[Literal[" BPY_BM_HFLAG_ALL_STR "]] | None\n")
static PyObject * blender::bpy_bmesh_transform (BPy_BMElem *self, PyObject *args, PyObject *kw)
 blender::PyDoc_STRVAR (bpy_bmesh_calc_volume_doc, ".. method:: calc_volume(*, signed=False)\n" "\n" " Calculate mesh volume based on face normals.\n" "\n" " :param signed: when signed is true, negative values may be returned.\n" " :type signed: bool\n" " :return: The volume of the mesh.\n" " :rtype: float\n")
static PyObject * blender::bpy_bmesh_calc_volume (BPy_BMElem *self, PyObject *args, PyObject *kw)
 blender::PyDoc_STRVAR (bpy_bmesh_calc_loop_triangles_doc, ".. method:: calc_loop_triangles()\n" "\n" " Calculate triangle tessellation from quads/ngons.\n" "\n" " :return: The triangulated faces.\n" " :rtype: list[tuple[:class:`bmesh.types.BMLoop`, " ":class:`bmesh.types.BMLoop`, " ":class:`bmesh.types.BMLoop`]]\n")
static PyObject * blender::bpy_bmesh_calc_loop_triangles (BPy_BMElem *self)
 blender::PyDoc_STRVAR (bpy_bm_elem_select_set_doc, ".. method:: select_set(select)\n" "\n" " Set the selection.\n" " This is different from the *select* attribute because it updates the selection " "state of associated geometry.\n" "\n" " :param select: Select or de-select.\n" " :type select: bool\n" "\n" " .. note::\n" "\n" " This flushes selection down (e.g. selecting a face also selects its edges and " "vertices), but not up (e.g. de-selecting a vertex won't de-select faces that use it). " "Before finishing with a mesh, flushing is typically still needed.\n")
static PyObject * blender::bpy_bm_elem_select_set (BPy_BMElem *self, PyObject *value)
 blender::PyDoc_STRVAR (bpy_bm_elem_hide_set_doc, ".. method:: hide_set(hide)\n" "\n" " Set the hide state.\n" " This is different from the *hide* attribute because it updates the selection and " "hide state of associated geometry.\n" "\n" " :param hide: Hidden or visible.\n" " :type hide: bool\n")
static PyObject * blender::bpy_bm_elem_hide_set (BPy_BMElem *self, PyObject *value)
 blender::PyDoc_STRVAR (bpy_bm_elem_copy_from_doc, ".. method:: copy_from(other)\n" "\n" " Copy values from another element of matching type.\n" "\n" " :param other: Another element of the same type to copy from.\n" " :type other: Self\n")
static PyObject * blender::bpy_bm_elem_copy_from (BPy_BMElem *self, BPy_BMElem *value)
 blender::PyDoc_STRVAR (bpy_bmvert_copy_from_vert_interp_doc, ".. method:: copy_from_vert_interp(vert_pair, fac)\n" "\n" " Interpolate the customdata from a vert between 2 other verts.\n" "\n" " :param vert_pair: The verts between which to interpolate data from.\n" " :type vert_pair: Sequence[:class:`bmesh.types.BMVert`]\n" " :param fac: The interpolation factor.\n" " :type fac: float\n")
static PyObject * blender::bpy_bmvert_copy_from_vert_interp (BPy_BMVert *self, PyObject *args)
 blender::PyDoc_STRVAR (bpy_bmvert_copy_from_face_interp_doc, ".. method:: copy_from_face_interp(face)\n" "\n" " Interpolate the customdata from a face onto this vert (the vert should " "overlap the face).\n" "\n" " :param face: The face to interpolate data from.\n" " :type face: :class:`bmesh.types.BMFace`\n")
static PyObject * blender::bpy_bmvert_copy_from_face_interp (BPy_BMVert *self, PyObject *args)
 blender::PyDoc_STRVAR (bpy_bmvert_calc_edge_angle_doc, ".. method:: calc_edge_angle(fallback=None)\n" "\n" " Return the angle between this vert's two connected edges.\n" "\n" " :param fallback: return this when the vert doesn't have 2 edges\n" " (instead of raising a :exc:`ValueError`).\n" " :type fallback: Any\n" " :return: Angle between edges in radians.\n" " :rtype: float\n")
static PyObject * blender::bpy_bmvert_calc_edge_angle (BPy_BMVert *self, PyObject *args)
 blender::PyDoc_STRVAR (bpy_bmvert_calc_shell_factor_doc, ".. method:: calc_shell_factor()\n" "\n" " Return a multiplier calculated based on the sharpness of the vertex.\n" " Where a flat surface gives 1.0, and higher values sharper edges.\n" " This is used to maintain shell thickness when offsetting verts along their normals.\n" "\n" " :return: offset multiplier\n" " :rtype: float\n")
static PyObject * blender::bpy_bmvert_calc_shell_factor (BPy_BMVert *self)
 blender::PyDoc_STRVAR (bpy_bmvert_normal_update_doc, ".. method:: normal_update()\n" "\n" " Update vertex normal.\n" " This does not update the normals of adjoining faces.\n" "\n" " .. note::\n" "\n" " The vertex normal will be a zero vector if vertex :attr:`is_wire` is True.\n")
static PyObject * blender::bpy_bmvert_normal_update (BPy_BMVert *self)
 blender::PyDoc_STRVAR (bpy_bmedge_calc_length_doc, ".. method:: calc_length()\n" "\n" " Return the length of the edge.\n" "\n" " :return: The length between both verts.\n" " :rtype: float\n")
static PyObject * blender::bpy_bmedge_calc_length (BPy_BMEdge *self)
 blender::PyDoc_STRVAR (bpy_bmedge_calc_face_angle_doc, ".. method:: calc_face_angle(fallback=None)\n" "\n" " Return the angle between this edge's two connected faces.\n" "\n" " :param fallback: return this when the edge doesn't have 2 faces\n" " (instead of raising a :exc:`ValueError`).\n" " :type fallback: Any\n" " :return: The angle between 2 connected faces in radians.\n" " :rtype: float\n")
static PyObject * blender::bpy_bmedge_calc_face_angle (BPy_BMEdge *self, PyObject *args)
 blender::PyDoc_STRVAR (bpy_bmedge_calc_face_angle_signed_doc, ".. method:: calc_face_angle_signed(fallback=None)\n" "\n" " Return the signed angle between this edge's two connected faces.\n" "\n" " :param fallback: return this when the edge doesn't have 2 faces\n" " (instead of raising a :exc:`ValueError`).\n" " :type fallback: Any\n" " :return: The angle between 2 connected faces in radians (negative for concave join).\n" " :rtype: float\n")
static PyObject * blender::bpy_bmedge_calc_face_angle_signed (BPy_BMEdge *self, PyObject *args)
 blender::PyDoc_STRVAR (bpy_bmedge_calc_tangent_doc, ".. method:: calc_tangent(loop)\n" "\n" " Return the tangent at this edge relative to a face (pointing inward into the face).\n" " This uses the face normal for calculation.\n" "\n" " :param loop: The loop used for tangent calculation.\n" " :type loop: :class:`bmesh.types.BMLoop`\n" " :return: a normalized vector.\n" " :rtype: :class:`mathutils.Vector`\n")
static PyObject * blender::bpy_bmedge_calc_tangent (BPy_BMEdge *self, PyObject *args)
 blender::PyDoc_STRVAR (bpy_bmedge_other_vert_doc, ".. method:: other_vert(vert)\n" "\n" " Return the other vertex on this edge or None if the vertex is not used by this edge.\n" "\n" " :param vert: a vert in this edge.\n" " :type vert: :class:`bmesh.types.BMVert`\n" " :return: The edge's other vert.\n" " :rtype: :class:`bmesh.types.BMVert` | None\n")
static PyObject * blender::bpy_bmedge_other_vert (BPy_BMEdge *self, BPy_BMVert *value)
 blender::PyDoc_STRVAR (bpy_bmedge_normal_update_doc, ".. method:: normal_update()\n" "\n" " Update normals of all connected faces and the edge verts.\n" "\n" " .. note::\n" "\n" " The normal of edge vertex will be a zero vector if vertex :attr:`is_wire` is True.\n")
static PyObject * blender::bpy_bmedge_normal_update (BPy_BMEdge *self)
 blender::PyDoc_STRVAR (bpy_bmface_copy_from_face_interp_doc, ".. method:: copy_from_face_interp(face, vert=True)\n" "\n" " Interpolate the customdata from another face onto this one (faces should overlap).\n" "\n" " :param face: The face to interpolate data from.\n" " :type face: :class:`bmesh.types.BMFace`\n" " :param vert: When True, also copy vertex data.\n" " :type vert: bool\n")
static PyObject * blender::bpy_bmface_copy_from_face_interp (BPy_BMFace *self, PyObject *args)
 blender::PyDoc_STRVAR (bpy_bmface_copy_doc, ".. method:: copy(*, verts=True, edges=True)\n" "\n" " Make a copy of this face.\n" "\n" " :param verts: When set, the faces verts will be duplicated too.\n" " :type verts: bool\n" " :param edges: When set, the faces edges will be duplicated too.\n" " :type edges: bool\n" " :return: The newly created face.\n" " :rtype: :class:`bmesh.types.BMFace`\n")
static PyObject * blender::bpy_bmface_copy (BPy_BMFace *self, PyObject *args, PyObject *kw)
 blender::PyDoc_STRVAR (bpy_bmface_uv_select_set_doc, ".. method:: uv_select_set(select)\n" "\n" " Set the UV face selection state.\n" "\n" " :param select: Select or de-select.\n" " :type select: bool\n" "\n" " .. note::\n" "\n" " This flushes selection down (selecting a face also selects its edges and " "vertices), but not up. Before finishing with a mesh, " "flushing with :meth:`bmesh.types.BMesh.uv_select_flush_mode` is still needed.\n")
static PyObject * blender::bpy_bmface_uv_select_set (BPy_BMFace *self, PyObject *value)
 blender::PyDoc_STRVAR (bpy_bmface_calc_area_doc, ".. method:: calc_area()\n" "\n" " Return the area of the face.\n" "\n" " :return: The area of the face.\n" " :rtype: float\n")
static PyObject * blender::bpy_bmface_calc_area (BPy_BMFace *self)
 blender::PyDoc_STRVAR (bpy_bmface_calc_perimeter_doc, ".. method:: calc_perimeter()\n" "\n" " Return the perimeter of the face.\n" "\n" " :return: The perimeter of the face.\n" " :rtype: float\n")
static PyObject * blender::bpy_bmface_calc_perimeter (BPy_BMFace *self)
 blender::PyDoc_STRVAR (bpy_bmface_calc_tangent_edge_doc, ".. method:: calc_tangent_edge()\n" "\n" " Return face tangent based on longest edge.\n" "\n" " :return: a normalized vector.\n" " :rtype: :class:`mathutils.Vector`\n")
static PyObject * blender::bpy_bmface_calc_tangent_edge (BPy_BMFace *self)
 blender::PyDoc_STRVAR (bpy_bmface_calc_tangent_edge_pair_doc, ".. method:: calc_tangent_edge_pair()\n" "\n" " Return face tangent based on the two longest disconnected edges.\n" "\n" " - Tris: Use the edge pair with the most similar lengths.\n" " - Quads: Use the longest edge pair.\n" " - NGons: Use the two longest disconnected edges.\n" "\n" " :return: a normalized vector.\n" " :rtype: :class:`mathutils.Vector`\n")
static PyObject * blender::bpy_bmface_calc_tangent_edge_pair (BPy_BMFace *self)
 blender::PyDoc_STRVAR (bpy_bmface_calc_tangent_edge_diagonal_doc, ".. method:: calc_tangent_edge_diagonal()\n" "\n" " Return face tangent based on the edge farthest from any vertex.\n" "\n" " :return: a normalized vector.\n" " :rtype: :class:`mathutils.Vector`\n")
static PyObject * blender::bpy_bmface_calc_tangent_edge_diagonal (BPy_BMFace *self)
 blender::PyDoc_STRVAR (bpy_bmface_calc_tangent_vert_diagonal_doc, ".. method:: calc_tangent_vert_diagonal()\n" "\n" " Return face tangent based on the two most distant vertices.\n" "\n" " :return: a normalized vector.\n" " :rtype: :class:`mathutils.Vector`\n")
static PyObject * blender::bpy_bmface_calc_tangent_vert_diagonal (BPy_BMFace *self)
 blender::PyDoc_STRVAR (bpy_bmface_calc_center_median_doc, ".. method:: calc_center_median()\n" "\n" " Return median center of the face.\n" "\n" " :return: a 3D vector.\n" " :rtype: :class:`mathutils.Vector`\n")
static PyObject * blender::bpy_bmface_calc_center_mean (BPy_BMFace *self)
 blender::PyDoc_STRVAR (bpy_bmface_calc_center_median_weighted_doc, ".. method:: calc_center_median_weighted()\n" "\n" " Return median center of the face weighted by edge lengths.\n" "\n" " :return: a 3D vector.\n" " :rtype: :class:`mathutils.Vector`\n")
static PyObject * blender::bpy_bmface_calc_center_median_weighted (BPy_BMFace *self)
 blender::PyDoc_STRVAR (bpy_bmface_calc_center_bounds_doc, ".. method:: calc_center_bounds()\n" "\n" " Return bounds center of the face.\n" "\n" " :return: a 3D vector.\n" " :rtype: :class:`mathutils.Vector`\n")
static PyObject * blender::bpy_bmface_calc_center_bounds (BPy_BMFace *self)
 blender::PyDoc_STRVAR (bpy_bmface_normal_update_doc, ".. method:: normal_update()\n" "\n" " Update face normal based on the positions of the face verts.\n" " This does not update the normals of face verts.\n")
static PyObject * blender::bpy_bmface_normal_update (BPy_BMFace *self)
 blender::PyDoc_STRVAR (bpy_bmface_normal_flip_doc, ".. method:: normal_flip()\n" "\n" " Reverses winding of a face, which flips its normal.\n")
static PyObject * blender::bpy_bmface_normal_flip (BPy_BMFace *self)
 blender::PyDoc_STRVAR (bpy_bmloop_copy_from_face_interp_doc, ".. method:: copy_from_face_interp(face, vert=True, multires=True)\n" "\n" " Interpolate the customdata from a face onto this loop (the loop's vert should " "overlap the face).\n" "\n" " :param face: The face to interpolate data from.\n" " :type face: :class:`bmesh.types.BMFace`\n" " :param vert: When enabled, interpolate the loop's vertex data (optional).\n" " :type vert: bool\n" " :param multires: When enabled, interpolate the loop's multires data (optional).\n" " :type multires: bool\n")
static PyObject * blender::bpy_bmloop_copy_from_face_interp (BPy_BMLoop *self, PyObject *args)
 blender::PyDoc_STRVAR (bpy_bmloop_uv_select_vert_set_doc, ".. method:: uv_select_vert_set(select)\n" "\n" " Set the UV vertex selection state.\n" "\n" " :param select: Select or de-select.\n" " :type select: bool\n" "\n" " .. note::\n" "\n" " This does not flush selection, so selecting a vertex won't " "select the edges & faces that use it. Before finishing with a mesh, " "flushing with :meth:`bmesh.types.BMesh.uv_select_flush_mode` is still needed.\n")
static PyObject * blender::bpy_bmloop_uv_select_vert_set (BPy_BMLoop *self, PyObject *value)
 blender::PyDoc_STRVAR (bpy_bmloop_uv_select_edge_set_doc, ".. method:: uv_select_edge_set(select)\n" "\n" " Set the UV edge selection state.\n" "\n" " :param select: Select or de-select.\n" " :type select: bool\n" "\n" " .. note::\n" "\n" " This flushes selection down (selecting an edge also selects its " "vertices), but not up (de-selecting a vertex won't de-select the edges & faces " "that use it). Before finishing with a mesh, " "flushing with :meth:`bmesh.types.BMesh.uv_select_flush_mode` is still needed.\n")
static PyObject * blender::bpy_bmloop_uv_select_edge_set (BPy_BMLoop *self, PyObject *value)
 blender::PyDoc_STRVAR (bpy_bmloop_calc_angle_doc, ".. method:: calc_angle()\n" "\n" " Return the angle at this loops corner of the face.\n" " This is calculated so sharper corners give lower angles.\n" "\n" " :return: The angle in radians.\n" " :rtype: float\n")
static PyObject * blender::bpy_bmloop_calc_angle (BPy_BMLoop *self)
 blender::PyDoc_STRVAR (bpy_bmloop_calc_normal_doc, ".. method:: calc_normal()\n" "\n" " Return normal at this loops corner of the face.\n" " Falls back to the face normal for straight lines.\n" "\n" " :return: a normalized vector.\n" " :rtype: :class:`mathutils.Vector`\n")
static PyObject * blender::bpy_bmloop_calc_normal (BPy_BMLoop *self)
 blender::PyDoc_STRVAR (bpy_bmloop_calc_tangent_doc, ".. method:: calc_tangent()\n" "\n" " Return the tangent at this loops corner of the face (pointing inward into the face).\n" " Falls back to the face normal for straight lines.\n" "\n" " :return: a normalized vector.\n" " :rtype: :class:`mathutils.Vector`\n")
static PyObject * blender::bpy_bmloop_calc_tangent (BPy_BMLoop *self)
 blender::PyDoc_STRVAR (bpy_bmvertseq_new_doc, ".. method:: new(co=(0.0, 0.0, 0.0), source=None)\n" "\n" " Create a new vertex.\n" "\n" " :param co: The initial location of the vertex (optional argument).\n" " :type co: tuple[float, float, float] | Sequence[float]\n" " :param source: Existing vert to initialize settings.\n" " :type source: :class:`bmesh.types.BMVert` | None\n" " :return: The newly created vertex.\n" " :rtype: :class:`bmesh.types.BMVert`\n")
static PyObject * blender::bpy_bmvertseq_new (BPy_BMElemSeq *self, PyObject *args, PyObject *kw)
 blender::PyDoc_STRVAR (bpy_bmedgeseq_new_doc, ".. method:: new(verts, source=None)\n" "\n" " Create a new edge from a given pair of verts.\n" "\n" " :param verts: Vertex pair.\n" " :type verts: Sequence[:class:`bmesh.types.BMVert`]\n" " :param source: Existing edge to initialize settings (optional argument).\n" " :type source: :class:`bmesh.types.BMEdge` | None\n" " :return: The newly created edge.\n" " :rtype: :class:`bmesh.types.BMEdge`\n")
static PyObject * blender::bpy_bmedgeseq_new (BPy_BMElemSeq *self, PyObject *args, PyObject *kw)
 blender::PyDoc_STRVAR (bpy_bmfaceseq_new_doc, ".. method:: new(verts, source=None)\n" "\n" " Create a new face from a given set of verts.\n" "\n" " :param verts: Sequence of 3 or more verts.\n" " :type verts: Sequence[:class:`bmesh.types.BMVert`]\n" " :param source: Existing face to initialize settings (optional argument).\n" " :type source: :class:`bmesh.types.BMFace` | None\n" " :return: The newly created face.\n" " :rtype: :class:`bmesh.types.BMFace`\n")
static PyObject * blender::bpy_bmfaceseq_new (BPy_BMElemSeq *self, PyObject *args, PyObject *kw)
 blender::PyDoc_STRVAR (bpy_bmvertseq_remove_doc, ".. method:: remove(vert)\n" "\n" " Remove a vert.\n" "\n" " :param vert: The vert to remove.\n" " :type vert: :class:`bmesh.types.BMVert`\n")
static PyObject * blender::bpy_bmvertseq_remove (BPy_BMElemSeq *self, BPy_BMVert *value)
 blender::PyDoc_STRVAR (bpy_bmedgeseq_remove_doc, ".. method:: remove(edge)\n" "\n" " Remove an edge.\n" "\n" " :param edge: The edge to remove.\n" " :type edge: :class:`bmesh.types.BMEdge`\n")
static PyObject * blender::bpy_bmedgeseq_remove (BPy_BMElemSeq *self, BPy_BMEdge *value)
 blender::PyDoc_STRVAR (bpy_bmfaceseq_remove_doc, ".. method:: remove(face)\n" "\n" " Remove a face.\n" "\n" " :param face: The face to remove.\n" " :type face: :class:`bmesh.types.BMFace`\n")
static PyObject * blender::bpy_bmfaceseq_remove (BPy_BMElemSeq *self, BPy_BMFace *value)
 blender::PyDoc_STRVAR (bpy_bmedgeseq_get__method_doc, ".. method:: get(verts, fallback=None)\n" "\n" " Return an edge which uses the **verts** passed.\n" "\n" " :param verts: Pair of verts (exactly 2).\n" " :type verts: Sequence[:class:`bmesh.types.BMVert`]\n" " :param fallback: Return this value if nothing is found.\n" " :type fallback: Any\n" " :return: The edge found or the fallback value.\n" " :rtype: :class:`bmesh.types.BMEdge` | None\n")
static PyObject * blender::bpy_bmedgeseq_get__method (BPy_BMElemSeq *self, PyObject *args)
 blender::PyDoc_STRVAR (bpy_bmfaceseq_get__method_doc, ".. method:: get(verts, fallback=None)\n" "\n" " Return a face which uses the **verts** passed.\n" "\n" " :param verts: Sequence of verts.\n" " :type verts: Sequence[:class:`bmesh.types.BMVert`]\n" " :param fallback: Return this value if nothing is found.\n" " :type fallback: Any\n" " :return: The face found or the fallback value.\n" " :rtype: :class:`bmesh.types.BMFace` | None\n")
static PyObject * blender::bpy_bmfaceseq_get__method (BPy_BMElemSeq *self, PyObject *args)
 blender::PyDoc_STRVAR (bpy_bmelemseq_index_update_doc, ".. method:: index_update()\n" "\n" " Initialize the index values of this sequence.\n" "\n" " This is the equivalent of looping over all elements and assigning the index values.\n" "\n" " .. code-block:: python\n" "\n" " for index, ele in enumerate(sequence):\n" " ele.index = index\n" "\n" " .. note::\n" "\n" " Running this on sequences besides " ":class:`bmesh.types.BMesh.verts`, " ":class:`bmesh.types.BMesh.edges`, " ":class:`bmesh.types.BMesh.faces`\n" " works but won't result in each element having a valid index, instead its order in the " "sequence will be set.\n")
static PyObject * blender::bpy_bmelemseq_index_update (BPy_BMElemSeq *self)
 blender::PyDoc_STRVAR (bpy_bmelemseq_ensure_lookup_table_doc, ".. method:: ensure_lookup_table()\n" "\n" " Ensure internal data needed for int subscript access is initialized with " "verts/edges/faces, eg ``bm.verts[index]``.\n" "\n" " This needs to be called again after adding/removing data in this sequence.\n")
static PyObject * blender::bpy_bmelemseq_ensure_lookup_table (BPy_BMElemSeq *self)
 blender::PyDoc_STRVAR (bpy_bmelemseq_sort_doc, ".. method:: sort(*, key=None, reverse=False)\n" "\n" " Sort the elements of this sequence, using an optional custom sort key.\n" " Indices of elements are not changed, :meth:`bmesh.types.BMElemSeq.index_update` " "can be used for that.\n" "\n" " :param key: The key that sets the ordering of the elements.\n" " :type key: Callable[[" ":class:`bmesh.types.BMVert` | " ":class:`bmesh.types.BMEdge` | " ":class:`bmesh.types.BMFace`], int] | None\n" " :param reverse: Reverse the order of the elements\n" " :type reverse: bool\n" "\n" " .. note::\n" "\n" " When the 'key' argument is not provided, the elements are reordered following their " "current index value.\n" " In particular this can be used by setting indices manually before calling this " "method.\n" "\n" " .. warning::\n" "\n" " Existing references to the N'th element, will continue to point the data at that " "index.\n")
static int blender::bpy_bmelemseq_sort_cmp_by_keys_ascending (const void *index1_v, const void *index2_v, void *keys_v)
static int blender::bpy_bmelemseq_sort_cmp_by_keys_descending (const void *index1_v, const void *index2_v, void *keys_v)
static PyObject * blender::bpy_bmelemseq_sort (BPy_BMElemSeq *self, PyObject *args, PyObject *kw)
static PyTypeObject * blender::bpy_bm_itype_as_pytype (const char itype)
static Py_ssize_t blender::bpy_bmelemseq_length (BPy_BMElemSeq *self)
static PyObject * blender::bpy_bmelemseq_subscript_int (BPy_BMElemSeq *self, Py_ssize_t keynum)
static PyObject * blender::bpy_bmelemseq_subscript_slice (BPy_BMElemSeq *self, Py_ssize_t start, Py_ssize_t stop)
static PyObject * blender::bpy_bmelemseq_subscript (BPy_BMElemSeq *self, PyObject *key)
static int blender::bpy_bmelemseq_contains (BPy_BMElemSeq *self, PyObject *value)
static PyObject * blender::bpy_bmelem_subscript (BPy_BMElem *self, BPy_BMLayerItem *key)
static int blender::bpy_bmelem_ass_subscript (BPy_BMElem *self, BPy_BMLayerItem *key, PyObject *value)
static PyObject * blender::bpy_bmelemseq_iter (BPy_BMElemSeq *self)
static PyObject * blender::bpy_bmiter_next (BPy_BMIter *self)
static void blender::bpy_bmesh_dealloc (BPy_BMesh *self)
static void blender::bpy_bmvert_dealloc (BPy_BMElem *self)
static void blender::bpy_bmedge_dealloc (BPy_BMElem *self)
static void blender::bpy_bmface_dealloc (BPy_BMElem *self)
static void blender::bpy_bmloop_dealloc (BPy_BMElem *self)
static void blender::bpy_bmelemseq_dealloc (BPy_BMElemSeq *self)
static Py_hash_t blender::bpy_bm_elem_hash (PyObject *self)
static Py_hash_t blender::bpy_bm_hash (PyObject *self)
 blender::PyDoc_STRVAR (bpy_bmesh_doc, "The BMesh data structure\n")
 blender::PyDoc_STRVAR (bpy_bmvert_doc, "The BMesh vertex type\n")
 blender::PyDoc_STRVAR (bpy_bmedge_doc, "The BMesh edge connecting 2 verts\n")
 blender::PyDoc_STRVAR (bpy_bmface_doc, "The BMesh face with 3 or more sides\n")
 blender::PyDoc_STRVAR (bpy_bmloop_doc, "This is normally accessed from :class:`bmesh.types.BMFace.loops` where each face loop " "represents a corner of the face.\n")
 blender::PyDoc_STRVAR (bpy_bmelemseq_doc, "General sequence type used for accessing any sequence of\n" ":class:`bmesh.types.BMVert`, " ":class:`bmesh.types.BMEdge`, " ":class:`bmesh.types.BMFace`, " ":class:`bmesh.types.BMLoop`.\n" "\n" "When accessed via " ":class:`bmesh.types.BMesh.verts`, " ":class:`bmesh.types.BMesh.edges`, " ":class:`bmesh.types.BMesh.faces`\n" "there are also functions to create/remove items.\n")
 blender::PyDoc_STRVAR (bpy_bmiter_doc, "Internal BMesh type for looping over verts/faces/edges,\n" "used for iterating over :class:`bmesh.types.BMElemSeq` types.\n")
static PyObject * blender::bpy_bmesh_repr (BPy_BMesh *self)
static PyObject * blender::bpy_bmvert_repr (BPy_BMVert *self)
static PyObject * blender::bpy_bmedge_repr (BPy_BMEdge *self)
static PyObject * blender::bpy_bmface_repr (BPy_BMFace *self)
static PyObject * blender::bpy_bmloop_repr (BPy_BMLoop *self)
void blender::BPy_BM_init_types ()
 blender::PyDoc_STRVAR (BPy_BM_types_module_doc, "\n" ".. |UV_STICKY_SELECT_MODE_REF| replace:: " "(:class:`bpy.types.ToolSettings.uv_sticky_select_mode` which may be passed in directly).\n" "\n" ".. |UV_STICKY_SELECT_MODE_TYPE| replace:: " "Literal['SHARED_LOCATION', 'DISABLED', 'SHARED_VERTEX']\n" "\n" ".. |UV_SELECT_FLUSH_MODE_NEEDED| replace:: " "This function is selection-mode independent, " "typically :meth:`bmesh.types.BMesh.uv_select_flush_mode` should be called afterwards.\n" "\n" ".. |UV_SELECT_SYNC_TO_MESH_NEEDED| replace:: " "This function doesn't flush the selection to the mesh, " "typically :meth:`bmesh.types.BMesh.uv_select_sync_to_mesh` should be called afterwards.\n")
PyObject * blender::BPyInit_bmesh_types ()
PyObject * blender::BPy_BMesh_CreatePyObject (BMesh *bm, int flag)
PyObject * blender::BPy_BMVert_CreatePyObject (BMesh *bm, BMVert *v)
PyObject * blender::BPy_BMEdge_CreatePyObject (BMesh *bm, BMEdge *e)
PyObject * blender::BPy_BMFace_CreatePyObject (BMesh *bm, BMFace *f)
PyObject * blender::BPy_BMLoop_CreatePyObject (BMesh *bm, BMLoop *l)
PyObject * blender::BPy_BMElemSeq_CreatePyObject (BMesh *bm, BPy_BMElem *py_ele, const char itype)
PyObject * blender::BPy_BMVertSeq_CreatePyObject (BMesh *bm)
PyObject * blender::BPy_BMEdgeSeq_CreatePyObject (BMesh *bm)
PyObject * blender::BPy_BMFaceSeq_CreatePyObject (BMesh *bm)
PyObject * blender::BPy_BMLoopSeq_CreatePyObject (BMesh *bm)
PyObject * blender::BPy_BMIter_CreatePyObject (BMesh *bm)
PyObject * blender::BPy_BMElem_CreatePyObject (BMesh *bm, BMHeader *ele)
int blender::bpy_bm_generic_valid_check (BPy_BMGeneric *self)
int blender::bpy_bm_generic_valid_check_source (BMesh *bm_source, const char *error_prefix, void **args, uint args_tot)
int blender::bpy_bm_check_uv_select_sync_valid (BMesh *bm, const char *error_prefix)
int blender::bpy_bm_uv_layer_offset_or_error (BMesh *bm, const char *error_prefix)
int blender::bpy_bm_check_bm_match_or_error (BMesh *bm_a, BMesh *bm_b, const char *error_prefix)
void * blender::BPy_BMElem_PySeq_As_Array_FAST (BMesh **r_bm, PyObject *seq_fast, Py_ssize_t min, Py_ssize_t max, Py_ssize_t *r_seq_num, const char htype, const bool do_unique_check, const bool do_bm_check, const char *error_prefix)
void * blender::BPy_BMElem_PySeq_As_Array (BMesh **r_bm, PyObject *seq, Py_ssize_t min, Py_ssize_t max, Py_ssize_t *r_seq_num, const char htype, const bool do_unique_check, const bool do_bm_check, const char *error_prefix)
BMVert ** blender::BPy_BMVert_PySeq_As_Array (BMesh **r_bm, PyObject *seq, Py_ssize_t min, Py_ssize_t max, Py_ssize_t *r_seq_num, bool do_unique_check, bool do_bm_check, const char *error_prefix)
BMEdge ** blender::BPy_BMEdge_PySeq_As_Array (BMesh **r_bm, PyObject *seq, Py_ssize_t min, Py_ssize_t max, Py_ssize_t *r_seq_num, bool do_unique_check, bool do_bm_check, const char *error_prefix)
BMFace ** blender::BPy_BMFace_PySeq_As_Array (BMesh **r_bm, PyObject *seq, Py_ssize_t min, Py_ssize_t max, Py_ssize_t *r_seq_num, bool do_unique_check, bool do_bm_check, const char *error_prefix)
BMLoop ** blender::BPy_BMLoop_PySeq_As_Array (BMesh **r_bm, PyObject *seq, Py_ssize_t min, Py_ssize_t max, Py_ssize_t *r_seq_num, bool do_unique_check, bool do_bm_check, const char *error_prefix)
PyObject * blender::BPy_BMElem_Array_As_Tuple (BMesh *bm, BMHeader **elem, Py_ssize_t elem_num)
PyObject * blender::BPy_BMVert_Array_As_Tuple (BMesh *bm, BMVert **elem, Py_ssize_t elem_num)
PyObject * blender::BPy_BMEdge_Array_As_Tuple (BMesh *bm, BMEdge **elem, Py_ssize_t elem_num)
PyObject * blender::BPy_BMFace_Array_As_Tuple (BMesh *bm, BMFace **elem, Py_ssize_t elem_num)
PyObject * blender::BPy_BMLoop_Array_As_Tuple (BMesh *bm, BMLoop *const *elem, Py_ssize_t elem_num)
int blender::BPy_BMElem_CheckHType (PyTypeObject *type, const char htype)
char * blender::BPy_BMElem_StringFromHType_ex (const char htype, char ret[32])
char * blender::BPy_BMElem_StringFromHType (const char htype)
UV Sync Selection
 blender::PyDoc_STRVAR (bpy_bmesh_uv_select_flush_mode_doc, ".. method:: uv_select_flush_mode(*, flush_down=False)\n" "\n" " Flush UV selection based on the current mode :attr:`bmesh.types.BMesh.select_mode`.\n" "\n" " :param flush_down: Flush selection down from faces to edges & verts " "or from edges to verts. " "This option is ignored when vertex selection mode is enabled.\n" " :type flush_down: bool\n")
static PyObject * blender::bpy_bmesh_uv_select_flush_mode (BPy_BMesh *self, PyObject *args, PyObject *kw)
 blender::PyDoc_STRVAR (bpy_bmesh_uv_select_flush_doc, ".. method:: uv_select_flush(select)\n" "\n" " Flush selection from UV vertices to edges & faces independent of the selection mode.\n" "\n" " :param select: Flush selection or de-selected elements.\n" " :type select: bool\n" "\n" " .. note::\n" "\n" " - |UV_SELECT_SYNC_TO_MESH_NEEDED|\n")
static PyObject * blender::bpy_bmesh_uv_select_flush (BPy_BMesh *self, PyObject *value)
 blender::PyDoc_STRVAR (bpy_bmesh_uv_select_flush_shared_doc, ".. method:: uv_select_flush_shared(select)\n" "\n" " Flush selection from UV vertices to contiguous UV's independent of the selection mode.\n" "\n" " :param select: Flush selection or de-selected elements.\n" " :type select: bool\n" "\n" " .. note::\n" "\n" " - |UV_SELECT_SYNC_TO_MESH_NEEDED|\n")
static PyObject * blender::bpy_bmesh_uv_select_flush_shared (BPy_BMesh *self, PyObject *value)
 blender::PyDoc_STRVAR (bpy_bmesh_uv_select_sync_from_mesh_doc, ".. method:: uv_select_sync_from_mesh(*, " "sticky_select_mode='SHARED_LOCATION')\n" "\n" " Sync selection from mesh to UVs.\n" "\n" " :param sticky_select_mode: Behavior when flushing from the mesh to UV selection " "|UV_STICKY_SELECT_MODE_REF|. " "This should only be used when preparing to create a UV selection.\n" " :type sticky_select_mode: |UV_STICKY_SELECT_MODE_TYPE|\n" "\n" " .. note::\n" "\n" " - |UV_SELECT_SYNC_TO_MESH_NEEDED|\n")
static PyObject * blender::bpy_bmesh_uv_select_sync_from_mesh (BPy_BMesh *self, PyObject *args, PyObject *kw)
 blender::PyDoc_STRVAR (bpy_bmesh_uv_select_sync_to_mesh_doc, ".. method:: uv_select_sync_to_mesh()\n" "\n" " Sync selection from UVs to the mesh.\n")
static PyObject * blender::bpy_bmesh_uv_select_sync_to_mesh (BPy_BMesh *self)
 blender::PyDoc_STRVAR (bpy_bmesh_uv_select_foreach_set_doc, ".. method:: uv_select_foreach_set(select, /, *, " "loop_verts=(), loop_edges=(), faces=(), sticky_select_mode='SHARED_LOCATION')\n" "\n" " Set the UV selection state for loop-vertices, loop-edges & faces.\n" "\n" " This is a close equivalent to selecting in the UV editor.\n" "\n" " :param select: The selection state to set.\n" " :type select: bool\n" " :param loop_verts: Loop verts to operate on.\n" " :type loop_verts: Iterable[:class:`bmesh.types.BMLoop`]\n" " :param loop_edges: Loop edges to operate on.\n" " :type loop_edges: Iterable[:class:`bmesh.types.BMLoop`]\n" " :param faces: Faces to operate on.\n" " :type faces: Iterable[:class:`bmesh.types.BMFace`]\n" " :param sticky_select_mode: See |UV_STICKY_SELECT_MODE_REF|.\n" " :type sticky_select_mode: |UV_STICKY_SELECT_MODE_TYPE|\n" "\n" " .. note::\n" "\n" " - |UV_SELECT_FLUSH_MODE_NEEDED|\n" " - |UV_SELECT_SYNC_TO_MESH_NEEDED|\n")
static PyObject * blender::bpy_bmesh_uv_select_foreach_set (BPy_BMesh *self, PyObject *args, PyObject *kw)
 blender::PyDoc_STRVAR (bpy_bmesh_uv_select_foreach_set_from_mesh_doc, ".. method:: uv_select_foreach_set_from_mesh(select, /, *, " "verts=(), edges=(), faces=(), sticky_select_mode='SHARED_LOCATION')\n" "\n" " Select or de-select mesh elements, updating the UV selection.\n" "\n" " An equivalent to selecting from the 3D viewport " "for selection operations that support maintaining a synchronized UV selection.\n" "\n" " :param select: The selection state to set.\n" " :type select: bool\n" " :param verts: Verts to operate on.\n" " :type verts: Iterable[:class:`bmesh.types.BMVert`]\n" " :param edges: Edges to operate on.\n" " :type edges: Iterable[:class:`bmesh.types.BMEdge`]\n" " :param faces: Faces to operate on.\n" " :type faces: Iterable[:class:`bmesh.types.BMFace`]\n" " :param sticky_select_mode: See |UV_STICKY_SELECT_MODE_REF|.\n" " :type sticky_select_mode: |UV_STICKY_SELECT_MODE_TYPE|\n")
static PyObject * blender::bpy_bmesh_uv_select_foreach_set_from_mesh (BPy_BMesh *self, PyObject *args, PyObject *kw)
Callbacks for (#CD_BM_ELEM_PYPTR)
void blender::bpy_bm_generic_invalidate (struct BPy_BMGeneric *)

Variables

PyC_FlagSet blender::bpy_bm_scene_vert_edge_face_flags []
PyC_FlagSet blender::bpy_bm_htype_vert_edge_face_flags []
PyC_FlagSet blender::bpy_bm_htype_all_flags []
PyC_FlagSet blender::bpy_bm_hflag_all_flags []
static PyC_StringEnumItems blender::bpy_bm_uv_select_sticky_items []
static PyGetSetDef blender::bpy_bmesh_getseters []
static PyGetSetDef blender::bpy_bmvert_getseters []
static PyGetSetDef blender::bpy_bmedge_getseters []
static PyGetSetDef blender::bpy_bmface_getseters []
static PyGetSetDef blender::bpy_bmloop_getseters []
static PyGetSetDef blender::bpy_bmvertseq_getseters []
static PyGetSetDef blender::bpy_bmedgeseq_getseters []
static PyGetSetDef blender::bpy_bmfaceseq_getseters []
static PyGetSetDef blender::bpy_bmloopseq_getseters []
static PyMethodDef blender::bpy_bmesh_methods []
static PyMethodDef blender::bpy_bmvert_methods []
static PyMethodDef blender::bpy_bmedge_methods []
static PyMethodDef blender::bpy_bmface_methods []
static PyMethodDef blender::bpy_bmloop_methods []
static PyMethodDef blender::bpy_bmelemseq_methods []
static PyMethodDef blender::bpy_bmvertseq_methods []
static PyMethodDef blender::bpy_bmedgeseq_methods []
static PyMethodDef blender::bpy_bmfaceseq_methods []
static PyMethodDef blender::bpy_bmloopseq_methods []
static PySequenceMethods blender::bpy_bmelemseq_as_sequence
static PyMappingMethods blender::bpy_bmelemseq_as_mapping
static PyMappingMethods blender::bpy_bm_elem_as_mapping
PyTypeObject blender::BPy_BMesh_Type
PyTypeObject blender::BPy_BMVert_Type
PyTypeObject blender::BPy_BMEdge_Type
PyTypeObject blender::BPy_BMFace_Type
PyTypeObject blender::BPy_BMLoop_Type
PyTypeObject blender::BPy_BMElemSeq_Type
PyTypeObject blender::BPy_BMVertSeq_Type
PyTypeObject blender::BPy_BMEdgeSeq_Type
PyTypeObject blender::BPy_BMFaceSeq_Type
PyTypeObject blender::BPy_BMLoopSeq_Type
PyTypeObject blender::BPy_BMIter_Type
static PyModuleDef blender::BPy_BM_types_module_def

Macro Definition Documentation

◆ BPY_BM_HFLAG_ALL_STR

#define BPY_BM_HFLAG_ALL_STR   "'SELECT', 'HIDE', 'SEAM', 'SMOOTH', 'TAG'"

This may be used with a Literal[...] typing expression.

Definition at line 82 of file bmesh_py_types.cc.

Referenced by blender::PyDoc_STRVAR().

◆ BPY_BM_HTYPE_NOLOOP

#define BPY_BM_HTYPE_NOLOOP   "'VERT', 'EDGE', 'FACE'"

This may be used with a Literal[...] typing expression.

Definition at line 79 of file bmesh_py_types.cc.

Referenced by blender::PyDoc_STRVAR().