Blender  V3.3
Classes | Macros | Typedefs | Enumerations | Functions
ED_mesh.h File Reference
#include "BLI_compiler_attrs.h"

Go to the source code of this file.

Classes

struct  EDBMUpdate_Params
 
struct  MirrTopoStore_t
 
struct  BMBackup
 

Macros

#define WEIGHT_REPLACE   1
 
#define WEIGHT_ADD   2
 
#define WEIGHT_SUBTRACT   3
 
#define ED_MESH_PICK_DEFAULT_VERT_DIST   25
 
#define ED_MESH_PICK_DEFAULT_FACE_DIST   1
 
#define USE_LOOPSLIDE_HACK
 

Typedefs

typedef enum eEditMesh_PreSelPreviewAction eEditMesh_PreSelPreviewAction
 
typedef struct MirrTopoStore_t MirrTopoStore_t
 
typedef struct BMBackup BMBackup
 

Enumerations

enum  eEditMesh_PreSelPreviewAction { PRESELECT_ACTION_TRANSFORM = 1 , PRESELECT_ACTION_CREATE = 2 , PRESELECT_ACTION_DELETE = 3 }
 

Functions

void EDBM_verts_mirror_cache_begin_ex (struct BMEditMesh *em, int axis, bool use_self, bool use_select, bool respecthide, bool use_topology, float maxdist, int *r_index)
 
void EDBM_verts_mirror_cache_begin (struct BMEditMesh *em, int axis, bool use_self, bool use_select, bool respecthide, bool use_topology)
 
void EDBM_verts_mirror_apply (struct BMEditMesh *em, int sel_from, int sel_to)
 
struct BMVertEDBM_verts_mirror_get (struct BMEditMesh *em, struct BMVert *v)
 
struct BMEdgeEDBM_verts_mirror_get_edge (struct BMEditMesh *em, struct BMEdge *e)
 
struct BMFaceEDBM_verts_mirror_get_face (struct BMEditMesh *em, struct BMFace *f)
 
void EDBM_verts_mirror_cache_clear (struct BMEditMesh *em, struct BMVert *v)
 
void EDBM_verts_mirror_cache_end (struct BMEditMesh *em)
 
void EDBM_mesh_normals_update_ex (struct BMEditMesh *em, const struct BMeshNormalsUpdate_Params *params)
 
void EDBM_mesh_normals_update (struct BMEditMesh *em)
 
void EDBM_mesh_clear (struct BMEditMesh *em)
 
void EDBM_selectmode_to_scene (struct bContext *C)
 
void EDBM_mesh_make (struct Object *ob, int select_mode, bool add_key_index)
 
void EDBM_mesh_free_data (struct BMEditMesh *em)
 
void EDBM_mesh_load_ex (struct Main *bmain, struct Object *ob, bool free_data)
 
void EDBM_mesh_load (struct Main *bmain, struct Object *ob)
 
void EDBM_select_more (struct BMEditMesh *em, bool use_face_step)
 
void EDBM_select_less (struct BMEditMesh *em, bool use_face_step)
 
void EDBM_selectmode_flush_ex (struct BMEditMesh *em, short selectmode)
 
void EDBM_selectmode_flush (struct BMEditMesh *em)
 
void EDBM_deselect_flush (struct BMEditMesh *em)
 
void EDBM_select_flush (struct BMEditMesh *em)
 
bool EDBM_vert_color_check (struct BMEditMesh *em)
 
bool EDBM_mesh_hide (struct BMEditMesh *em, bool swap)
 
bool EDBM_mesh_reveal (struct BMEditMesh *em, bool select)
 
void EDBM_update (struct Mesh *me, const struct EDBMUpdate_Params *params)
 
void EDBM_update_extern (struct Mesh *me, bool do_tessellation, bool is_destructive)
 
struct UvElementMapBM_uv_element_map_create (struct BMesh *bm, const struct Scene *scene, bool uv_selected, bool use_winding, bool do_islands)
 
void BM_uv_element_map_free (struct UvElementMap *element_map)
 
struct UvElementBM_uv_element_get (struct UvElementMap *map, struct BMFace *efa, struct BMLoop *l)
 
bool EDBM_uv_check (struct BMEditMesh *em)
 
struct BMFaceEDBM_uv_active_face_get (struct BMEditMesh *em, bool sloppy, bool selected)
 
void BM_uv_vert_map_free (struct UvVertMap *vmap)
 
struct UvMapVertBM_uv_vert_map_at_index (struct UvVertMap *vmap, unsigned int v)
 
struct UvVertMapBM_uv_vert_map_create (struct BMesh *bm, bool use_select, bool use_winding)
 
void EDBM_flag_enable_all (struct BMEditMesh *em, char hflag)
 
void EDBM_flag_disable_all (struct BMEditMesh *em, char hflag)
 
bool BMBVH_EdgeVisible (struct BMBVHTree *tree, struct BMEdge *e, struct Depsgraph *depsgraph, struct ARegion *region, struct View3D *v3d, struct Object *obedit)
 
void EDBM_project_snap_verts (struct bContext *C, struct Depsgraph *depsgraph, struct ARegion *region, struct Object *obedit, struct BMEditMesh *em)
 
void EDBM_automerge (struct Object *ob, bool update, char hflag, float dist)
 
void EDBM_automerge_and_split (struct Object *ob, bool split_edges, bool split_faces, bool update, char hflag, float dist)
 
void ED_mesh_undosys_type (struct UndoType *ut)
 
void EDBM_select_mirrored (struct BMEditMesh *em, const struct Mesh *me, int axis, bool extend, int *r_totmirr, int *r_totfail)
 
struct BMVertEDBM_vert_find_nearest_ex (struct ViewContext *vc, float *dist_px_manhattan_p, bool use_select_bias, bool use_cycle, struct Base **bases, uint bases_len, uint *r_base_index)
 
struct BMVertEDBM_vert_find_nearest (struct ViewContext *vc, float *dist_px_manhattan_p)
 
struct BMEdgeEDBM_edge_find_nearest_ex (struct ViewContext *vc, float *dist_px_manhattan, float *r_dist_center, bool use_select_bias, bool use_cycle, struct BMEdge **r_eed_zbuf, struct Base **bases, uint bases_len, uint *r_base_index)
 
struct BMEdgeEDBM_edge_find_nearest (struct ViewContext *vc, float *dist_px_manhattan_p)
 
struct BMFaceEDBM_face_find_nearest_ex (struct ViewContext *vc, float *dist_px_manhattan, float *r_dist_center, bool use_zbuf_single_px, bool use_select_bias, bool use_cycle, struct BMFace **r_efa_zbuf, struct Base **bases, uint bases_len, uint *r_base_index)
 
struct BMFaceEDBM_face_find_nearest (struct ViewContext *vc, float *dist_px_manhattan_p)
 
bool EDBM_unified_findnearest (struct ViewContext *vc, struct Base **bases, uint bases_len, int *r_base_index, struct BMVert **r_eve, struct BMEdge **r_eed, struct BMFace **r_efa)
 
bool EDBM_unified_findnearest_from_raycast (struct ViewContext *vc, struct Base **bases, uint bases_len, bool use_boundary_vertices, bool use_boundary_edges, int *r_base_index_vert, int *r_base_index_edge, int *r_base_index_face, struct BMVert **r_eve, struct BMEdge **r_eed, struct BMFace **r_efa)
 
bool EDBM_select_pick (struct bContext *C, const int mval[2], const struct SelectPick_Params *params)
 
void EDBM_selectmode_set (struct BMEditMesh *em)
 
void EDBM_selectmode_convert (struct BMEditMesh *em, short selectmode_old, short selectmode_new)
 
bool EDBM_selectmode_set_multi (struct bContext *C, short selectmode)
 
bool EDBM_selectmode_toggle_multi (struct bContext *C, short selectmode_new, int action, bool use_extend, bool use_expand)
 
bool EDBM_selectmode_disable (struct Scene *scene, struct BMEditMesh *em, short selectmode_disable, short selectmode_fallback)
 
bool EDBM_deselect_by_material (struct BMEditMesh *em, short index, bool select)
 
void EDBM_select_toggle_all (struct BMEditMesh *em)
 
void EDBM_select_swap (struct BMEditMesh *em)
 
bool EDBM_select_interior_faces (struct BMEditMesh *em)
 
void em_setup_viewcontext (struct bContext *C, struct ViewContext *vc)
 
bool EDBM_mesh_deselect_all_multi_ex (struct Base **bases, uint bases_len)
 
bool EDBM_mesh_deselect_all_multi (struct bContext *C)
 
bool EDBM_selectmode_disable_multi_ex (struct Scene *scene, struct Base **bases, uint bases_len, short selectmode_disable, short selectmode_fallback)
 
bool EDBM_selectmode_disable_multi (struct bContext *C, short selectmode_disable, short selectmode_fallback)
 
struct EditMesh_PreSelEdgeRingEDBM_preselect_edgering_create (void)
 
void EDBM_preselect_edgering_destroy (struct EditMesh_PreSelEdgeRing *psel)
 
void EDBM_preselect_edgering_clear (struct EditMesh_PreSelEdgeRing *psel)
 
void EDBM_preselect_edgering_draw (struct EditMesh_PreSelEdgeRing *psel, const float matrix[4][4])
 
void EDBM_preselect_edgering_update_from_edge (struct EditMesh_PreSelEdgeRing *psel, struct BMesh *bm, struct BMEdge *eed_start, int previewlines, const float(*coords)[3])
 
struct EditMesh_PreSelElemEDBM_preselect_elem_create (void)
 
void EDBM_preselect_elem_destroy (struct EditMesh_PreSelElem *psel)
 
void EDBM_preselect_elem_clear (struct EditMesh_PreSelElem *psel)
 
void EDBM_preselect_preview_clear (struct EditMesh_PreSelElem *psel)
 
void EDBM_preselect_elem_draw (struct EditMesh_PreSelElem *psel, const float matrix[4][4])
 
void EDBM_preselect_elem_update_from_single (struct EditMesh_PreSelElem *psel, struct BMesh *bm, struct BMElem *ele, const float(*coords)[3])
 
void EDBM_preselect_elem_update_preview (struct EditMesh_PreSelElem *psel, struct ViewContext *vc, struct BMesh *bm, struct BMElem *ele, const int mval[2])
 
void EDBM_preselect_action_set (struct EditMesh_PreSelElem *psel, eEditMesh_PreSelPreviewAction action)
 
eEditMesh_PreSelPreviewAction EDBM_preselect_action_get (struct EditMesh_PreSelElem *psel)
 
void ED_operatortypes_mesh (void)
 
void ED_operatormacros_mesh (void)
 
void ED_keymap_mesh (struct wmKeyConfig *keyconf)
 
void paintface_flush_flags (struct bContext *C, struct Object *ob, short flag)
 
bool paintface_mouse_select (struct bContext *C, const int mval[2], const struct SelectPick_Params *params, struct Object *ob)
 
bool paintface_deselect_all_visible (struct bContext *C, struct Object *ob, int action, bool flush_flags)
 
void paintface_select_linked (struct bContext *C, struct Object *ob, const int mval[2], bool select)
 
bool paintface_minmax (struct Object *ob, float r_min[3], float r_max[3])
 
void paintface_hide (struct bContext *C, struct Object *ob, bool unselected)
 
void paintface_reveal (struct bContext *C, struct Object *ob, bool select)
 
bool paintvert_deselect_all_visible (struct Object *ob, int action, bool flush_flags)
 
void paintvert_select_ungrouped (struct Object *ob, bool extend, bool flush_flags)
 
void paintvert_flush_flags (struct Object *ob)
 
void paintvert_tag_select_update (struct bContext *C, struct Object *ob)
 
void paintvert_hide (struct bContext *C, struct Object *ob, bool unselected)
 
void paintvert_reveal (struct bContext *C, struct Object *ob, bool select)
 
bool ED_mesh_mirrtopo_recalc_check (struct BMEditMesh *em, struct Mesh *me, MirrTopoStore_t *mesh_topo_store)
 
void ED_mesh_mirrtopo_init (struct BMEditMesh *em, struct Mesh *me, MirrTopoStore_t *mesh_topo_store, bool skip_em_vert_array_init)
 
void ED_mesh_mirrtopo_free (MirrTopoStore_t *mesh_topo_store)
 
bool ED_vgroup_sync_from_pose (struct Object *ob)
 
void ED_vgroup_select_by_name (struct Object *ob, const char *name)
 
void ED_vgroup_data_clamp_range (struct ID *id, int total)
 
bool ED_vgroup_array_copy (struct Object *ob, struct Object *ob_from)
 
bool ED_vgroup_parray_alloc (struct ID *id, struct MDeformVert ***dvert_arr, int *dvert_tot, bool use_vert_sel)
 
void ED_vgroup_parray_mirror_sync (struct Object *ob, struct MDeformVert **dvert_array, int dvert_tot, const bool *vgroup_validmap, int vgroup_tot)
 
void ED_vgroup_parray_mirror_assign (struct Object *ob, struct MDeformVert **dvert_array, int dvert_tot)
 
void ED_vgroup_parray_remove_zero (struct MDeformVert **dvert_array, int dvert_tot, const bool *vgroup_validmap, int vgroup_tot, float epsilon, bool keep_single)
 
void ED_vgroup_parray_to_weight_array (const struct MDeformVert **dvert_array, int dvert_tot, float *dvert_weights, int def_nr)
 
void ED_vgroup_parray_from_weight_array (struct MDeformVert **dvert_array, int dvert_tot, const float *dvert_weights, int def_nr, bool remove_zero)
 
void ED_vgroup_mirror (struct Object *ob, bool mirror_weights, bool flip_vgroups, bool all_vgroups, bool use_topology, int *r_totmirr, int *r_totfail)
 
void ED_vgroup_vert_add (struct Object *ob, struct bDeformGroup *dg, int vertnum, float weight, int assignmode)
 
void ED_vgroup_vert_remove (struct Object *ob, struct bDeformGroup *dg, int vertnum)
 
float ED_vgroup_vert_weight (struct Object *ob, struct bDeformGroup *dg, int vertnum)
 
void ED_vgroup_vert_active_mirror (struct Object *ob, int def_nr)
 
void ED_mesh_verts_add (struct Mesh *mesh, struct ReportList *reports, int count)
 
void ED_mesh_edges_add (struct Mesh *mesh, struct ReportList *reports, int count)
 
void ED_mesh_loops_add (struct Mesh *mesh, struct ReportList *reports, int count)
 
void ED_mesh_polys_add (struct Mesh *mesh, struct ReportList *reports, int count)
 
void ED_mesh_verts_remove (struct Mesh *mesh, struct ReportList *reports, int count)
 
void ED_mesh_edges_remove (struct Mesh *mesh, struct ReportList *reports, int count)
 
void ED_mesh_loops_remove (struct Mesh *mesh, struct ReportList *reports, int count)
 
void ED_mesh_polys_remove (struct Mesh *mesh, struct ReportList *reports, int count)
 
void ED_mesh_geometry_clear (struct Mesh *mesh)
 
void ED_mesh_update (struct Mesh *mesh, struct bContext *C, bool calc_edges, bool calc_edges_loose)
 
void ED_mesh_uv_ensure (struct Mesh *me, const char *name)
 
int ED_mesh_uv_add (struct Mesh *me, const char *name, bool active_set, bool do_init, struct ReportList *reports)
 
bool ED_mesh_uv_remove_index (struct Mesh *me, int n)
 
bool ED_mesh_uv_remove_active (struct Mesh *me)
 
bool ED_mesh_uv_remove_named (struct Mesh *me, const char *name)
 
void ED_mesh_uv_loop_reset (struct bContext *C, struct Mesh *me)
 
void ED_mesh_uv_loop_reset_ex (struct Mesh *me, int layernum)
 
bool ED_mesh_color_ensure (struct Mesh *me, const char *name)
 
int ED_mesh_color_add (struct Mesh *me, const char *name, bool active_set, bool do_init, struct ReportList *reports)
 
bool ED_mesh_color_remove_index (struct Mesh *me, int n)
 
bool ED_mesh_color_remove_active (struct Mesh *me)
 
bool ED_mesh_color_remove_named (struct Mesh *me, const char *name)
 
bool ED_mesh_sculpt_color_ensure (struct Mesh *me, const char *name)
 
int ED_mesh_sculpt_color_add (struct Mesh *me, const char *name, bool active_set, bool do_init, struct ReportList *reports)
 
bool ED_mesh_sculpt_color_remove_index (struct Mesh *me, int n)
 
bool ED_mesh_sculpt_color_remove_active (struct Mesh *me)
 
bool ED_mesh_sculpt_color_remove_named (struct Mesh *me, const char *name)
 
void ED_mesh_report_mirror (struct wmOperator *op, int totmirr, int totfail)
 
void ED_mesh_report_mirror_ex (struct wmOperator *op, int totmirr, int totfail, char selectmode)
 
struct MeshED_mesh_context (struct bContext *C)
 
struct BMBackup EDBM_redo_state_store (struct BMEditMesh *em)
 
void EDBM_redo_state_restore (struct BMBackup *backup, struct BMEditMesh *em, bool recalc_looptri) ATTR_NONNULL(1
 
void void EDBM_redo_state_restore_and_free (struct BMBackup *backup, struct BMEditMesh *em, bool recalc_looptri) ATTR_NONNULL(1
 
void void void EDBM_redo_state_free (struct BMBackup *backup) ATTR_NONNULL(1)
 
int ED_mesh_join_objects_exec (struct bContext *C, struct wmOperator *op)
 
int ED_mesh_shapes_join_objects_exec (struct bContext *C, struct wmOperator *op)
 
void ED_mesh_mirror_spatial_table_begin (struct Object *ob, struct BMEditMesh *em, struct Mesh *me_eval)
 
void ED_mesh_mirror_spatial_table_end (struct Object *ob)
 
int ED_mesh_mirror_spatial_table_lookup (struct Object *ob, struct BMEditMesh *em, struct Mesh *me_eval, const float co[3])
 
void ED_mesh_mirror_topo_table_begin (struct Object *ob, struct Mesh *me_eval)
 
void ED_mesh_mirror_topo_table_end (struct Object *ob)
 
int mesh_get_x_mirror_vert (struct Object *ob, struct Mesh *me_eval, int index, bool use_topology)
 
struct BMVerteditbmesh_get_x_mirror_vert (struct Object *ob, struct BMEditMesh *em, struct BMVert *eve, const float co[3], int index, bool use_topology)
 
int * mesh_get_x_mirror_faces (struct Object *ob, struct BMEditMesh *em, struct Mesh *me_eval)
 
int ED_mesh_mirror_get_vert (struct Object *ob, int index)
 
bool ED_mesh_pick_vert (struct bContext *C, struct Object *ob, const int mval[2], uint dist_px, bool use_zbuf, uint *r_index)
 
bool ED_mesh_pick_face (struct bContext *C, struct Object *ob, const int mval[2], uint dist_px, uint *r_index)
 
bool ED_mesh_pick_face_vert (struct bContext *C, struct Object *ob, const int mval[2], uint dist_px, uint *r_index)
 
struct MDeformVertED_mesh_active_dvert_get_em (struct Object *ob, struct BMVert **r_eve)
 
struct MDeformVertED_mesh_active_dvert_get_ob (struct Object *ob, int *r_index)
 
struct MDeformVertED_mesh_active_dvert_get_only (struct Object *ob)
 
void EDBM_mesh_stats_multi (struct Object **objects, uint objects_len, int totelem[3], int totelem_sel[3])
 
void EDBM_mesh_elem_index_ensure_multi (struct Object **objects, uint objects_len, char htype)
 

Macro Definition Documentation

◆ ED_MESH_PICK_DEFAULT_FACE_DIST

#define ED_MESH_PICK_DEFAULT_FACE_DIST   1

Definition at line 678 of file ED_mesh.h.

◆ ED_MESH_PICK_DEFAULT_VERT_DIST

#define ED_MESH_PICK_DEFAULT_VERT_DIST   25

Definition at line 677 of file ED_mesh.h.

◆ USE_LOOPSLIDE_HACK

#define USE_LOOPSLIDE_HACK

Definition at line 680 of file ED_mesh.h.

◆ WEIGHT_ADD

#define WEIGHT_ADD   2

Definition at line 450 of file ED_mesh.h.

◆ WEIGHT_REPLACE

#define WEIGHT_REPLACE   1

Definition at line 449 of file ED_mesh.h.

◆ WEIGHT_SUBTRACT

#define WEIGHT_SUBTRACT   3

Definition at line 451 of file ED_mesh.h.

Typedef Documentation

◆ BMBackup

typedef struct BMBackup BMBackup

◆ eEditMesh_PreSelPreviewAction

◆ MirrTopoStore_t

Enumeration Type Documentation

◆ eEditMesh_PreSelPreviewAction

Enumerator
PRESELECT_ACTION_TRANSFORM 
PRESELECT_ACTION_CREATE 
PRESELECT_ACTION_DELETE 

Definition at line 352 of file ED_mesh.h.

Function Documentation

◆ BM_uv_element_get()

struct UvElement* BM_uv_element_get ( struct UvElementMap map,
struct BMFace efa,
struct BMLoop l 
)

◆ BM_uv_element_map_create()

struct UvElementMap* BM_uv_element_map_create ( struct BMesh bm,
const struct Scene scene,
bool  uv_selected,
bool  use_winding,
bool  do_islands 
)

A specialized vert map used by stitch operator.

Referenced by createTransUVs(), stitch_init(), uv_isolate_selected_islands(), uv_sculpt_stroke_init(), and uvedit_uv_straighten().

◆ BM_uv_element_map_free()

void BM_uv_element_map_free ( struct UvElementMap element_map)

◆ BM_uv_vert_map_at_index()

struct UvMapVert* BM_uv_vert_map_at_index ( struct UvVertMap vmap,
unsigned int  v 
)

Definition at line 591 of file editmesh_utils.c.

References v, and UvVertMap::vert.

Referenced by uv_select_flush_from_tag_sticky_loc_internal(), and uv_select_linked_multi().

◆ BM_uv_vert_map_create()

struct UvVertMap* BM_uv_vert_map_create ( struct BMesh bm,
bool  use_select,
bool  use_winding 
)

◆ BM_uv_vert_map_free()

void BM_uv_vert_map_free ( struct UvVertMap vmap)

◆ BMBVH_EdgeVisible()

bool BMBVH_EdgeVisible ( struct BMBVHTree tree,
struct BMEdge e,
struct Depsgraph depsgraph,
struct ARegion region,
struct View3D v3d,
struct Object obedit 
)

◆ ED_keymap_mesh()

void ED_keymap_mesh ( struct wmKeyConfig keyconf)

Note mesh keymap also for other space?

Definition at line 359 of file mesh_ops.c.

References bevel_modal_keymap(), ED_operator_editmesh(), knifetool_modal_keymap(), point_normals_modal_keymap(), wmKeyMap::poll, and WM_keymap_ensure().

Referenced by ED_spacetypes_keymap().

◆ ED_mesh_active_dvert_get_em()

struct MDeformVert* ED_mesh_active_dvert_get_em ( struct Object ob,
struct BMVert **  r_eve 
)

◆ ED_mesh_active_dvert_get_ob()

struct MDeformVert* ED_mesh_active_dvert_get_ob ( struct Object ob,
int *  r_index 
)

◆ ED_mesh_active_dvert_get_only()

struct MDeformVert* ED_mesh_active_dvert_get_only ( struct Object ob)

◆ ED_mesh_color_add()

int ED_mesh_color_add ( struct Mesh me,
const char *  name,
bool  active_set,
bool  do_init,
struct ReportList reports 
)

Referenced by output_toggle_exec().

◆ ED_mesh_color_ensure()

bool ED_mesh_color_ensure ( struct Mesh me,
const char *  name 
)

◆ ED_mesh_color_remove_active()

bool ED_mesh_color_remove_active ( struct Mesh me)

◆ ED_mesh_color_remove_index()

bool ED_mesh_color_remove_index ( struct Mesh me,
int  n 
)

◆ ED_mesh_color_remove_named()

bool ED_mesh_color_remove_named ( struct Mesh me,
const char *  name 
)

◆ ED_mesh_context()

struct Mesh* ED_mesh_context ( struct bContext C)

Returns the pinned mesh, the mesh from the pinned object, or the mesh from the active object.

Definition at line 1406 of file mesh_data.cc.

References C, CTX_data_pointer_get_type(), data, Object::data, PointerRNA::data, ED_object_active_context(), GS, ID_ME, if(), and mesh.

Referenced by ED_operator_editable_mesh(), mesh_customdata_clear_exec__internal(), mesh_customdata_custom_splitnormals_add_exec(), and mesh_customdata_custom_splitnormals_clear_exec().

◆ ED_mesh_edges_add()

void ED_mesh_edges_add ( struct Mesh mesh,
struct ReportList reports,
int  count 
)

Definition at line 1239 of file mesh_data.cc.

References BKE_report(), count, Mesh::edit_mesh, mesh, mesh_add_edges(), and RPT_ERROR.

◆ ED_mesh_edges_remove()

void ED_mesh_edges_remove ( struct Mesh mesh,
struct ReportList reports,
int  count 
)

◆ ED_mesh_geometry_clear()

void ED_mesh_geometry_clear ( struct Mesh mesh)

◆ ED_mesh_join_objects_exec()

int ED_mesh_join_objects_exec ( struct bContext C,
struct wmOperator op 
)

Definition at line 314 of file meshtools.cc.

References Freestyle::a, Object::actfmap, usdtokens::b(), BKE_id_copy(), BKE_id_free_ex(), BKE_key_add(), BKE_key_sort(), BKE_keyblock_add(), BKE_keyblock_copy_settings(), BKE_keyblock_find_name(), BKE_mesh_clear_derived_normals(), BKE_mesh_from_object(), BKE_mesh_normals_tag_dirty(), BKE_mesh_runtime_clear_geometry(), BKE_mesh_tessface_clear(), BKE_mesh_update_customdata_pointers(), BKE_object_apply_mat4_ex(), BKE_object_defgroup_find_name(), BKE_object_facemap_find_name(), BKE_object_free_derived_caches(), BKE_object_material_get(), BKE_objects_materials_test_all(), BKE_report(), BKE_reportf(), BLI_addtail(), BLI_assert, BLI_findindex(), BLI_listbase_is_empty(), Key::block, C, CD_CALLOC, CD_MEDGE, CD_MLOOP, CD_MPOLY, CD_MVERT, CTX_data_active_object(), CTX_DATA_BEGIN, CTX_DATA_END, CTX_data_ensure_evaluated_depsgraph(), CTX_data_main(), CTX_data_scene(), CustomData_add_layer(), CustomData_free(), CustomData_reset(), KeyBlock::data, Object::data, DEG_id_tag_update(), DEG_relations_tag_update(), depsgraph, ED_object_base_free_and_unlink(), Mesh::edata, ELEM, ListBase::first, Object::fmaps, Key::id, Object::id, Scene::id, ID_RECALC_GEOMETRY, ID_RECALC_SELECT, ID_RECALC_TRANSFORM, id_us_min(), id_us_plus(), if(), invert_m4_m4_safe_ortho(), join_mesh_single(), Mesh::key, KEY_RELATIVE, Mesh::ldata, LIB_ID_FREE_NO_UI_USER, LIKELY, LISTBASE_FOREACH, LISTBASE_FOREACH_INDEX, Mesh::mat, Object::mat, Object::matbits, MAXMAT, MEM_callocN, MEM_freeN, MEM_mallocN, MEM_SAFE_FREE, mesh_join_offset_face_sets_ID(), MESH_MAX_VERTS, Object::mode, Node::name, NC_SCENE, ND_LAYER_CONTENT, ND_OB_ACTIVE, OB_MESH, OB_MODE_EDIT, Object::obmat, OPERATOR_CANCELLED, OPERATOR_FINISHED, Object::parent, Object::parentinv, Mesh::pdata, KeyBlock::relative, wmOperator::reports, RPT_WARNING, scene, Mesh::totcol, Object::totcol, Mesh::totedge, KeyBlock::totelem, Key::totkey, Mesh::totloop, Mesh::totpoly, Mesh::totvert, Key::type, Object::type, Mesh::vdata, Mesh::vertex_group_active_index, Mesh::vertex_group_names, and WM_event_add_notifier().

Referenced by object_join_exec().

◆ ED_mesh_loops_add()

void ED_mesh_loops_add ( struct Mesh mesh,
struct ReportList reports,
int  count 
)

Definition at line 1248 of file mesh_data.cc.

References BKE_report(), count, Mesh::edit_mesh, mesh, mesh_add_loops(), and RPT_ERROR.

◆ ED_mesh_loops_remove()

void ED_mesh_loops_remove ( struct Mesh mesh,
struct ReportList reports,
int  count 
)

◆ ED_mesh_mirror_get_vert()

int ED_mesh_mirror_get_vert ( struct Object ob,
int  index 
)

◆ ED_mesh_mirror_spatial_table_begin()

void ED_mesh_mirror_spatial_table_begin ( struct Object ob,
struct BMEditMesh em,
struct Mesh me_eval 
)

◆ ED_mesh_mirror_spatial_table_end()

void ED_mesh_mirror_spatial_table_end ( struct Object ob)

◆ ED_mesh_mirror_spatial_table_lookup()

int ED_mesh_mirror_spatial_table_lookup ( struct Object ob,
struct BMEditMesh em,
struct Mesh me_eval,
const float  co[3] 
)

◆ ED_mesh_mirror_topo_table_begin()

void ED_mesh_mirror_topo_table_begin ( struct Object ob,
struct Mesh me_eval 
)

Mode is 's' start, or 'e' end, or 'u' use if end, ob can be NULL.

Note
This is supposed return -1 on error, which callers are currently checking for, but is not used so far.

Definition at line 863 of file meshtools.cc.

References ED_mesh_mirrtopo_init(), mesh_mirror_topo_table_get_meshes(), and mesh_topo_store.

Referenced by ed_mesh_mirror_topo_table_update().

◆ ED_mesh_mirror_topo_table_end()

void ED_mesh_mirror_topo_table_end ( struct Object ob)

◆ ED_mesh_mirrtopo_free()

void ED_mesh_mirrtopo_free ( MirrTopoStore_t mesh_topo_store)

◆ ED_mesh_mirrtopo_init()

void ED_mesh_mirrtopo_init ( struct BMEditMesh em,
struct Mesh me,
MirrTopoStore_t mesh_topo_store,
bool  skip_em_vert_array_init 
)

◆ ED_mesh_mirrtopo_recalc_check()

bool ED_mesh_mirrtopo_recalc_check ( struct BMEditMesh em,
struct Mesh me,
MirrTopoStore_t mesh_topo_store 
)

◆ ED_mesh_pick_face()

bool ED_mesh_pick_face ( struct bContext C,
struct Object ob,
const int  mval[2],
uint  dist_px,
uint r_index 
)

◆ ED_mesh_pick_face_vert()

bool ED_mesh_pick_face_vert ( struct bContext C,
struct Object ob,
const int  mval[2],
uint  dist_px,
uint r_index 
)

◆ ED_mesh_pick_vert()

bool ED_mesh_pick_vert ( struct bContext C,
struct Object ob,
const int  mval[2],
uint  dist_px,
bool  use_zbuf,
uint r_index 
)

◆ ED_mesh_polys_add()

void ED_mesh_polys_add ( struct Mesh mesh,
struct ReportList reports,
int  count 
)

Definition at line 1257 of file mesh_data.cc.

References BKE_report(), count, Mesh::edit_mesh, mesh, mesh_add_polys(), and RPT_ERROR.

◆ ED_mesh_polys_remove()

void ED_mesh_polys_remove ( struct Mesh mesh,
struct ReportList reports,
int  count 
)

◆ ED_mesh_report_mirror()

void ED_mesh_report_mirror ( struct wmOperator op,
int  totmirr,
int  totfail 
)

Definition at line 1401 of file mesh_data.cc.

References ED_mesh_report_mirror_ex(), and SCE_SELECT_VERTEX.

Referenced by shape_key_mirror_exec(), and vertex_group_mirror_exec().

◆ ED_mesh_report_mirror_ex()

void ED_mesh_report_mirror_ex ( struct wmOperator op,
int  totmirr,
int  totfail,
char  selectmode 
)

◆ ED_mesh_sculpt_color_add()

int ED_mesh_sculpt_color_add ( struct Mesh me,
const char *  name,
bool  active_set,
bool  do_init,
struct ReportList reports 
)

◆ ED_mesh_sculpt_color_ensure()

bool ED_mesh_sculpt_color_ensure ( struct Mesh me,
const char *  name 
)

◆ ED_mesh_sculpt_color_remove_active()

bool ED_mesh_sculpt_color_remove_active ( struct Mesh me)

◆ ED_mesh_sculpt_color_remove_index()

bool ED_mesh_sculpt_color_remove_index ( struct Mesh me,
int  n 
)

◆ ED_mesh_sculpt_color_remove_named()

bool ED_mesh_sculpt_color_remove_named ( struct Mesh me,
const char *  name 
)

◆ ED_mesh_shapes_join_objects_exec()

int ED_mesh_shapes_join_objects_exec ( struct bContext C,
struct wmOperator op 
)

◆ ED_mesh_undosys_type()

void ED_mesh_undosys_type ( struct UndoType ut)

◆ ED_mesh_update()

void ED_mesh_update ( struct Mesh mesh,
struct bContext C,
bool  calc_edges,
bool  calc_edges_loose 
)

◆ ED_mesh_uv_add()

int ED_mesh_uv_add ( struct Mesh me,
const char *  name,
bool  active_set,
bool  do_init,
struct ReportList reports 
)

◆ ED_mesh_uv_ensure()

void ED_mesh_uv_ensure ( struct Mesh me,
const char *  name 
)

◆ ED_mesh_uv_loop_reset()

void ED_mesh_uv_loop_reset ( struct bContext C,
struct Mesh me 
)

◆ ED_mesh_uv_loop_reset_ex()

void ED_mesh_uv_loop_reset_ex ( struct Mesh me,
int  layernum 
)

◆ ED_mesh_uv_remove_active()

bool ED_mesh_uv_remove_active ( struct Mesh me)

◆ ED_mesh_uv_remove_index()

bool ED_mesh_uv_remove_index ( struct Mesh me,
int  n 
)

◆ ED_mesh_uv_remove_named()

bool ED_mesh_uv_remove_named ( struct Mesh me,
const char *  name 
)

◆ ED_mesh_verts_add()

void ED_mesh_verts_add ( struct Mesh mesh,
struct ReportList reports,
int  count 
)

Definition at line 1230 of file mesh_data.cc.

References BKE_report(), count, Mesh::edit_mesh, mesh, mesh_add_verts(), and RPT_ERROR.

◆ ED_mesh_verts_remove()

void ED_mesh_verts_remove ( struct Mesh mesh,
struct ReportList reports,
int  count 
)

◆ ED_operatormacros_mesh()

void ED_operatormacros_mesh ( void  )

◆ ED_operatortypes_mesh()

void ED_operatortypes_mesh ( void  )

Definition at line 22 of file mesh_ops.c.

References MESH_OT_average_normals(), MESH_OT_beautify_fill(), MESH_OT_bevel(), MESH_OT_bisect(), MESH_OT_blend_from_shape(), MESH_OT_bridge_edge_loops(), MESH_OT_colors_reverse(), MESH_OT_colors_rotate(), MESH_OT_convex_hull(), MESH_OT_customdata_custom_splitnormals_add(), MESH_OT_customdata_custom_splitnormals_clear(), MESH_OT_customdata_mask_clear(), MESH_OT_customdata_skin_add(), MESH_OT_customdata_skin_clear(), MESH_OT_decimate(), MESH_OT_delete(), MESH_OT_delete_edgeloop(), MESH_OT_delete_loose(), MESH_OT_dissolve_degenerate(), MESH_OT_dissolve_edges(), MESH_OT_dissolve_faces(), MESH_OT_dissolve_limited(), MESH_OT_dissolve_mode(), MESH_OT_dissolve_verts(), MESH_OT_dupli_extrude_cursor(), MESH_OT_duplicate(), MESH_OT_edge_collapse(), MESH_OT_edge_face_add(), MESH_OT_edge_rotate(), MESH_OT_edge_split(), MESH_OT_edgering_select(), MESH_OT_edges_select_sharp(), MESH_OT_extrude_context(), MESH_OT_extrude_edges_indiv(), MESH_OT_extrude_faces_indiv(), MESH_OT_extrude_region(), MESH_OT_extrude_repeat(), MESH_OT_extrude_verts_indiv(), MESH_OT_face_make_planar(), MESH_OT_face_set_extract(), MESH_OT_face_split_by_edges(), MESH_OT_faces_select_linked_flat(), MESH_OT_faces_shade_flat(), MESH_OT_faces_shade_smooth(), MESH_OT_fill(), MESH_OT_fill_grid(), MESH_OT_fill_holes(), MESH_OT_flip_normals(), MESH_OT_hide(), MESH_OT_inset(), MESH_OT_intersect(), MESH_OT_intersect_boolean(), MESH_OT_knife_project(), MESH_OT_knife_tool(), MESH_OT_loop_multi_select(), MESH_OT_loop_select(), MESH_OT_loop_to_region(), MESH_OT_loopcut(), MESH_OT_mark_seam(), MESH_OT_mark_sharp(), MESH_OT_merge(), MESH_OT_merge_normals(), MESH_OT_mod_weighted_strength(), MESH_OT_normals_make_consistent(), MESH_OT_normals_tools(), MESH_OT_offset_edge_loops(), MESH_OT_paint_mask_extract(), MESH_OT_paint_mask_slice(), MESH_OT_point_normals(), MESH_OT_poke(), MESH_OT_polybuild_delete_at_cursor(), MESH_OT_polybuild_dissolve_at_cursor(), MESH_OT_polybuild_face_at_cursor(), MESH_OT_polybuild_split_at_cursor(), MESH_OT_polybuild_transform_at_cursor(), MESH_OT_primitive_circle_add(), MESH_OT_primitive_cone_add(), MESH_OT_primitive_cube_add(), MESH_OT_primitive_cube_add_gizmo(), MESH_OT_primitive_cylinder_add(), MESH_OT_primitive_grid_add(), MESH_OT_primitive_ico_sphere_add(), MESH_OT_primitive_monkey_add(), MESH_OT_primitive_plane_add(), MESH_OT_primitive_uv_sphere_add(), MESH_OT_quads_convert_to_tris(), MESH_OT_region_to_loop(), MESH_OT_remove_doubles(), MESH_OT_reveal(), MESH_OT_rip(), MESH_OT_rip_edge(), MESH_OT_screw(), MESH_OT_sculpt_vertex_color_add(), MESH_OT_sculpt_vertex_color_remove(), MESH_OT_select_all(), MESH_OT_select_axis(), MESH_OT_select_face_by_sides(), MESH_OT_select_interior_faces(), MESH_OT_select_less(), MESH_OT_select_linked(), MESH_OT_select_linked_pick(), MESH_OT_select_loose(), MESH_OT_select_mirror(), MESH_OT_select_mode(), MESH_OT_select_more(), MESH_OT_select_non_manifold(), MESH_OT_select_nth(), MESH_OT_select_random(), MESH_OT_select_similar(), MESH_OT_select_similar_region(), MESH_OT_select_ungrouped(), MESH_OT_separate(), MESH_OT_set_normals_from_faces(), MESH_OT_shape_propagate_to_all(), MESH_OT_shortest_path_pick(), MESH_OT_shortest_path_select(), MESH_OT_smooth_normals(), MESH_OT_solidify(), MESH_OT_sort_elements(), MESH_OT_spin(), MESH_OT_split(), MESH_OT_split_normals(), MESH_OT_subdivide(), MESH_OT_subdivide_edgering(), MESH_OT_symmetrize(), MESH_OT_symmetry_snap(), MESH_OT_tris_convert_to_quads(), MESH_OT_unsubdivide(), MESH_OT_uv_texture_add(), MESH_OT_uv_texture_remove(), MESH_OT_uvs_reverse(), MESH_OT_uvs_rotate(), MESH_OT_vert_connect(), MESH_OT_vert_connect_concave(), MESH_OT_vert_connect_nonplanar(), MESH_OT_vert_connect_path(), MESH_OT_vertex_color_add(), MESH_OT_vertex_color_remove(), MESH_OT_vertices_smooth(), MESH_OT_vertices_smooth_laplacian(), MESH_OT_wireframe(), and WM_operatortype_append().

Referenced by ED_spacetypes_init().

◆ ED_vgroup_array_copy()

bool ED_vgroup_array_copy ( struct Object ob,
struct Object ob_from 
)

◆ ED_vgroup_data_clamp_range()

void ED_vgroup_data_clamp_range ( struct ID id,
int  total 
)

◆ ED_vgroup_mirror()

void ED_vgroup_mirror ( struct Object ob,
bool  mirror_weights,
bool  flip_vgroups,
bool  all_vgroups,
bool  use_topology,
int *  r_totmirr,
int *  r_totfail 
)

◆ ED_vgroup_parray_alloc()

bool ED_vgroup_parray_alloc ( struct ID id,
struct MDeformVert ***  dvert_arr,
int *  dvert_tot,
bool  use_vert_sel 
)

◆ ED_vgroup_parray_from_weight_array()

void ED_vgroup_parray_from_weight_array ( struct MDeformVert **  dvert_array,
int  dvert_tot,
const float dvert_weights,
int  def_nr,
bool  remove_zero 
)

◆ ED_vgroup_parray_mirror_assign()

void ED_vgroup_parray_mirror_assign ( struct Object ob,
struct MDeformVert **  dvert_array,
int  dvert_tot 
)

Fill in the pointers for mirror verts (as if all mirror verts were selected too).

similar to ED_vgroup_parray_mirror_sync but only fill in mirror points.

Definition at line 294 of file object_vgroup.c.

References BKE_editmesh_from_object(), BLI_assert, BMEditMesh::bm, BM_mesh_elem_table_ensure(), BM_VERT, Object::data, ED_mesh_mirror_get_vert(), ED_vgroup_parray_alloc(), MEM_freeN, and NULL.

Referenced by vgroup_clean_subset(), and vgroup_quantize_subset().

◆ ED_vgroup_parray_mirror_sync()

void ED_vgroup_parray_mirror_sync ( struct Object ob,
struct MDeformVert **  dvert_array,
int  dvert_tot,
const bool vgroup_validmap,
int  vgroup_tot 
)

For use with tools that use ED_vgroup_parray_alloc with use_vert_sel == true. This finds the unselected mirror deform verts and copies the weights to them from the selected.

Note
dvert_array has mirrored weights filled in, in case cleanup operations are needed on both.

Definition at line 251 of file object_vgroup.c.

References BKE_defvert_mirror_subset(), BKE_editmesh_from_object(), BKE_object_defgroup_flip_map(), BLI_assert, BMEditMesh::bm, BM_mesh_elem_table_ensure(), BM_VERT, Object::data, ED_mesh_mirror_get_vert(), ED_vgroup_parray_alloc(), MEM_freeN, and NULL.

Referenced by vgroup_invert_subset(), vgroup_levels_subset(), and vgroup_smooth_subset().

◆ ED_vgroup_parray_remove_zero()

void ED_vgroup_parray_remove_zero ( struct MDeformVert **  dvert_array,
int  dvert_tot,
const bool vgroup_validmap,
int  vgroup_tot,
float  epsilon,
bool  keep_single 
)

◆ ED_vgroup_parray_to_weight_array()

void ED_vgroup_parray_to_weight_array ( const struct MDeformVert **  dvert_array,
int  dvert_tot,
float dvert_weights,
int  def_nr 
)

◆ ED_vgroup_select_by_name()

void ED_vgroup_select_by_name ( struct Object ob,
const char *  name 
)

◆ ED_vgroup_sync_from_pose()

bool ED_vgroup_sync_from_pose ( struct Object ob)

◆ ED_vgroup_vert_active_mirror()

void ED_vgroup_vert_active_mirror ( struct Object ob,
int  def_nr 
)

◆ ED_vgroup_vert_add()

void ED_vgroup_vert_add ( struct Object ob,
struct bDeformGroup dg,
int  vertnum,
float  weight,
int  assignmode 
)

◆ ED_vgroup_vert_remove()

void ED_vgroup_vert_remove ( struct Object ob,
struct bDeformGroup dg,
int  vertnum 
)

◆ ED_vgroup_vert_weight()

float ED_vgroup_vert_weight ( struct Object ob,
struct bDeformGroup dg,
int  vertnum 
)

Definition at line 971 of file object_vgroup.c.

References BKE_object_defgroup_list(), BLI_findindex(), and get_vert_def_nr().

Referenced by heat_bone_weighting().

◆ EDBM_automerge()

void EDBM_automerge ( struct Object ob,
bool  update,
char  hflag,
float  dist 
)

◆ EDBM_automerge_and_split()

void EDBM_automerge_and_split ( struct Object ob,
bool  split_edges,
bool  split_faces,
bool  update,
char  hflag,
float  dist 
)

◆ EDBM_deselect_by_material()

bool EDBM_deselect_by_material ( struct BMEditMesh em,
short  index,
bool  select 
)

◆ EDBM_deselect_flush()

void EDBM_deselect_flush ( struct BMEditMesh em)

◆ EDBM_edge_find_nearest()

struct BMEdge* EDBM_edge_find_nearest ( struct ViewContext vc,
float dist_px_manhattan_p 
)

◆ EDBM_edge_find_nearest_ex()

struct BMEdge* EDBM_edge_find_nearest_ex ( struct ViewContext vc,
float dist_px_manhattan,
float r_dist_center,
bool  use_select_bias,
bool  use_cycle,
struct BMEdge **  r_eed_zbuf,
struct Base **  bases,
uint  bases_len,
uint r_base_index 
)

◆ EDBM_face_find_nearest()

struct BMFace* EDBM_face_find_nearest ( struct ViewContext vc,
float dist_px_manhattan_p 
)

◆ EDBM_face_find_nearest_ex()

struct BMFace* EDBM_face_find_nearest_ex ( struct ViewContext vc,
float dist_px_manhattan,
float r_dist_center,
bool  use_zbuf_single_px,
bool  use_select_bias,
bool  use_cycle,
struct BMFace **  r_efa_zbuf,
struct Base **  bases,
uint  bases_len,
uint r_base_index 
)
Parameters
use_zbuf_single_pxSpecial case, when using the back-buffer selection, only use the pixel at vc->mval instead of using dist_px_manhattan_p to search over a larger region. This is needed because historically selection worked this way for a long time, however it's reasonable that some callers might want to expand the region too. So add an argument to do this,

Definition at line 692 of file editmesh_select.c.

References BMEditMesh::bm, bm, BM_face_at_index_find_or_table(), data, ViewContext::depsgraph, NearestFaceUserData_Hit::dist, DRW_select_buffer_context_create(), DRW_select_buffer_find_nearest_to_point(), DRW_select_buffer_sample_point(), ED_view3d_backbuf_sample_size_clamp(), ED_view3d_init_mats_rv3d(), ED_view3d_viewcontext_init_object(), edbm_select_id_bm_elem_get(), ViewContext::em, NearestFaceUserData_Hit::face, find_nearest_face_center__doZBuf(), findnearestface__doClosest(), if(), NearestFaceUserData_Hit::index, mesh_foreachScreenFace(), ViewContext::mval, NULL, ViewContext::obedit, Base::object, ViewContext::region, ViewContext::rv3d, SCE_SELECT_FACE, UINT_MAX, ViewContext::v3d, V3D_PROJ_TEST_CLIP_DEFAULT, and XRAY_FLAG_ENABLED.

Referenced by EDBM_face_find_nearest(), and unified_findnearest().

◆ EDBM_flag_disable_all()

void EDBM_flag_disable_all ( struct BMEditMesh em,
char  hflag 
)

◆ EDBM_flag_enable_all()

void EDBM_flag_enable_all ( struct BMEditMesh em,
char  hflag 
)

◆ EDBM_mesh_clear()

void EDBM_mesh_clear ( struct BMEditMesh em)

◆ EDBM_mesh_deselect_all_multi()

bool EDBM_mesh_deselect_all_multi ( struct bContext C)

◆ EDBM_mesh_deselect_all_multi_ex()

bool EDBM_mesh_deselect_all_multi_ex ( struct Base **  bases,
uint  bases_len 
)

◆ EDBM_mesh_elem_index_ensure_multi()

void EDBM_mesh_elem_index_ensure_multi ( struct Object **  objects,
uint  objects_len,
char  htype 
)

◆ EDBM_mesh_free_data()

void EDBM_mesh_free_data ( struct BMEditMesh em)

Should only be called on the active edit-mesh, otherwise call BKE_editmesh_free_data.

Definition at line 333 of file editmesh_utils.c.

References BKE_editmesh_free_data(), ED_mesh_mirror_spatial_table_end(), ED_mesh_mirror_topo_table_end(), and NULL.

Referenced by ED_object_editmode_load_free_ex(), EDBM_mesh_make(), and undomesh_to_editmesh().

◆ EDBM_mesh_hide()

bool EDBM_mesh_hide ( struct BMEditMesh em,
bool  swap 
)

◆ EDBM_mesh_load()

void EDBM_mesh_load ( struct Main bmain,
struct Object ob 
)

Definition at line 328 of file editmesh_utils.c.

References EDBM_mesh_load_ex().

Referenced by object_hook_index_array(), and vertex_parent_set_exec().

◆ EDBM_mesh_load_ex()

void EDBM_mesh_load_ex ( struct Main bmain,
struct Object ob,
bool  free_data 
)
Warning
This can invalidate the Mesh runtime cache of other objects (for linked duplicates). Most callers should run DEG_id_tag_update on ob->data, see: T46738, T46913. This ensures BKE_object_free_derived_caches runs on all objects that use this mesh.

Definition at line 298 of file editmesh_utils.c.

References BLI_listbase_is_empty(), Key::block, BMEditMesh::bm, bm, BM_mesh_bm_to_me(), Object::data, Mesh::edit_mesh, Mesh::key, BMesh::shapenr, Object::shapenr, and UNLIKELY.

Referenced by ED_object_editmode_load_free_ex(), and EDBM_mesh_load().

◆ EDBM_mesh_make()

void EDBM_mesh_make ( struct Object ob,
int  select_mode,
bool  add_key_index 
)

◆ EDBM_mesh_normals_update()

void EDBM_mesh_normals_update ( struct BMEditMesh em)

◆ EDBM_mesh_normals_update_ex()

void EDBM_mesh_normals_update_ex ( struct BMEditMesh em,
const struct BMeshNormalsUpdate_Params params 
)

Definition at line 1457 of file editmesh_utils.c.

References BMEditMesh::bm, BM_mesh_normals_update_ex(), and params.

Referenced by EDBM_mesh_normals_update().

◆ EDBM_mesh_reveal()

bool EDBM_mesh_reveal ( struct BMEditMesh em,
bool  select 
)

◆ EDBM_mesh_stats_multi()

void EDBM_mesh_stats_multi ( struct Object **  objects,
uint  objects_len,
int  totelem[3],
int  totelem_sel[3] 
)

◆ EDBM_preselect_action_get()

eEditMesh_PreSelPreviewAction EDBM_preselect_action_get ( struct EditMesh_PreSelElem psel)

◆ EDBM_preselect_action_set()

void EDBM_preselect_action_set ( struct EditMesh_PreSelElem psel,
eEditMesh_PreSelPreviewAction  action 
)

◆ EDBM_preselect_edgering_clear()

void EDBM_preselect_edgering_clear ( struct EditMesh_PreSelEdgeRing psel)

◆ EDBM_preselect_edgering_create()

struct EditMesh_PreSelEdgeRing* EDBM_preselect_edgering_create ( void  )

Definition at line 123 of file editmesh_preselect_edgering.c.

References MEM_callocN.

Referenced by gizmo_preselect_edgering_setup(), and ringsel_init().

◆ EDBM_preselect_edgering_destroy()

void EDBM_preselect_edgering_destroy ( struct EditMesh_PreSelEdgeRing psel)

◆ EDBM_preselect_edgering_draw()

void EDBM_preselect_edgering_draw ( struct EditMesh_PreSelEdgeRing psel,
const float  matrix[4][4] 
)

◆ EDBM_preselect_edgering_update_from_edge()

void EDBM_preselect_edgering_update_from_edge ( struct EditMesh_PreSelEdgeRing psel,
struct BMesh bm,
struct BMEdge eed_start,
int  previewlines,
const float(*)  coords[3] 
)

◆ EDBM_preselect_elem_clear()

void EDBM_preselect_elem_clear ( struct EditMesh_PreSelElem psel)

◆ EDBM_preselect_elem_create()

struct EditMesh_PreSelElem* EDBM_preselect_elem_create ( void  )

◆ EDBM_preselect_elem_destroy()

void EDBM_preselect_elem_destroy ( struct EditMesh_PreSelElem psel)

◆ EDBM_preselect_elem_draw()

void EDBM_preselect_elem_draw ( struct EditMesh_PreSelElem psel,
const float  matrix[4][4] 
)

◆ EDBM_preselect_elem_update_from_single()

void EDBM_preselect_elem_update_from_single ( struct EditMesh_PreSelElem psel,
struct BMesh bm,
struct BMElem ele,
const float(*)  coords[3] 
)

◆ EDBM_preselect_elem_update_preview()

void EDBM_preselect_elem_update_preview ( struct EditMesh_PreSelElem psel,
struct ViewContext vc,
struct BMesh bm,
struct BMElem ele,
const int  mval[2] 
)

◆ EDBM_preselect_preview_clear()

void EDBM_preselect_preview_clear ( struct EditMesh_PreSelElem psel)

◆ EDBM_project_snap_verts()

void EDBM_project_snap_verts ( struct bContext C,
struct Depsgraph depsgraph,
struct ARegion region,
struct Object obedit,
struct BMEditMesh em 
)

◆ EDBM_redo_state_free()

void void void EDBM_redo_state_free ( struct BMBackup backup)

◆ EDBM_redo_state_restore()

void EDBM_redo_state_restore ( struct BMBackup backup,
struct BMEditMesh em,
bool  recalc_looptri 
)

Restore a BMesh from backup.

Referenced by edbm_bevel_calc(), edbm_inset_calc(), and mesh_bisect_exec().

◆ EDBM_redo_state_restore_and_free()

void void EDBM_redo_state_restore_and_free ( struct BMBackup backup,
struct BMEditMesh em,
bool  recalc_looptri 
)

Delete the backup, flushing it to an edit-mesh.

Referenced by edbm_bevel_cancel(), edbm_connect_vert_pair(), and edbm_inset_cancel().

◆ EDBM_redo_state_store()

struct BMBackup EDBM_redo_state_store ( struct BMEditMesh em)

Save a copy of the BMesh for restoring later.

Definition at line 57 of file editmesh_utils.c.

References backup, BMEditMesh::bm, and BM_mesh_copy().

Referenced by edbm_bevel_init(), edbm_connect_vert_pair(), edbm_inset_init(), and mesh_bisect_invoke().

◆ EDBM_select_flush()

void EDBM_select_flush ( struct BMEditMesh em)

◆ EDBM_select_interior_faces()

bool EDBM_select_interior_faces ( struct BMEditMesh em)

◆ EDBM_select_less()

void EDBM_select_less ( struct BMEditMesh em,
bool  use_face_step 
)

◆ EDBM_select_mirrored()

void EDBM_select_mirrored ( struct BMEditMesh em,
const struct Mesh me,
int  axis,
bool  extend,
int *  r_totmirr,
int *  r_totfail 
)

◆ EDBM_select_more()

void EDBM_select_more ( struct BMEditMesh em,
bool  use_face_step 
)

flushes based on the current select mode. If in vertex select mode, verts select/deselect edges and faces, if in edge select mode, edges select/deselect faces and vertices, and in face select mode faces select/deselect edges and vertices.

Definition at line 390 of file editmesh_utils.c.

References BMEditMesh::bm, BM_ALL_NOLOOP, BM_ELEM_SELECT, BMO_FLAG_DEFAULTS, BMO_op_exec(), BMO_op_finish(), BMO_op_initf(), BMO_slot_buffer_hflag_enable(), EDBM_selectmode_flush(), SCE_SELECT_FACE, BMEditMesh::selectmode, and BMOperator::slots_out.

Referenced by edbm_select_more_exec(), and uv_select_more_less().

◆ EDBM_select_pick()

bool EDBM_select_pick ( struct bContext C,
const int  mval[2],
const struct SelectPick_Params params 
)

◆ EDBM_select_swap()

void EDBM_select_swap ( struct BMEditMesh em)

◆ EDBM_select_toggle_all()

void EDBM_select_toggle_all ( struct BMEditMesh em)

◆ EDBM_selectmode_convert()

void EDBM_selectmode_convert ( struct BMEditMesh em,
short  selectmode_old,
short  selectmode_new 
)

◆ EDBM_selectmode_disable()

bool EDBM_selectmode_disable ( struct Scene scene,
struct BMEditMesh em,
short  selectmode_disable,
short  selectmode_fallback 
)

Use to disable a select-mode if its enabled, Using another mode as a fallback if the disabled mode is the only mode set.

Returns
true if the mode is changed.

Definition at line 2609 of file editmesh_select.c.

References EDBM_selectmode_set(), NC_SCENE, ND_TOOLSETTINGS, scene, BMEditMesh::selectmode, ToolSettings::selectmode, Scene::toolsettings, and WM_main_add_notifier().

Referenced by EDBM_selectmode_disable_multi_ex(), and knifeproject_exec().

◆ EDBM_selectmode_disable_multi()

bool EDBM_selectmode_disable_multi ( struct bContext C,
short  selectmode_disable,
short  selectmode_fallback 
)

◆ EDBM_selectmode_disable_multi_ex()

bool EDBM_selectmode_disable_multi_ex ( struct Scene scene,
struct Base **  bases,
uint  bases_len,
short  selectmode_disable,
short  selectmode_fallback 
)

◆ EDBM_selectmode_flush()

void EDBM_selectmode_flush ( struct BMEditMesh em)

◆ EDBM_selectmode_flush_ex()

void EDBM_selectmode_flush_ex ( struct BMEditMesh em,
short  selectmode 
)

◆ EDBM_selectmode_set()

void EDBM_selectmode_set ( struct BMEditMesh em)

◆ EDBM_selectmode_set_multi()

bool EDBM_selectmode_set_multi ( struct bContext C,
short  selectmode 
)

◆ EDBM_selectmode_to_scene()

void EDBM_selectmode_to_scene ( struct bContext C)

◆ EDBM_selectmode_toggle_multi()

bool EDBM_selectmode_toggle_multi ( struct bContext C,
short  selectmode_new,
int  action,
bool  use_extend,
bool  use_expand 
)

◆ EDBM_unified_findnearest()

bool EDBM_unified_findnearest ( struct ViewContext vc,
struct Base **  bases,
uint  bases_len,
int *  r_base_index,
struct BMVert **  r_eve,
struct BMEdge **  r_eed,
struct BMFace **  r_efa 
)

Definition at line 982 of file editmesh_select.c.

References unified_findnearest().

Referenced by edbm_shortest_path_pick_invoke(), and mouse_mesh_loop().

◆ EDBM_unified_findnearest_from_raycast()

bool EDBM_unified_findnearest_from_raycast ( struct ViewContext vc,
struct Base **  bases,
uint  bases_len,
bool  use_boundary_vertices,
bool  use_boundary_edges,
int *  r_base_index_vert,
int *  r_base_index_edge,
int *  r_base_index_face,
struct BMVert **  r_eve,
struct BMEdge **  r_eed,
struct BMFace **  r_efa 
)

◆ EDBM_update()

void EDBM_update ( struct Mesh me,
const struct EDBMUpdate_Params params 
)

So many tools call these that we better make it a generic function.

Definition at line 1499 of file editmesh_utils.c.

References BKE_editmesh_looptri_and_normals_calc(), BKE_editmesh_looptri_calc(), BLI_assert, BMEditMesh::bm, BM_elem_flag_test, BM_ELEM_SELECT, BM_lnorspace_invalidate(), BM_mesh_elem_table_check(), BM_SPACEARR_BMO_SET, DEG_id_tag_update(), EDBM_mesh_normals_update(), Mesh::edit_mesh, BMEditSelection::ele, ListBase::first, Mesh::id, ID_RECALC_GEOMETRY, mesh, NC_GEOM, ND_DATA, BMEditSelection::next, params, BMesh::selected, BMesh::spacearr_dirty, and WM_main_add_notifier().

Referenced by add_primitive_cube_gizmo_exec(), ED_object_data_xform_tag_update(), edbm_add_edge_face_exec(), EDBM_automerge(), EDBM_automerge_and_split(), edbm_average_normals_exec(), edbm_beautify_fill_exec(), edbm_bevel_calc(), edbm_bevel_cancel(), edbm_blend_from_shape_exec(), edbm_bridge_edge_loops_for_single_editmesh(), edbm_collapse_edge_exec(), edbm_connect_vert_pair(), edbm_decimate_exec(), edbm_delete_edgeloop_exec(), edbm_delete_exec(), edbm_delete_loose_exec(), edbm_dissolve_degenerate_exec(), edbm_dissolve_edges_exec(), edbm_dissolve_faces_exec(), edbm_dissolve_limited_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_edge_rotate_selected_exec(), edbm_edge_split_selected_edges(), edbm_edge_split_selected_verts(), edbm_extrude_context_exec(), edbm_extrude_edges_exec(), edbm_extrude_faces_exec(), edbm_extrude_region_exec(), edbm_extrude_repeat_exec(), edbm_extrude_verts_exec(), edbm_face_make_planar_exec(), edbm_face_split_by_edges_exec(), edbm_faces_shade_flat_exec(), edbm_faces_shade_smooth_exec(), edbm_fill_exec(), edbm_fill_grid_exec(), edbm_fill_holes_exec(), edbm_flip_normals_custom_loop_normals(), edbm_flip_normals_face_winding(), edbm_hide_exec(), edbm_inset_calc(), edbm_inset_cancel(), edbm_intersect_select(), edbm_knife_cut_exec(), edbm_mark_seam_exec(), edbm_mark_sharp_exec(), edbm_merge_exec(), edbm_mod_weighted_strength_exec(), edbm_normals_make_consistent_exec(), edbm_normals_tools_exec(), edbm_offset_edgeloop_exec(), edbm_point_normals_exec(), edbm_point_normals_modal(), edbm_poke_face_exec(), edbm_polybuild_delete_at_cursor_invoke(), edbm_polybuild_dissolve_at_cursor_invoke(), edbm_polybuild_face_at_cursor_invoke(), edbm_polybuild_split_at_cursor_invoke(), edbm_polybuild_transform_at_cursor_invoke(), edbm_quads_convert_to_tris_exec(), edbm_remove_doubles_exec(), edbm_reveal_exec(), edbm_reverse_colors_exec(), edbm_reverse_uvs_exec(), edbm_rip_edge_invoke(), edbm_rip_invoke(), edbm_rotate_colors_exec(), edbm_rotate_uvs_exec(), edbm_screw_exec(), edbm_select_nth_exec(), edbm_separate_exec(), edbm_set_normals_from_faces_exec(), edbm_shape_propagate_to_all_exec(), edbm_smooth_normals_exec(), edbm_solidify_exec(), edbm_spin_exec(), edbm_split_exec(), edbm_subdivide_edge_ring_exec(), edbm_subdivide_exec(), edbm_tris_convert_to_quads_exec(), edbm_unsubdivide_exec(), EDBM_update_extern(), edbm_vert_connect_concave_exec(), edbm_vert_connect_nonplaner_exec(), edbm_vert_connect_path_exec(), edbm_wireframe_exec(), knifetool_finish_single_post(), make_prim_finish(), mesh_bisect_exec(), mesh_symmetrize_exec(), mesh_symmetry_snap_exec(), mouse_mesh_shortest_path_edge(), mouse_mesh_shortest_path_face(), mouse_mesh_shortest_path_vert(), normals_split_merge(), ringsel_finish(), similar_edge_select_exec(), similar_face_select_exec(), similar_vert_select_exec(), sort_bmelem_flag(), uv_hide_exec(), and uv_reveal_exec().

◆ EDBM_update_extern()

void EDBM_update_extern ( struct Mesh me,
bool  do_tessellation,
bool  is_destructive 
)

Bad level call from Python API.

Definition at line 1543 of file editmesh_utils.c.

References EDBM_update().

◆ EDBM_uv_active_face_get()

struct BMFace* EDBM_uv_active_face_get ( struct BMEditMesh em,
bool  sloppy,
bool  selected 
)

last_sel, use em->act_face otherwise get the last selected face in the editselections at the moment, last_sel is mainly useful for making sure the space image doesn't flicker.

Definition at line 1058 of file editmesh_utils.c.

References BMEditMesh::bm, BM_mesh_active_face_get(), EDBM_uv_check(), and NULL.

Referenced by mesh_render_data_create().

◆ EDBM_uv_check()

bool EDBM_uv_check ( struct BMEditMesh em)

◆ EDBM_vert_color_check()

bool EDBM_vert_color_check ( struct BMEditMesh em)

◆ EDBM_vert_find_nearest()

struct BMVert* EDBM_vert_find_nearest ( struct ViewContext vc,
float dist_px_manhattan_p 
)

◆ EDBM_vert_find_nearest_ex()

struct BMVert* EDBM_vert_find_nearest_ex ( struct ViewContext vc,
float dist_px_manhattan_p,
bool  use_select_bias,
bool  use_cycle,
struct Base **  bases,
uint  bases_len,
uint r_base_index 
)

◆ EDBM_verts_mirror_apply()

void EDBM_verts_mirror_apply ( struct BMEditMesh em,
int  sel_from,
int  sel_to 
)

◆ EDBM_verts_mirror_cache_begin()

void EDBM_verts_mirror_cache_begin ( struct BMEditMesh em,
int  axis,
bool  use_self,
bool  use_select,
bool  respecthide,
bool  use_topology 
)

◆ EDBM_verts_mirror_cache_begin_ex()

void EDBM_verts_mirror_cache_begin_ex ( struct BMEditMesh em,
int  axis,
bool  use_self,
bool  use_select,
bool  respecthide,
bool  use_topology,
float  maxdist,
int *  r_index 
)
Parameters
emEdit-mesh used for generating mirror data.
use_selfAllow a vertex to point to itself (middle verts).
use_selectRestrict to selected verts.
respecthideSkip hidden vertices.
use_topologyUse topology mirror.
maxdistDistance for close point test.
r_indexOptional array to write into, as an alternative to a custom-data layer (length of total verts).

Definition at line 1119 of file editmesh_utils.c.

References BLI_assert, BMEditMesh::bm, bm, BM_CD_LAYER_ID, BM_data_layer_add_named(), BM_elem_flag_test, BM_ELEM_HIDDEN, BM_elem_index_get, BM_ELEM_SELECT, BM_ITER_MESH_INDEX, BM_mesh_elem_index_ensure(), BM_mesh_elem_table_ensure(), BM_VERT, BM_vert_at_index(), BM_VERTS_OF_MESH, cache_mirr_intptr_as_bmvert(), CD_FLAG_TEMPORARY, CD_PROP_INT32, BMVert::co, copy_v3_v3(), CustomData_get_layer_index(), CustomData_get_n_offset(), CustomData_get_named_layer_index(), ED_mesh_mirrtopo_free(), ED_mesh_mirrtopo_init(), CustomDataLayer::flag, MirrTopoStore_t::index_lookup, CustomData::layers, len_squared_v3v3(), mesh_topo_store, BMEditMesh::mirror_cdlayer, NULL, square_f(), BMesh::totvert, tree, v, BMesh::vdata, and VERT_INTPTR.

Referenced by EDBM_verts_mirror_cache_begin(), mesh_symmetry_snap_exec(), and transform_convert_mesh_mirrordata_calc().

◆ EDBM_verts_mirror_cache_clear()

void EDBM_verts_mirror_cache_clear ( struct BMEditMesh em,
struct BMVert v 
)

◆ EDBM_verts_mirror_cache_end()

void EDBM_verts_mirror_cache_end ( struct BMEditMesh em)

◆ EDBM_verts_mirror_get()

struct BMVert* EDBM_verts_mirror_get ( struct BMEditMesh em,
struct BMVert v 
)

◆ EDBM_verts_mirror_get_edge()

struct BMEdge* EDBM_verts_mirror_get_edge ( struct BMEditMesh em,
struct BMEdge e 
)

Definition at line 1273 of file editmesh_utils.c.

References BM_edge_exists(), e, EDBM_verts_mirror_get(), LIKELY, and NULL.

Referenced by EDBM_select_mirrored().

◆ EDBM_verts_mirror_get_face()

struct BMFace* EDBM_verts_mirror_get_face ( struct BMEditMesh em,
struct BMFace f 
)

◆ editbmesh_get_x_mirror_vert()

struct BMVert* editbmesh_get_x_mirror_vert ( struct Object ob,
struct BMEditMesh em,
struct BMVert eve,
const float  co[3],
int  index,
bool  use_topology 
)

◆ em_setup_viewcontext()

void em_setup_viewcontext ( struct bContext C,
struct ViewContext vc 
)

◆ mesh_get_x_mirror_faces()

int* mesh_get_x_mirror_faces ( struct Object ob,
struct BMEditMesh em,
struct Mesh me_eval 
)

◆ mesh_get_x_mirror_vert()

int mesh_get_x_mirror_vert ( struct Object ob,
struct Mesh me_eval,
int  index,
bool  use_topology 
)

◆ paintface_deselect_all_visible()

bool paintface_deselect_all_visible ( struct bContext C,
struct Object ob,
int  action,
bool  flush_flags 
)

◆ paintface_flush_flags()

void paintface_flush_flags ( struct bContext C,
struct Object ob,
short  flag 
)

◆ paintface_hide()

void paintface_hide ( struct bContext C,
struct Object ob,
bool  unselected 
)

◆ paintface_minmax()

bool paintface_minmax ( struct Object ob,
float  r_min[3],
float  r_max[3] 
)

◆ paintface_mouse_select()

bool paintface_mouse_select ( struct bContext C,
const int  mval[2],
const struct SelectPick_Params params,
struct Object ob 
)
Returns
True when pick finds an element or the selection changed.

Referenced by view3d_select_exec().

◆ paintface_reveal()

void paintface_reveal ( struct bContext C,
struct Object ob,
bool  select 
)

◆ paintface_select_linked()

void paintface_select_linked ( struct bContext C,
struct Object ob,
const int  mval[2],
bool  select 
)

◆ paintvert_deselect_all_visible()

bool paintvert_deselect_all_visible ( struct Object ob,
int  action,
bool  flush_flags 
)

◆ paintvert_flush_flags()

void paintvert_flush_flags ( struct Object ob)

◆ paintvert_hide()

void paintvert_hide ( struct bContext C,
struct Object ob,
bool  unselected 
)

◆ paintvert_reveal()

void paintvert_reveal ( struct bContext C,
struct Object ob,
bool  select 
)

◆ paintvert_select_ungrouped()

void paintvert_select_ungrouped ( struct Object ob,
bool  extend,
bool  flush_flags 
)

◆ paintvert_tag_select_update()

void paintvert_tag_select_update ( struct bContext C,
struct Object ob 
)