Blender V5.0
BMesh Struct Reference

#include <bmesh_class.hh>

Public Attributes

int totvert
int totedge
int totloop
int totface
int totvertsel
int totedgesel
int totfacesel
char elem_index_dirty
char elem_table_dirty
struct BLI_mempoolvpool
struct BLI_mempoolepool
struct BLI_mempoollpool
struct BLI_mempoolfpool
BMVert ** vtable
BMEdge ** etable
BMFace ** ftable
int vtable_tot
int etable_tot
int ftable_tot
struct BLI_mempoolvtoolflagpool
struct BLI_mempooletoolflagpool
struct BLI_mempoolftoolflagpool
bool use_toolflags
bool uv_select_sync_valid
int toolflag_index
CustomData vdata
CustomData edata
CustomData ldata
CustomData pdata
struct MLoopNorSpaceArraylnor_spacearr
char spacearr_dirty
short selectmode
int shapenr
int totflags
ListBase selected
BMFaceact_face
ListBase errorstack
void * py_handle

Detailed Description

Definition at line 316 of file bmesh_class.hh.

Member Data Documentation

◆ act_face

BMFace* BMesh::act_face

The active face. This is kept even when unselected, mainly so UV editing can keep showing the active faces image while the selection is being modified in the 3D viewport.

Without this the active image in the UV editor would flicker in a distracting way while changing selection in the 3D viewport.

Definition at line 407 of file bmesh_class.hh.

Referenced by BM_mesh_copy().

◆ edata

◆ elem_index_dirty

char BMesh::elem_index_dirty

Flag index arrays as being dirty so we can check if they are clean and avoid looping over the entire vert/edge/face/loop array in those cases. valid flags are: (BM_VERT | BM_EDGE | BM_FACE | BM_LOOP)

Definition at line 325 of file bmesh_class.hh.

Referenced by BKE_bmbvh_find_face_closest(), BKE_bmbvh_find_vert_closest(), BKE_bmbvh_ray_cast(), BKE_bmbvh_ray_cast_filter(), BKE_crazyspace_set_quats_editmesh(), BM_mesh_copy(), BM_mesh_copy_arrays(), and make_child_duplis_faces_from_editmesh().

◆ elem_table_dirty

char BMesh::elem_table_dirty

Flag array table as being dirty so we know when its safe to use it, or when it needs to be re-created.

Definition at line 331 of file bmesh_class.hh.

Referenced by EDBM_verts_mirror_apply(), and give_parvert().

◆ epool

struct BLI_mempool * BMesh::epool

Definition at line 334 of file bmesh_class.hh.

◆ errorstack

ListBase BMesh::errorstack

List of BMOpError, used for operator error handling.

Definition at line 410 of file bmesh_class.hh.

◆ etable

BMEdge** BMesh::etable

Edge table.

Definition at line 344 of file bmesh_class.hh.

◆ etable_tot

int BMesh::etable_tot

Definition at line 351 of file bmesh_class.hh.

◆ etoolflagpool

struct BLI_mempool * BMesh::etoolflagpool

Definition at line 355 of file bmesh_class.hh.

◆ fpool

struct BLI_mempool * BMesh::fpool

Definition at line 334 of file bmesh_class.hh.

◆ ftable

BMFace** BMesh::ftable

◆ ftable_tot

int BMesh::ftable_tot

Definition at line 352 of file bmesh_class.hh.

◆ ftoolflagpool

struct BLI_mempool * BMesh::ftoolflagpool

Definition at line 355 of file bmesh_class.hh.

◆ ldata

◆ lnor_spacearr

struct MLoopNorSpaceArray* BMesh::lnor_spacearr

Definition at line 382 of file bmesh_class.hh.

Referenced by mesh_separate_arrays().

◆ lpool

struct BLI_mempool * BMesh::lpool

Definition at line 334 of file bmesh_class.hh.

◆ pdata

◆ py_handle

void* BMesh::py_handle

Keep a single reference to the Python instance of this BMesh (if any exists).

This allows save invalidation of a BMesh when it's freed, so the Python object will report it as having been removed, instead of crashing on invalid memory access.

Doesn't hold a #PyObject reference, cleared when the last object is de-referenced.

Definition at line 421 of file bmesh_class.hh.

◆ selected

ListBase BMesh::selected

◆ selectmode

short BMesh::selectmode

Should be copy of scene select mode.

NOTE(@ideasman42): Stored in BMEditMesh too, a bit confusing, make sure they're in sync! Only use when the edit mesh can't be accessed.

Definition at line 391 of file bmesh_class.hh.

Referenced by BM_mesh_copy(), edbm_bevel_calc(), edbm_intersect_select(), EDBM_select_flush_from_verts(), edbm_select_mirror_exec(), edbm_select_sharp_edges_exec(), EDBM_select_swap(), and EDBM_selectmode_set().

◆ shapenr

int BMesh::shapenr

1-based index of the shape key's Key::block this BMesh came from.

Definition at line 394 of file bmesh_class.hh.

Referenced by BM_mesh_copy(), mesh_undosys_step_decode(), undomesh_from_editmesh(), and undomesh_to_editmesh().

◆ spacearr_dirty

char BMesh::spacearr_dirty

Definition at line 383 of file bmesh_class.hh.

Referenced by EDBM_update().

◆ toolflag_index

int BMesh::toolflag_index

Definition at line 374 of file bmesh_class.hh.

◆ totedge

◆ totedgesel

◆ totface

◆ totfacesel

◆ totflags

int BMesh::totflags

Definition at line 396 of file bmesh_class.hh.

◆ totloop

◆ totvert

◆ totvertsel

int BMesh::totvertsel

Definition at line 318 of file bmesh_class.hh.

Referenced by average_islands_scale_exec(), BM_mesh_copy(), do_lasso_select_mesh(), do_mesh_box_select(), edbm_add_edge_face_exec(), edbm_bevel_init(), edbm_blend_from_shape_exec(), edbm_bridge_edge_loops_exec(), edbm_delete_exec(), edbm_dissolve_verts_exec(), edbm_do_smooth_laplacian_vertex_exec(), edbm_do_smooth_vertex_exec(), edbm_dupli_extrude_cursor_invoke(), edbm_duplicate_exec(), edbm_extrude_context_exec(), edbm_extrude_mesh(), edbm_extrude_region_exec(), edbm_extrude_verts_exec(), edbm_flag_disable_all_multi(), edbm_flip_normals_exec(), edbm_inset_init(), edbm_merge_exec(), EDBM_mesh_deselect_all_multi_ex(), edbm_remove_doubles_exec(), edbm_rip_invoke(), edbm_select_all_exec(), edbm_select_mirror_exec(), edbm_select_nth_exec(), EDBM_select_toggle_all(), edbm_select_ungrouped_exec(), EDBM_selectmode_set(), edbm_separate_exec(), edbm_shape_propagate_to_all_exec(), edbm_shortest_path_pick_invoke(), edbm_shortest_path_select_exec(), edbm_split_exec(), EDBM_stats_update(), edbm_unsubdivide_exec(), edbm_vert_connect_path_exec(), blender::ed::transform::getTransformOrientation_ex(), blender::ed::transform::initTransform(), mesh_circle_select(), blender::ed::transform::mesh_partial_update(), mesh_symmetrize_exec(), mesh_symmetry_snap_exec(), mouse_mesh_loop(), similar_vert_select_exec(), snap_curs_to_sel_ex(), snap_sel_to_grid_exec(), snap_selected_to_location_rotation(), stats_object_edit(), stitch_exit(), stitch_invoke(), uv_align(), uv_arrange_islands_exec(), uv_move_on_axis_exec(), uv_pin_exec(), uv_remove_doubles_to_selected(), uv_snap_selection_exec(), and uv_weld().

◆ use_toolflags

bool BMesh::use_toolflags

Definition at line 357 of file bmesh_class.hh.

Referenced by BM_mesh_copy().

◆ uv_select_sync_valid

bool BMesh::uv_select_sync_valid

Used when the UV select sync tool-setting is enabled (see: UV_FLAG_SELECT_SYNC).

When true, UV selection flags are "valid" (see: BM_ELEM_SELECT_UV & BM_ELEM_SELECT_UV_EDGE). Otherwise UV selection is read from vertex/edge/face selection flags used in the viewport.

Notes:

  • This should be cleared aggressively when there is no need to store a separate UV selection to avoid unnecessary overhead.
  • Clear using BM_mesh_uvselect_clear (instead of setting directly).

See bmesh_uvselect.hh for a more comprehensive explanation.

Definition at line 372 of file bmesh_class.hh.

Referenced by ED_uvedit_deselect_all(), EDBM_mesh_reveal(), edbm_select_all_exec(), EDBM_selectmode_set(), undomesh_from_editmesh(), and uvedit_ensure_uvs().

◆ vdata

CustomData BMesh::vdata

Definition at line 376 of file bmesh_class.hh.

Referenced by BKE_armature_deform_coords_with_editmesh(), BM_mesh_copy(), BM_mesh_copy_arrays(), BM_mesh_copy_init_customdata(), BM_mesh_copy_init_customdata_all_layers(), BM_mesh_copy_init_customdata_from_mesh_array(), blender::ed::sculpt_paint::undo::bmesh_enable(), blender::ed::sculpt_paint::undo::bmesh_push(), bmo_mesh_copy(), bpy_bm_elem_copy_from(), bpy_bmvertseq_new(), build_skin(), contarget_get_mesh_mat(), blender::ed::transform::createTransMeshSkin(), curve_deform_coords_impl(), deformVerts_do(), blender::ed::sculpt_paint::brushes::do_mask_brush(), blender::ed::sculpt_paint::brushes::do_smooth_mask_brush(), edbm_blend_from_shape_exec(), edbm_select_ungrouped_exec(), edbm_select_ungrouped_poll(), EDBM_verts_mirror_cache_clear(), EDBM_verts_mirror_get(), blender::ed::sculpt_paint::dyntopo::enable_ex(), blender::draw::extract_sculpt_data(), blender::draw::extract_skin_roots(), get_weights_array(), lattice_deform_coords_impl(), blender::draw::mesh_render_data_create(), blender::ed::transform::mesh_skin_transdata_create(), object_defgroup_remove_edit_mode(), blender::ed::sculpt_paint::undo::restore_mask_from_undo_step(), blender::ed::object::return_editmesh_vgroup(), blender::ed::sculpt_paint::mask::sculpt_mask_init_exec(), shape_itemf(), shape_propagate(), blender::ed::sculpt_paint::expand::update_for_vert(), blender::ed::object::vgroup_assign_verts(), blender::ed::object::vgroup_do_remap(), blender::ed::object::vgroup_normalize_active_vertex(), and blender::ed::object::vgroup_vert_active_mirror().

◆ vpool

struct BLI_mempool* BMesh::vpool

Element pools.

Definition at line 334 of file bmesh_class.hh.

Referenced by blender::bke::armature_deform_editmesh(), and lattice_deform_coords_impl().

◆ vtable

BMVert** BMesh::vtable

Vertex table.

Definition at line 342 of file bmesh_class.hh.

Referenced by ED_mesh_mirrtopo_init(), EDBM_verts_mirror_apply(), and EDBM_verts_mirror_get().

◆ vtable_tot

int BMesh::vtable_tot

Definition at line 350 of file bmesh_class.hh.

◆ vtoolflagpool

struct BLI_mempool* BMesh::vtoolflagpool

Operator API stuff (must be all null or all allocated).

Definition at line 355 of file bmesh_class.hh.


The documentation for this struct was generated from the following file: