Blender
V3.3
|
#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 } |
typedef struct MirrTopoStore_t MirrTopoStore_t |
struct UvElement* BM_uv_element_get | ( | struct UvElementMap * | map, |
struct BMFace * | efa, | ||
struct BMLoop * | l | ||
) |
Definition at line 1041 of file editmesh_utils.c.
References BM_elem_index_get, element, l, map, NULL, and BMLoop::v.
Referenced by bm_uv_edge_select_build_islands(), createTransUVs(), stitch_init(), stitch_process_data(), stitch_select(), stitch_uv_edge_generate_linked_edges(), uv_edge_get(), uv_element_offset_from_face_get(), uv_isolate_selected_islands(), and uv_sculpt_stroke_init().
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().
void BM_uv_element_map_free | ( | struct UvElementMap * | element_map | ) |
Definition at line 1025 of file editmesh_utils.c.
References UvElementMap::buf, UvElementMap::islandIndices, MEM_freeN, and UvElementMap::vert.
Referenced by createTransUVs(), state_delete(), uv_isolate_selected_islands(), uv_sculpt_stroke_exit(), and uvedit_uv_straighten().
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().
Return a new UvVertMap from the edit-mesh.
Definition at line 453 of file editmesh_utils.c.
References Freestyle::a, BKE_mesh_uv_vert_map_free(), BLI_buffer_declare_static, BLI_buffer_free, BLI_BUFFER_NOP, BLI_buffer_reinit_data, bm, BM_DEFAULT_NGON_STACK_SIZE, BM_ELEM_CD_GET_VOID_P, BM_elem_flag_test, BM_elem_index_get, BM_ELEM_SELECT, BM_FACE, BM_face_at_index(), BM_FACES_OF_MESH, BM_iter_at_index(), BM_ITER_ELEM_INDEX, BM_ITER_MESH, BM_ITER_MESH_INDEX, BM_LOOPS_OF_FACE, BM_mesh_elem_index_ensure(), BM_VERT, BM_VERTS_OF_MESH, UvVertMap::buf, CD_MLOOPUV, compare_v2v2(), copy_v2_v2(), cross_poly_v2(), CustomData_get_offset(), float(), l, BMesh::ldata, BMFace::len, UvMapVert::loop_of_poly_index, MEM_callocN, MEM_freeN, UvMapVert::next, next, NULL, UvMapVert::poly_index, UvMapVert::separate, STD_UV_CONNECT_LIMIT, BMesh::totface, BMesh::totvert, MLoopUV::uv, BMLoop::v, v, and UvVertMap::vert.
Referenced by uv_select_flush_from_loop_edge_flag(), uv_select_flush_from_tag_face(), uv_select_flush_from_tag_loop(), and uv_select_linked_multi().
Definition at line 1012 of file editmesh_utils.c.
References UvVertMap::buf, MEM_freeN, and UvVertMap::vert.
Referenced by uv_select_flush_from_loop_edge_flag(), uv_select_flush_from_tag_face(), uv_select_flush_from_tag_loop(), and uv_select_linked_multi().
bool BMBVH_EdgeVisible | ( | struct BMBVHTree * | tree, |
struct BMEdge * | e, | ||
struct Depsgraph * | depsgraph, | ||
struct ARegion * | region, | ||
struct View3D * | v3d, | ||
struct Object * | obedit | ||
) |
Definition at line 1700 of file editmesh_utils.c.
References add_v3_v3v3(), BMVert::co, copy_v3_v3(), depsgraph, e, ED_view3d_win_to_segment_clipped(), edge_ray_cast(), blender::robust_pred::epsilon, invert_m4_m4(), mid_v3_v3v3(), mul_m4_v3(), normalize_v3(), normalize_v3_length(), NULL, Object::obmat, scale_point(), sub_v3_v3v3(), tree, ARegion::winx, and ARegion::winy.
Referenced by calcEdgeSlide_mval_range().
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().
struct MDeformVert* ED_mesh_active_dvert_get_em | ( | struct Object * | ob, |
struct BMVert ** | r_eve | ||
) |
Definition at line 1432 of file meshtools.cc.
References BLI_listbase_is_empty(), BMEditMesh::bm, bm, BM_ELEM_CD_GET_VOID_P, BM_mesh_active_vert_get(), CD_MDEFORMVERT, CustomData_get_offset(), Object::data, Mesh::edit_mesh, Object::mode, OB_MESH, OB_MODE_EDIT, Object::type, BMesh::vdata, and Mesh::vertex_group_names.
Referenced by ED_mesh_active_dvert_get_only(), ED_vgroup_vert_active_mirror(), vgroup_copy_active_to_sel(), vgroup_copy_active_to_sel_single(), and vgroup_normalize_active_vertex().
struct MDeformVert* ED_mesh_active_dvert_get_ob | ( | struct Object * | ob, |
int * | r_index | ||
) |
Definition at line 1459 of file meshtools.cc.
References BKE_mesh_mselect_active_get(), Object::data, Mesh::dvert, and ME_VSEL.
Referenced by ED_mesh_active_dvert_get_only(), ED_vgroup_vert_active_mirror(), vgroup_copy_active_to_sel(), vgroup_copy_active_to_sel_single(), and vgroup_normalize_active_vertex().
struct MDeformVert* ED_mesh_active_dvert_get_only | ( | struct Object * | ob | ) |
Definition at line 1472 of file meshtools.cc.
References ED_mesh_active_dvert_get_em(), ED_mesh_active_dvert_get_ob(), Object::mode, OB_MESH, OB_MODE_EDIT, and Object::type.
Referenced by vgroup_remove_weight(), view3d_panel_vgroup(), and view3d_panel_vgroup_poll().
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().
Definition at line 423 of file mesh_data.cc.
References BKE_id_attributes_active_color_get(), BKE_id_attributes_active_color_set(), BKE_mesh_update_customdata_pointers(), BLI_assert, CD_DEFAULT, CD_PROP_BYTE_COLOR, CustomData_add_layer_named(), CustomData_get_layer_index(), DEG_id_tag_update(), Mesh::edit_mesh, Mesh::id, CustomData::layers, Mesh::ldata, and Mesh::totloop.
Referenced by ed_vwpaintmode_enter_generic(), vertex_color_brightness_contrast_exec(), vertex_color_hsv_exec(), vertex_color_invert_exec(), vertex_color_levels_exec(), vertex_color_set(), vertex_color_smooth(), vertex_paint_from_weight(), and vpaint_stroke_test_start().
Definition at line 461 of file mesh_data.cc.
References CD_PROP_BYTE_COLOR, CustomData_get_active_layer(), ED_mesh_color_remove_index(), and GET_CD_DATA.
Referenced by mesh_vertex_color_remove_exec().
Definition at line 442 of file mesh_data.cc.
References CD_PROP_BYTE_COLOR, CustomData_get_layer_index_n(), DEG_id_tag_update(), delete_customdata_layer(), GET_CD_DATA, Mesh::id, if(), CustomData::layers, NC_GEOM, ND_DATA, and WM_main_add_notifier().
Referenced by ED_mesh_color_remove_active(), and ED_mesh_color_remove_named().
Definition at line 470 of file mesh_data.cc.
References CD_PROP_BYTE_COLOR, CustomData_get_named_layer(), ED_mesh_color_remove_index(), and GET_CD_DATA.
Referenced by output_toggle_exec().
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().
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.
void ED_mesh_edges_remove | ( | struct Mesh * | mesh, |
struct ReportList * | reports, | ||
int | count | ||
) |
Definition at line 1326 of file mesh_data.cc.
References BKE_report(), count, Mesh::edit_mesh, mesh, mesh_remove_edges(), RPT_ERROR, and Mesh::totedge.
Definition at line 1368 of file mesh_data.cc.
References mesh, mesh_remove_edges(), mesh_remove_loops(), mesh_remove_polys(), mesh_remove_verts(), Mesh::totedge, Mesh::totloop, Mesh::totpoly, and Mesh::totvert.
Referenced by mesh_separate_loose().
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().
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.
void ED_mesh_loops_remove | ( | struct Mesh * | mesh, |
struct ReportList * | reports, | ||
int | count | ||
) |
Definition at line 1340 of file mesh_data.cc.
References BKE_report(), count, Mesh::edit_mesh, mesh, mesh_remove_loops(), RPT_ERROR, and Mesh::totloop.
int ED_mesh_mirror_get_vert | ( | struct Object * | ob, |
int | index | ||
) |
Wrapper for object-mode/edit-mode.
call BM_mesh_elem_table_ensure first for edit-mesh.
Definition at line 986 of file meshtools.cc.
References BMEditMesh::bm, BM_elem_index_get, BM_vert_at_index(), BMVert::co, Object::data, Mesh::edit_mesh, editbmesh_get_x_mirror_vert(), Mesh::editflag, ME_EDIT_MIRROR_TOPO, and mesh_get_x_mirror_vert().
Referenced by ED_vgroup_parray_mirror_assign(), and ED_vgroup_parray_mirror_sync().
void ED_mesh_mirror_spatial_table_begin | ( | struct Object * | ob, |
struct BMEditMesh * | em, | ||
struct Mesh * | me_eval | ||
) |
Definition at line 33 of file editors/mesh/mesh_mirror.c.
References BMEditMesh::bm, BM_ITER_MESH_INDEX, BM_mesh_elem_table_ensure(), BM_VERT, BM_VERTS_OF_MESH, BMVert::co, MVert::co, Object::data, ED_mesh_mirror_spatial_table_end(), Mesh::edit_mesh, MirrKdStore, Mesh::mvert, BMesh::totvert, and Mesh::totvert.
Referenced by ED_mesh_mirror_spatial_table_lookup(), mesh_get_x_mirror_faces(), and object_shape_key_mirror().
int ED_mesh_mirror_spatial_table_lookup | ( | struct Object * | ob, |
struct BMEditMesh * | em, | ||
struct Mesh * | me_eval, | ||
const float | co[3] | ||
) |
Definition at line 69 of file editors/mesh/mesh_mirror.c.
References ED_mesh_mirror_spatial_table_begin(), KD_THRESH, MirrKdStore, and NULL.
Referenced by editbmesh_get_x_mirror_vert_spatial(), and mesh_get_x_mirror_vert_spatial().
Mode is 's' start, or 'e' end, or 'u' use if end, ob can be NULL.
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().
Referenced by ED_editors_exit(), ED_object_editmode_load_free_ex(), ed_vwpaintmode_exit_generic(), and EDBM_mesh_free_data().
void ED_mesh_mirrtopo_free | ( | MirrTopoStore_t * | mesh_topo_store | ) |
Definition at line 352 of file editors/mesh/mesh_mirror.c.
References MirrTopoStore_t::index_lookup, MEM_SAFE_FREE, mesh_topo_store, MirrTopoStore_t::prev_edge_tot, and MirrTopoStore_t::prev_vert_tot.
Referenced by ED_mesh_mirror_topo_table_end(), ED_mesh_mirrtopo_init(), and EDBM_verts_mirror_cache_begin_ex().
void ED_mesh_mirrtopo_init | ( | struct BMEditMesh * | em, |
struct Mesh * | me, | ||
MirrTopoStore_t * | mesh_topo_store, | ||
bool | skip_em_vert_array_init | ||
) |
Definition at line 158 of file editors/mesh/mesh_mirror.c.
References Freestyle::a, BLI_assert, BMEditMesh::bm, BM_EDGES_OF_MESH, BM_elem_index_get, BM_ITER_MESH, BM_mesh_elem_index_ensure(), BM_mesh_elem_table_ensure(), BM_VERT, ED_mesh_mirrtopo_free(), hash, MirrTopoVert_t::hash, i1, MirrTopoStore_t::index_lookup, Mesh::medge, MEM_callocN, MEM_dupallocN, MEM_freeN, MEM_mallocN, mesh_topo_store, mirrtopo_hash_sort(), mirrtopo_vert_sort(), NULL, MirrTopoStore_t::prev_edge_tot, MirrTopoStore_t::prev_is_editmode, MirrTopoStore_t::prev_vert_tot, BMesh::totedge, Mesh::totedge, BMesh::totvert, Mesh::totvert, BMEdge::v1, BMEdge::v2, MirrTopoVert_t::v_index, and BMesh::vtable.
Referenced by ED_mesh_mirror_topo_table_begin(), and EDBM_verts_mirror_cache_begin_ex().
bool ED_mesh_mirrtopo_recalc_check | ( | struct BMEditMesh * | em, |
struct Mesh * | me, | ||
MirrTopoStore_t * | mesh_topo_store | ||
) |
Definition at line 135 of file editors/mesh/mesh_mirror.c.
References BMEditMesh::bm, MirrTopoStore_t::index_lookup, mesh_topo_store, NULL, MirrTopoStore_t::prev_edge_tot, MirrTopoStore_t::prev_is_editmode, MirrTopoStore_t::prev_vert_tot, BMesh::totedge, Mesh::totedge, BMesh::totvert, and Mesh::totvert.
Referenced by ed_mesh_mirror_topo_table_update().
bool ED_mesh_pick_face | ( | struct bContext * | C, |
struct Object * | ob, | ||
const int | mval[2], | ||
uint | dist_px, | ||
uint * | r_index | ||
) |
Face selection in object mode, currently only weight-paint and vertex-paint use this.
Definition at line 1179 of file meshtools.cc.
References BLI_assert, C, CTX_data_ensure_evaluated_depsgraph(), Object::data, depsgraph, ViewContext::depsgraph, DRW_select_buffer_find_nearest_to_point(), DRW_select_buffer_sample_point(), ED_view3d_select_id_validate(), ED_view3d_viewcontext_init(), GS, Mesh::id, ID_ME, ID::name, ViewContext::region, Mesh::totpoly, and ViewContext::v3d.
Referenced by ED_mesh_pick_face_vert(), paintface_mouse_select(), paintface_select_linked(), weight_paint_sample_enum_itemf(), and weight_sample_invoke().
bool ED_mesh_pick_face_vert | ( | struct bContext * | C, |
struct Object * | ob, | ||
const int | mval[2], | ||
uint | dist_px, | ||
uint * | r_index | ||
) |
Use when the back buffer stores face index values. but we want a vert. This gets the face then finds the closest vertex to mval.
Definition at line 1241 of file meshtools.cc.
References BLI_assert, C, CD_MASK_BAREMESH_ORIGINDEX, CD_ORIGINDEX, CTX_data_ensure_evaluated_depsgraph(), CTX_wm_region(), CustomData_get_layer(), Object::data, DEG_get_evaluated_object(), DEG_get_evaluated_scene(), depsgraph, ED_mesh_pick_face(), ed_mesh_pick_face_vert__mpoly_find(), float(), GS, Mesh::id, ID_ME, mesh_get_eval_final(), Mesh::mloop, Mesh::mpoly, Mesh::mvert, ID::name, ORIGINDEX_NONE, Mesh::pdata, Mesh::totpoly, Mesh::totvert, and Mesh::vdata.
Referenced by weight_sample_invoke().
bool ED_mesh_pick_vert | ( | struct bContext * | C, |
struct Object * | ob, | ||
const int | mval[2], | ||
uint | dist_px, | ||
bool | use_zbuf, | ||
uint * | r_index | ||
) |
Definition at line 1359 of file meshtools.cc.
References BKE_mesh_foreach_mapped_vert(), BLI_assert, C, CD_MASK_BAREMESH, CTX_data_ensure_evaluated_depsgraph(), data, Object::data, DEG_get_evaluated_object(), DEG_get_evaluated_scene(), depsgraph, ViewContext::depsgraph, DRW_select_buffer_find_nearest_to_point(), DRW_select_buffer_sample_point(), ed_mesh_pick_vert__mapFunc(), ED_view3d_init_mats_rv3d(), ED_view3d_select_id_validate(), ED_view3d_viewcontext_init(), float(), GS, Mesh::id, ID_ME, MESH_FOREACH_NOP, mesh_get_eval_final(), Mesh::mvert, ID::name, ViewContext::region, ARegion::regiondata, Mesh::totvert, and ViewContext::v3d.
Referenced by ed_wpaint_vertex_select_pick(), weight_paint_sample_enum_itemf(), and weight_sample_invoke().
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.
void ED_mesh_polys_remove | ( | struct Mesh * | mesh, |
struct ReportList * | reports, | ||
int | count | ||
) |
Definition at line 1354 of file mesh_data.cc.
References BKE_report(), count, Mesh::edit_mesh, mesh, mesh_remove_polys(), RPT_ERROR, and Mesh::totpoly.
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().
void ED_mesh_report_mirror_ex | ( | struct wmOperator * | op, |
int | totmirr, | ||
int | totfail, | ||
char | selectmode | ||
) |
Definition at line 1378 of file mesh_data.cc.
References BKE_reportf(), wmOperator::reports, RPT_INFO, RPT_WARNING, SCE_SELECT_EDGE, and SCE_SELECT_VERTEX.
Referenced by ED_mesh_report_mirror(), and edbm_select_mirror_exec().
int ED_mesh_sculpt_color_add | ( | struct Mesh * | me, |
const char * | name, | ||
bool | active_set, | ||
bool | do_init, | ||
struct ReportList * | reports | ||
) |
Definition at line 563 of file mesh_data.cc.
References BKE_mesh_update_customdata_pointers(), BLI_assert, CD_DEFAULT, CD_PROP_COLOR, CustomData_add_layer_named(), CustomData_has_layer(), DEG_id_tag_update(), Mesh::edit_mesh, Mesh::id, Mesh::mloopcol, Mesh::totvert, and Mesh::vdata.
Definition at line 596 of file mesh_data.cc.
References CD_PROP_COLOR, CustomData_get_active_layer(), ED_mesh_sculpt_color_remove_index(), and GET_CD_DATA.
Referenced by mesh_sculpt_vertex_color_remove_exec().
Definition at line 577 of file mesh_data.cc.
References CD_PROP_COLOR, CustomData_get_layer_index_n(), DEG_id_tag_update(), delete_customdata_layer(), GET_CD_DATA, Mesh::id, if(), CustomData::layers, NC_GEOM, ND_DATA, and WM_main_add_notifier().
Referenced by ED_mesh_sculpt_color_remove_active(), and ED_mesh_sculpt_color_remove_named().
Definition at line 605 of file mesh_data.cc.
References CD_PROP_COLOR, CustomData_get_named_layer(), ED_mesh_sculpt_color_remove_index(), and GET_CD_DATA.
int ED_mesh_shapes_join_objects_exec | ( | struct bContext * | C, |
struct wmOperator * | op | ||
) |
Definition at line 747 of file meshtools.cc.
References BKE_key_add(), BKE_keyblock_add(), BKE_keyblock_convert_from_mesh(), BKE_mesh_runtime_eval_to_meshkey(), BKE_report(), C, CD_MASK_BAREMESH, CTX_data_active_object(), CTX_DATA_BEGIN, CTX_DATA_END, CTX_data_ensure_evaluated_depsgraph(), CTX_data_main(), CTX_data_scene(), Object::data, DEG_get_evaluated_object(), DEG_get_evaluated_scene(), DEG_id_tag_update(), depsgraph, Scene::id, ID_RECALC_SELECT, if(), Mesh::key, KEY_RELATIVE, mesh_get_eval_deform(), NC_SCENE, ND_OB_ACTIVE, OB_MESH, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, RPT_WARNING, scene, Mesh::totvert, and WM_event_add_notifier().
Referenced by join_shapes_exec().
Export for ED_undo_sys.
Definition at line 888 of file editmesh_undo.c.
References UndoType::flags, mesh_undosys_foreach_ID_ref(), mesh_undosys_poll(), mesh_undosys_step_decode(), mesh_undosys_step_encode(), mesh_undosys_step_free(), UndoType::name, UndoType::poll, UndoType::step_decode, UndoType::step_encode, UndoType::step_foreach_ID_ref, UndoType::step_free, UndoType::step_size, and UNDOTYPE_FLAG_NEED_CONTEXT_FOR_ENCODE.
Referenced by ED_undosys_type_init().
void ED_mesh_update | ( | struct Mesh * | mesh, |
struct bContext * | C, | ||
bool | calc_edges, | ||
bool | calc_edges_loose | ||
) |
Definition at line 1075 of file mesh_data.cc.
References BKE_mesh_calc_edges(), BKE_mesh_calc_edges_loose(), BKE_mesh_normals_tag_dirty(), BKE_mesh_tessface_clear(), C, DEG_id_tag_update(), Mesh::id, mesh, NC_GEOM, ND_DATA, Mesh::totedge, Mesh::totface, Mesh::totpoly, and WM_event_add_notifier().
int ED_mesh_uv_add | ( | struct Mesh * | me, |
const char * | name, | ||
bool | active_set, | ||
bool | do_init, | ||
struct ReportList * | reports | ||
) |
Definition at line 244 of file mesh_data.cc.
References BKE_mesh_update_customdata_pointers(), BKE_reportf(), BMEditMesh::bm, BM_data_layer_add_named(), BM_data_layer_copy(), CD_DEFAULT, CD_DUPLICATE, CD_MLOOPUV, CustomData_add_layer_named(), CustomData_get_active_layer(), CustomData_number_of_layers(), CustomData_set_layer_active(), DEG_id_tag_update(), ED_mesh_uv_loop_reset_ex(), Mesh::edit_mesh, Mesh::id, BMesh::ldata, Mesh::ldata, MAX_MTFACE, Mesh::mloopuv, NC_GEOM, ND_DATA, RPT_WARNING, Mesh::totloop, and WM_main_add_notifier().
Referenced by ED_mesh_uv_ensure(), ED_uvedit_ensure_uvs(), and mesh_uv_texture_add_exec().
Definition at line 310 of file mesh_data.cc.
References BMEditMesh::bm, CD_MLOOPUV, CustomData_number_of_layers(), ED_mesh_uv_add(), Mesh::edit_mesh, BMesh::ldata, and Mesh::ldata.
Referenced by add_primitive_circle_exec(), add_primitive_cone_exec(), add_primitive_cube_exec(), add_primitive_cube_gizmo_exec(), add_primitive_cylinder_exec(), add_primitive_grid_exec(), add_primitive_icosphere_exec(), add_primitive_monkey_exec(), add_primitive_plane_exec(), add_primitive_uvsphere_exec(), and ED_uvedit_add_simple_uvs().
Definition at line 234 of file mesh_data.cc.
References C, CD_MLOOPUV, CustomData_get_active_layer(), ED_mesh_uv_loop_reset_ex(), GET_CD_DATA, NC_GEOM, ND_DATA, and WM_event_add_notifier().
Referenced by reset_exec().
Without a bContext, called when UV-editing.
Definition at line 200 of file mesh_data.cc.
References BLI_assert, BMEditMesh::bm, BM_elem_flag_test, BM_ELEM_SELECT, BM_FACES_OF_MESH, BM_ITER_MESH, CD_MLOOPUV, CustomData_get_layer_n(), CustomData_get_n_offset(), CustomData_has_layer(), DEG_id_tag_update(), Mesh::edit_mesh, Mesh::id, BMesh::ldata, Mesh::ldata, mesh_uv_reset_bmface(), mesh_uv_reset_mface(), Mesh::mpoly, and Mesh::totpoly.
Referenced by ED_mesh_uv_add(), and ED_mesh_uv_loop_reset().
Definition at line 351 of file mesh_data.cc.
References CD_MLOOPUV, CustomData_get_active_layer(), ED_mesh_uv_remove_index(), and GET_CD_DATA.
Referenced by mesh_uv_texture_remove_exec().
Definition at line 331 of file mesh_data.cc.
References CD_MLOOPUV, CustomData_get_layer_index_n(), DEG_id_tag_update(), delete_customdata_layer(), GET_CD_DATA, Mesh::id, if(), CustomData::layers, NC_GEOM, ND_DATA, and WM_main_add_notifier().
Referenced by ED_mesh_uv_remove_active(), and ED_mesh_uv_remove_named().
Definition at line 361 of file mesh_data.cc.
References CD_MLOOPUV, CustomData_get_named_layer(), ED_mesh_uv_remove_index(), and GET_CD_DATA.
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.
void ED_mesh_verts_remove | ( | struct Mesh * | mesh, |
struct ReportList * | reports, | ||
int | count | ||
) |
Definition at line 1312 of file mesh_data.cc.
References BKE_report(), count, Mesh::edit_mesh, mesh, mesh_remove_verts(), RPT_ERROR, and Mesh::totvert.
Definition at line 208 of file mesh_ops.c.
References NULL, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorTypeMacro::ptr, RNA_boolean_set(), WM_operatortype_append_macro(), and WM_operatortype_macro_define().
Referenced by ED_spacemacros_init().
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().
Matching index only.
Definition at line 358 of file object_vgroup.c.
References BKE_object_defgroup_active_index_get(), BKE_object_defgroup_active_index_set(), BKE_object_defgroup_data_create(), BKE_object_defgroup_list(), BKE_object_defgroup_list_mutable(), BKE_object_defgroup_remap_update_users(), BKE_object_defgroup_remove_all(), BLI_assert, BLI_duplicatelist(), BLI_freelistN(), BLI_listbase_count(), Object::data, ED_vgroup_parray_alloc(), MEM_dupallocN, MEM_freeN, MEM_mallocN, MEM_SAFE_FREE, and NULL.
Referenced by vertex_group_copy_to_selected_exec().
Removes out of range #MDeformWeights
Definition at line 130 of file object_vgroup.c.
References BKE_defvert_remove_group(), MDeformWeight::def_nr, MDeformVert::dw, ED_vgroup_parray_alloc(), and MDeformVert::totweight.
Referenced by ED_object_vgroup_calc_from_armature(), and gpencil_object_vgroup_calc_from_armature().
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 | ||
) |
Definition at line 2327 of file object_vgroup.c.
References BKE_lattice_index_from_uvw(), BKE_object_defgroup_active_index_get(), BKE_object_defgroup_flip_map(), BKE_object_defgroup_flip_map_single(), BKE_object_defgroup_list(), BLI_assert, BLI_BITMAP_ENABLE, BLI_BITMAP_NEW, BLI_BITMAP_TEST, BLI_findlink(), BMEditMesh::bm, BM_ELEM_CD_GET_VOID_P, BM_elem_flag_enable, BM_elem_flag_test, BM_ELEM_SELECT, BM_ELEM_TAG, BM_ITER_MESH, BM_mesh_elem_hflag_disable_all(), BM_VERT, BM_VERTS_OF_MESH, CD_MDEFORMVERT, CustomData_get_offset(), Object::data, Lattice::def, MDeformWeight::def_nr, Lattice::dvert, Mesh::dvert, EDBM_verts_mirror_cache_begin(), EDBM_verts_mirror_cache_end(), EDBM_verts_mirror_get(), Mesh::edit_mesh, Mesh::editflag, BPoint::f1, MVert::flag, i1, ME_EDIT_PAINT_VERT_SEL, MEM_freeN, mesh_get_x_mirror_vert(), Mesh::mvert, NULL, OB_LATTICE, OB_MESH, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, SELECT, Mesh::totvert, Object::type, v, BMesh::vdata, vgroup_edit_lattice(), VGROUP_MIRR_OP, and w().
Referenced by vertex_group_mirror_exec().
bool ED_vgroup_parray_alloc | ( | struct ID * | id, |
struct MDeformVert *** | dvert_arr, | ||
int * | dvert_tot, | ||
bool | use_vert_sel | ||
) |
Definition at line 148 of file object_vgroup.c.
References BMEditMesh::bm, bm, BM_ELEM_CD_GET_VOID_P, BM_elem_flag_test, BM_ELEM_SELECT, BM_ITER_MESH, BM_VERTS_OF_MESH, CD_MDEFORMVERT, CustomData_get_offset(), Lattice::def, Lattice::dvert, Mesh::dvert, Mesh::edit_mesh, Lattice::editlatt, BPoint::f1, MVert::flag, GS, id, ID_LT, ID_ME, if(), EditLatt::latt, MEM_mallocN, Mesh::mvert, ID::name, NULL, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, SELECT, BMesh::totvert, Mesh::totvert, and BMesh::vdata.
Referenced by ED_vgroup_array_copy(), ED_vgroup_data_clamp_range(), ED_vgroup_parray_mirror_assign(), ED_vgroup_parray_mirror_sync(), vgroup_clean_subset(), vgroup_duplicate(), vgroup_invert_subset(), vgroup_levels_subset(), vgroup_limit_total_subset(), vgroup_normalize(), vgroup_normalize_all(), vgroup_quantize_subset(), and vgroup_smooth_subset().
void ED_vgroup_parray_from_weight_array | ( | struct MDeformVert ** | dvert_array, |
int | dvert_tot, | ||
const float * | dvert_weights, | ||
int | def_nr, | ||
bool | remove_zero | ||
) |
Definition at line 459 of file object_vgroup.c.
References BKE_defvert_ensure_index(), BKE_defvert_find_index(), BKE_defvert_remove_group(), BLI_assert, IN_RANGE_INCL, and MDeformWeight::weight.
Referenced by vgroup_smooth_subset().
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().
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.
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().
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 | ||
) |
Definition at line 324 of file object_vgroup.c.
References BKE_defvert_remove_group(), MDeformWeight::def_nr, MDeformVert::dw, blender::robust_pred::epsilon, MDeformVert::totweight, and MDeformWeight::weight.
Referenced by vgroup_clean_subset(), and vgroup_invert_subset().
void ED_vgroup_parray_to_weight_array | ( | const struct MDeformVert ** | dvert_array, |
int | dvert_tot, | ||
float * | dvert_weights, | ||
int | def_nr | ||
) |
Definition at line 983 of file object_vgroup.c.
References BKE_object_defgroup_active_index_set(), and BKE_object_defgroup_name_index().
Referenced by ED_armature_pose_select_pick_bone(), and pose_select_mirror_exec().
Definition at line 114 of file object_vgroup.c.
References bArmature::act_bone, BKE_object_defgroup_active_index_set(), BKE_object_defgroup_name_index(), BKE_object_pose_armature_get(), Object::data, Object::mode, Bone::name, and OB_MODE_POSE.
Referenced by ed_vwpaintmode_enter_generic().
Use when adjusting the active vertex weight and apply to mirror vertices.
Definition at line 549 of file object_vgroup.c.
References BMEditMesh::bm, CD_MDEFORMVERT, CustomData_get_offset(), Object::data, ED_mesh_active_dvert_get_em(), ED_mesh_active_dvert_get_ob(), ED_mesh_defvert_mirror_update_em(), ED_mesh_defvert_mirror_update_ob(), Mesh::edit_mesh, ME_SYMMETRY_X, Mesh::symmetry, and BMesh::vdata.
Referenced by do_view3d_vgroup_buttons().
void ED_vgroup_vert_add | ( | struct Object * | ob, |
struct bDeformGroup * | dg, | ||
int | vertnum, | ||
float | weight, | ||
int | assignmode | ||
) |
Called while not in editmode.
Definition at line 860 of file object_vgroup.c.
References BKE_object_defgroup_array_get(), BKE_object_defgroup_data_create(), BKE_object_defgroup_list(), BLI_findindex(), Object::data, ED_vgroup_nr_vert_add(), and NULL.
Referenced by envelope_bone_weighting(), heat_bone_weighting(), SkinInfo::link_armature(), and skin_armature_bone_create().
void ED_vgroup_vert_remove | ( | struct Object * | ob, |
struct bDeformGroup * | dg, | ||
int | vertnum | ||
) |
Mesh object mode, lattice can be in edit-mode.
Definition at line 888 of file object_vgroup.c.
References BKE_defvert_find_index(), BKE_defvert_remove_group(), BKE_object_defgroup_array_get(), BKE_object_defgroup_list(), BLI_findindex(), Object::data, and NULL.
Referenced by envelope_bone_weighting(), and heat_bone_weighting().
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().
Definition at line 35 of file editmesh_automerge.c.
References BKE_editmesh_from_object(), BMEditMesh::bm, bm, BMO_FLAG_DEFAULTS, BMO_op_exec(), BMO_op_finish(), BMO_op_init(), BMO_op_initf(), BMO_slot_copy, Object::data, EDBM_update(), BMesh::totvert, and update().
Referenced by EDBM_automerge_and_split(), edbm_remove_doubles_exec(), and special_aftertrans_update__mesh().
void EDBM_automerge_and_split | ( | struct Object * | ob, |
bool | split_edges, | ||
bool | split_faces, | ||
bool | update, | ||
char | hflag, | ||
float | dist | ||
) |
Referenced by special_aftertrans_update__mesh().
bool EDBM_deselect_by_material | ( | struct BMEditMesh * | em, |
short | index, | ||
bool | select | ||
) |
Definition at line 2639 of file editmesh_select.c.
References BMEditMesh::bm, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_face_select_set(), BM_FACES_OF_MESH, BM_ITER_MESH, BMFace::mat_nr, and select().
Referenced by material_slot_de_select().
void EDBM_deselect_flush | ( | struct BMEditMesh * | em | ) |
Definition at line 376 of file editmesh_utils.c.
References BMEditMesh::bm, BM_mesh_deselect_flush(), BMEditMesh::selectmode, and BMesh::selectmode.
Referenced by ED_uvedit_select_sync_flush(), edbm_select_random_exec(), uv_mouse_select_loop_generic_multi(), uv_select_linked_multi(), and vgroup_select_verts().
struct BMEdge* EDBM_edge_find_nearest | ( | struct ViewContext * | vc, |
float * | dist_px_manhattan_p | ||
) |
Definition at line 613 of file editmesh_select.c.
References BKE_view_layer_base_find(), EDBM_edge_find_nearest_ex(), NULL, ViewContext::obact, and ViewContext::view_layer.
Referenced by edbm_elem_find_nearest().
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 | ||
) |
Definition at line 480 of file editmesh_select.c.
References BMEditMesh::bm, bm, BM_edge_at_index_find_or_table(), data, ViewContext::depsgraph, NearestEdgeUserData_Hit::dist, NearestEdgeUserData_Hit::dist_center_px_manhattan, DRW_select_buffer_context_create(), DRW_select_buffer_find_nearest_to_point(), ED_view3d_backbuf_sample_size_clamp(), ED_view3d_init_mats_rv3d(), ED_view3d_viewcontext_init_object(), edbm_select_id_bm_elem_get(), NearestEdgeUserData_Hit::edge, ViewContext::em, find_nearest_edge__doClosest(), find_nearest_edge_center__doZBuf(), if(), NearestEdgeUserData_Hit::index, mesh_foreachScreenEdge(), ViewContext::mval, NULL, ViewContext::obedit, Base::object, ViewContext::region, ViewContext::rv3d, SCE_SELECT_EDGE, UINT_MAX, ViewContext::v3d, V3D_PROJ_TEST_CLIP_BB, V3D_PROJ_TEST_CLIP_CONTENT_DEFAULT, V3D_PROJ_TEST_CLIP_DEFAULT, NearestEdgeUserData::vc, and XRAY_FLAG_ENABLED.
Referenced by EDBM_edge_find_nearest(), gizmo_preselect_edgering_test_select(), loopcut_mouse_move(), and unified_findnearest().
struct BMFace* EDBM_face_find_nearest | ( | struct ViewContext * | vc, |
float * | dist_px_manhattan_p | ||
) |
Definition at line 832 of file editmesh_select.c.
References BKE_view_layer_base_find(), EDBM_face_find_nearest_ex(), NULL, ViewContext::obact, and ViewContext::view_layer.
Referenced by edbm_elem_find_nearest(), and knife_find_closest_face().
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 | ||
) |
use_zbuf_single_px | Special 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().
void EDBM_flag_disable_all | ( | struct BMEditMesh * | em, |
char | hflag | ||
) |
Definition at line 437 of file editmesh_utils.c.
References BMEditMesh::bm, BM_EDGE, BM_FACE, BM_mesh_elem_hflag_disable_all(), and BM_VERT.
Referenced by do_lasso_select_mesh(), do_mesh_box_select(), edbm_bevel_calc(), edbm_bridge_edge_loops_for_single_editmesh(), edbm_delete_exec(), edbm_delete_loose_exec(), edbm_duplicate_exec(), edbm_extrude_discrete_faces(), edbm_extrude_edges_indiv(), edbm_extrude_ex(), edbm_flag_disable_all_multi(), edbm_inset_calc(), edbm_loop_to_region_exec(), edbm_merge_exec(), EDBM_mesh_deselect_all_multi_ex(), EDBM_mesh_reveal(), edbm_poke_face_exec(), edbm_polybuild_delete_at_cursor_invoke(), edbm_polybuild_dissolve_at_cursor_invoke(), edbm_region_to_loop_exec(), edbm_screw_exec(), edbm_select_all_exec(), edbm_select_face_by_sides_exec(), edbm_select_loose_exec(), EDBM_select_mirrored(), edbm_select_non_manifold_exec(), EDBM_select_pick(), EDBM_select_toggle_all(), edbm_select_ungrouped_exec(), edbm_spin_exec(), edgering_select(), knife_make_cuts(), mesh_bisect_exec(), mesh_circle_select(), mesh_symmetrize_exec(), mouse_mesh_loop(), mouse_mesh_loop_edge(), mouse_mesh_loop_edge_ring(), mouse_mesh_loop_face(), and uv_select_all_perform().
void EDBM_flag_enable_all | ( | struct BMEditMesh * | em, |
char | hflag | ||
) |
Definition at line 442 of file editmesh_utils.c.
References BMEditMesh::bm, BM_EDGE, BM_FACE, BM_mesh_elem_hflag_enable_all(), and BM_VERT.
Referenced by edbm_select_all_exec(), EDBM_select_toggle_all(), and uv_select_all_perform().
void EDBM_mesh_clear | ( | struct BMEditMesh * | em | ) |
Definition at line 318 of file editmesh_utils.c.
References BMEditMesh::bm, BM_mesh_clear(), BMEditMesh::looptris, MEM_SAFE_FREE, and BMEditMesh::tottri.
Definition at line 2719 of file editmesh_select.c.
References BKE_view_layer_array_from_bases_in_edit_mode_unique_data, C, CTX_data_ensure_evaluated_depsgraph(), depsgraph, ED_view3d_viewcontext_init(), EDBM_mesh_deselect_all_multi_ex(), MEM_freeN, ViewContext::v3d, and ViewContext::view_layer.
Definition at line 2700 of file editmesh_select.c.
References BKE_editmesh_from_object(), BMEditMesh::bm, BM_ELEM_SELECT, Object::data, DEG_id_tag_update(), EDBM_flag_disable_all(), ID_RECALC_SELECT, Base::object, and BMesh::totvertsel.
Referenced by EDBM_mesh_deselect_all_multi().
Definition at line 1516 of file meshtools.cc.
References BKE_editmesh_from_object(), BMEditMesh::bm, bm, BM_mesh_elem_index_ensure_ex(), and elem_offset().
Referenced by construct_param_handle_multi().
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().
bool EDBM_mesh_hide | ( | struct BMEditMesh * | em, |
bool | swap | ||
) |
Swap is 0 or 1, if 1 it hides not selected.
Definition at line 1345 of file editmesh_utils.c.
References BMEditMesh::bm, BM_EDGES_OF_MESH, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_elem_hide_set, BM_ELEM_SELECT, BM_FACES_OF_MESH, BM_ITER_MESH, BM_VERTS_OF_MESH, EDBM_selectmode_flush(), SCE_SELECT_EDGE, SCE_SELECT_VERTEX, BMEditMesh::selectmode, and swap().
Referenced by edbm_hide_exec(), and uv_hide_exec().
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().
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().
Definition at line 269 of file editmesh_utils.c.
References Object::actcol, BKE_editmesh_create(), BKE_mesh_to_bmesh(), BMEditMesh::bm, bm, Object::data, EDBM_mesh_free_data(), EDBM_selectmode_flush(), Mesh::edit_mesh, BMEditMesh::mat_nr, MEM_freeN, BMEditMesh::selectmode, and BMesh::selectmode.
Referenced by ED_object_editmode_enter_ex(), object_hook_index_array(), and vertex_parent_set_exec().
void EDBM_mesh_normals_update | ( | struct BMEditMesh * | em | ) |
Definition at line 1462 of file editmesh_utils.c.
References EDBM_mesh_normals_update_ex().
Referenced by edbm_bridge_edge_loops_for_single_editmesh(), EDBM_mesh_reveal(), EDBM_update(), and object_origin_set_exec().
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().
bool EDBM_mesh_reveal | ( | struct BMEditMesh * | em, |
bool | select | ||
) |
Definition at line 1387 of file editmesh_utils.c.
References BMEditMesh::bm, BM_EDGES_OF_MESH, BM_elem_flag_disable, BM_elem_flag_enable, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_elem_select_set(), BM_ELEM_TAG, BM_FACES_OF_MESH, BM_ITER_MESH, BM_VERTS_OF_MESH, EDBM_flag_disable_all(), EDBM_mesh_normals_update(), EDBM_selectmode_flush(), SCE_SELECT_EDGE, SCE_SELECT_FACE, SCE_SELECT_VERTEX, select(), and BMEditMesh::selectmode.
Referenced by edbm_reveal_exec(), and uv_reveal_exec().
void EDBM_mesh_stats_multi | ( | struct Object ** | objects, |
uint | objects_len, | ||
int | totelem[3], | ||
int | totelem_sel[3] | ||
) |
Definition at line 1483 of file meshtools.cc.
References BKE_editmesh_from_object(), BMEditMesh::bm, bm, BMesh::totedge, BMesh::totedgesel, BMesh::totface, BMesh::totfacesel, BMesh::totvert, and BMesh::totvertsel.
Referenced by edbm_delete_loose_exec(), and edbm_tris_convert_to_quads_exec().
eEditMesh_PreSelPreviewAction EDBM_preselect_action_get | ( | struct EditMesh_PreSelElem * | psel | ) |
Definition at line 79 of file editmesh_preselect_elem.c.
References EditMesh_PreSelElem::preview_action.
Referenced by EDBM_preselect_elem_update_preview(), and gizmo_preselect_elem_test_select().
void EDBM_preselect_action_set | ( | struct EditMesh_PreSelElem * | psel, |
eEditMesh_PreSelPreviewAction | action | ||
) |
Definition at line 73 of file editmesh_preselect_elem.c.
References EditMesh_PreSelElem::preview_action.
Referenced by gizmo_preselect_elem_test_select().
void EDBM_preselect_edgering_clear | ( | struct EditMesh_PreSelEdgeRing * | psel | ) |
Definition at line 135 of file editmesh_preselect_edgering.c.
References EditMesh_PreSelEdgeRing::edges, EditMesh_PreSelEdgeRing::edges_len, MEM_SAFE_FREE, EditMesh_PreSelEdgeRing::verts, and EditMesh_PreSelEdgeRing::verts_len.
Referenced by EDBM_preselect_edgering_destroy(), EDBM_preselect_edgering_update_from_edge(), gizmo_preselect_edgering_test_select(), and ringsel_find_edge().
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().
void EDBM_preselect_edgering_destroy | ( | struct EditMesh_PreSelEdgeRing * | psel | ) |
Definition at line 129 of file editmesh_preselect_edgering.c.
References EDBM_preselect_edgering_clear(), and MEM_freeN.
Referenced by gizmo_preselect_edgering_free(), and ringsel_exit().
void EDBM_preselect_edgering_draw | ( | struct EditMesh_PreSelEdgeRing * | psel, |
const float | matrix[4][4] | ||
) |
Definition at line 144 of file editmesh_preselect_edgering.c.
References EditMesh_PreSelEdgeRing::edges, EditMesh_PreSelEdgeRing::edges_len, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_DEPTH_LESS_EQUAL, GPU_DEPTH_NONE, GPU_depth_test(), GPU_FETCH_FLOAT, GPU_matrix_mul, GPU_matrix_pop(), GPU_matrix_push(), GPU_PRIM_LINES, GPU_PRIM_POINTS, GPU_program_point_size(), GPU_SHADER_3D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_AA, GPU_SHADER_3D_POLYLINE_UNIFORM_COLOR, GPU_vertformat_attr_add(), GPU_viewport_size_get_f(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniform1f(), immUniform2fv(), immUniformThemeColor3(), immVertex3fv(), immVertexFormat(), M_SQRT2, max_ff(), pos, TH_GIZMO_PRIMARY, TH_VERTEX_SIZE, UI_GetThemeValuef(), EditMesh_PreSelEdgeRing::verts, and EditMesh_PreSelEdgeRing::verts_len.
Referenced by gizmo_preselect_edgering_draw(), and ringsel_draw().
void EDBM_preselect_edgering_update_from_edge | ( | struct EditMesh_PreSelEdgeRing * | psel, |
struct BMesh * | bm, | ||
struct BMEdge * | eed_start, | ||
int | previewlines, | ||
const float(*) | coords[3] | ||
) |
Definition at line 336 of file editmesh_preselect_edgering.c.
References bm, BM_edge_is_any_face_len_test(), BM_mesh_elem_index_ensure(), BM_VERT, EDBM_preselect_edgering_clear(), view3d_preselect_mesh_edgering_update_edges_from_edge(), and view3d_preselect_mesh_edgering_update_verts_from_edge().
Referenced by gizmo_preselect_edgering_test_select(), and ringsel_find_edge().
void EDBM_preselect_elem_clear | ( | struct EditMesh_PreSelElem * | psel | ) |
Definition at line 107 of file editmesh_preselect_elem.c.
References EditMesh_PreSelElem::edges, EditMesh_PreSelElem::edges_len, MEM_SAFE_FREE, EditMesh_PreSelElem::verts, and EditMesh_PreSelElem::verts_len.
Referenced by EDBM_preselect_elem_destroy(), EDBM_preselect_elem_update_from_single(), and gizmo_preselect_elem_test_select().
struct EditMesh_PreSelElem* EDBM_preselect_elem_create | ( | void | ) |
Definition at line 84 of file editmesh_preselect_elem.c.
References MEM_callocN, PRESELECT_ACTION_TRANSFORM, and EditMesh_PreSelElem::preview_action.
Referenced by gizmo_preselect_elem_setup().
void EDBM_preselect_elem_destroy | ( | struct EditMesh_PreSelElem * | psel | ) |
Definition at line 91 of file editmesh_preselect_elem.c.
References EDBM_preselect_elem_clear(), EDBM_preselect_preview_clear(), and MEM_freeN.
Referenced by gizmo_preselect_elem_free().
void EDBM_preselect_elem_draw | ( | struct EditMesh_PreSelElem * | psel, |
const float | matrix[4][4] | ||
) |
Definition at line 116 of file editmesh_preselect_elem.c.
References EditMesh_PreSelElem::edges, EditMesh_PreSelElem::edges_len, GPU_COMP_F32, GPU_DEPTH_LESS_EQUAL, GPU_DEPTH_NONE, GPU_depth_test(), GPU_FETCH_FLOAT, GPU_line_width(), GPU_matrix_mul, GPU_matrix_pop(), GPU_matrix_push(), GPU_point_size(), GPU_PRIM_LINES, GPU_PRIM_POINTS, GPU_PRIM_TRIS, GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniformColor4ub(), immVertex3fv(), immVertexFormat(), pos, PRESELECT_ACTION_DELETE, PRESELECT_ACTION_TRANSFORM, EditMesh_PreSelElem::preview_action, EditMesh_PreSelElem::preview_lines, EditMesh_PreSelElem::preview_lines_len, EditMesh_PreSelElem::preview_tris, EditMesh_PreSelElem::preview_tris_len, EditMesh_PreSelElem::verts, and EditMesh_PreSelElem::verts_len.
Referenced by gizmo_preselect_elem_draw().
void EDBM_preselect_elem_update_from_single | ( | struct EditMesh_PreSelElem * | psel, |
struct BMesh * | bm, | ||
struct BMElem * | ele, | ||
const float(*) | coords[3] | ||
) |
Definition at line 350 of file editmesh_preselect_elem.c.
References BLI_assert, bm, BM_EDGE, BM_FACE, BM_mesh_elem_index_ensure(), BM_VERT, EDBM_preselect_elem_clear(), BMElem::head, BMHeader::htype, view3d_preselect_mesh_elem_update_from_edge(), view3d_preselect_mesh_elem_update_from_face(), and view3d_preselect_mesh_elem_update_from_vert().
Referenced by gizmo_preselect_elem_test_select().
void EDBM_preselect_elem_update_preview | ( | struct EditMesh_PreSelElem * | psel, |
struct ViewContext * | vc, | ||
struct BMesh * | bm, | ||
struct BMElem * | ele, | ||
const int | mval[2] | ||
) |
Definition at line 376 of file editmesh_preselect_elem.c.
References BLI_assert, bm, BM_EDGE, BM_FACE, BM_VERT, EDBM_preselect_action_get(), EDBM_preselect_preview_clear(), BMElem::head, BMHeader::htype, PRESELECT_ACTION_CREATE, view3d_preselect_update_preview_triangle_from_edge(), view3d_preselect_update_preview_triangle_from_face(), and view3d_preselect_update_preview_triangle_from_vert().
Referenced by gizmo_preselect_elem_test_select().
void EDBM_preselect_preview_clear | ( | struct EditMesh_PreSelElem * | psel | ) |
Definition at line 98 of file editmesh_preselect_elem.c.
References MEM_SAFE_FREE, EditMesh_PreSelElem::preview_lines, EditMesh_PreSelElem::preview_lines_len, EditMesh_PreSelElem::preview_tris, and EditMesh_PreSelElem::preview_tris_len.
Referenced by EDBM_preselect_elem_destroy(), EDBM_preselect_elem_update_preview(), and gizmo_preselect_elem_test_select().
void EDBM_project_snap_verts | ( | struct bContext * | C, |
struct Depsgraph * | depsgraph, | ||
struct ARegion * | region, | ||
struct Object * | obedit, | ||
struct BMEditMesh * | em | ||
) |
Definition at line 1770 of file editmesh_utils.c.
References BMEditMesh::bm, BM_elem_flag_test, BM_ELEM_SELECT, BM_ITER_MESH, BM_VERTS_OF_MESH, C, BMVert::co, CTX_data_scene(), CTX_wm_view3d(), depsgraph, ED_transform_snap_object_context_create(), ED_transform_snap_object_context_destroy(), ED_transform_snap_object_project_view3d(), ED_view3d_init_mats_rv3d(), ED_view3d_project_float_object(), Object::imat, mul_v3_m4v3(), SnapObjectContext::mval, NULL, SnapObjectContext::region, ARegion::regiondata, SCE_SNAP_MODE_FACE_RAYCAST, SCE_SNAP_TARGET_NOT_ACTIVE, SNAP_GEOM_FINAL, V3D_PROJ_RET_OK, and V3D_PROJ_TEST_NOP.
Referenced by edbm_dupli_extrude_cursor_invoke().
Definition at line 90 of file editmesh_utils.c.
References backup, BM_mesh_data_free(), and MEM_freeN.
Referenced by edbm_bevel_exit(), edbm_bisect_exit(), edbm_connect_vert_pair(), and edbm_inset_exit().
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().
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().
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().
void EDBM_select_flush | ( | struct BMEditMesh * | em | ) |
Definition at line 383 of file editmesh_utils.c.
References BMEditMesh::bm, BM_mesh_select_flush(), BMEditMesh::selectmode, and BMesh::selectmode.
Referenced by ED_uvedit_select_sync_flush(), edbm_dissolve_degenerate_exec(), edbm_edge_split_selected_edges(), edbm_edge_split_selected_verts(), EDBM_selectmode_set(), select_editbmesh_hook(), uv_mouse_select_loop_generic_multi(), and vgroup_select_verts().
bool EDBM_select_interior_faces | ( | struct BMEditMesh * | em | ) |
Definition at line 2869 of file editmesh_select.c.
References BMFaceLink::area, BLI_addtail(), BLI_assert, BLI_heap_free(), BLI_heap_insert(), BLI_heap_is_empty(), BLI_heap_new_ex(), BLI_heap_node_ptr(), BLI_heap_node_value(), BLI_heap_node_value_update(), BLI_heap_pop_min(), BLI_heap_remove(), BLI_heap_top(), BLI_movelisttolist(), BLI_pophead(), BMEditMesh::bm, bm, BM_EDGE, BM_edge_calc_length(), BM_edge_face_count_is_over, BM_EDGES_OF_MESH, BM_elem_flag_disable, BM_elem_flag_enable, BM_elem_index_get, BM_elem_index_set, BM_ELEM_TAG, BM_FACE, BM_face_at_index(), BM_face_calc_area(), BM_FACE_FIRST_LOOP, BM_face_select_set(), BM_FACES_OF_MESH, bm_interior_edge_is_manifold_except_face_index(), bm_interior_face_group_calc_cost(), bm_interior_loop_filter_fn(), BM_ITER_MESH, BM_ITER_MESH_INDEX, BM_mesh_calc_face_groups(), BM_mesh_elem_table_ensure(), BMLoop::e, e, ELEM, BMesh::elem_index_dirty, BMLoop::f, BMFaceLink::face, LISTBASE_FOREACH, MEM_callocN, MEM_freeN, MEM_mallocN, BMLoop::next, NULL, POINTER_AS_INT, POINTER_FROM_INT, BMLoop::radial_next, STACK_CLEAR, STACK_DECLARE, STACK_INIT, STACK_PUSH, STACK_SIZE, SWAP, BMesh::totedge, and BMesh::totface.
Referenced by edbm_faces_select_interior_exec().
void EDBM_select_less | ( | struct BMEditMesh * | em, |
bool | use_face_step | ||
) |
Definition at line 412 of file editmesh_utils.c.
References BMEditMesh::bm, BM_ALL_NOLOOP, BM_ELEM_SELECT, BM_mesh_select_mode_clean(), BMO_FLAG_DEFAULTS, BMO_op_exec(), BMO_op_finish(), BMO_op_initf(), BMO_slot_buffer_hflag_disable(), EDBM_selectmode_flush(), SCE_SELECT_FACE, BMEditMesh::selectmode, and BMOperator::slots_out.
Referenced by edbm_select_less_exec(), and uv_select_more_less().
void EDBM_select_mirrored | ( | struct BMEditMesh * | em, |
const struct Mesh * | me, | ||
int | axis, | ||
bool | extend, | ||
int * | r_totmirr, | ||
int * | r_totfail | ||
) |
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().
bool EDBM_select_pick | ( | struct bContext * | C, |
const int | mval[2], | ||
const struct SelectPick_Params * | params | ||
) |
Definition at line 2019 of file editmesh_select.c.
References Object::actcol, Object::actfmap, ViewLayer::basact, BKE_editmesh_from_object(), BKE_view_layer_array_from_bases_in_edit_mode, BLI_assert_unreachable, BLI_listbase_count_at_most(), BLI_listbase_is_empty(), BMEditMesh::bm, BM_edge_select_set(), BM_ELEM_CD_GET_VOID_P, BM_elem_flag_test, BM_ELEM_SELECT, BM_face_select_set(), BM_mesh_active_face_set(), BM_select_history_remove, BM_select_history_store, BM_vert_select_set(), C, CD_FACEMAP, CustomData_get_offset(), Object::data, DEG_id_tag_update(), ED_object_base_activate(), ED_view3d_viewcontext_init_object(), EDBM_flag_disable_all(), EDBM_selectmode_flush(), ViewContext::em, em_setup_viewcontext(), Object::fmaps, ID_RECALC_SELECT, map, BMEditMesh::mat_nr, BMFace::mat_nr, MEM_freeN, ViewContext::mval, NC_GEOM, NC_MATERIAL, ND_SELECT, ND_SHADING_LINKS, NULL, ViewContext::obedit, Base::object, params, BMesh::pdata, SEL_OP_ADD, SEL_OP_AND, SEL_OP_SET, SEL_OP_SUB, SEL_OP_XOR, unified_findnearest(), ViewContext::v3d, ViewContext::view_layer, and WM_event_add_notifier().
Referenced by edbm_point_normals_modal(), edbm_shortest_path_pick_invoke(), and view3d_select_exec().
void EDBM_select_swap | ( | struct BMEditMesh * | em | ) |
Definition at line 2667 of file editmesh_select.c.
References BMEditMesh::bm, BM_edge_select_set(), BM_EDGES_OF_MESH, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ELEM_SELECT, BM_face_select_set(), BM_FACES_OF_MESH, BM_ITER_MESH, BM_vert_select_set(), BM_VERTS_OF_MESH, SCE_SELECT_EDGE, SCE_SELECT_VERTEX, BMEditMesh::selectmode, and BMesh::selectmode.
Referenced by edbm_select_all_exec(), and uv_select_all_perform().
void EDBM_select_toggle_all | ( | struct BMEditMesh * | em | ) |
Definition at line 2657 of file editmesh_select.c.
References BMEditMesh::bm, BM_ELEM_SELECT, EDBM_flag_disable_all(), EDBM_flag_enable_all(), BMesh::totedgesel, BMesh::totfacesel, and BMesh::totvertsel.
Referenced by uv_select_all_perform().
void EDBM_selectmode_convert | ( | struct BMEditMesh * | em, |
short | selectmode_old, | ||
short | selectmode_new | ||
) |
Expand & Contract the Selection (used when changing modes and Ctrl key held)
Flush the selection up:
Flush the selection down:
Definition at line 2328 of file editmesh_select.c.
References BMEditMesh::bm, bm, BM_edge_is_all_face_flag_test(), BM_edge_is_any_vert_flag_test(), BM_edge_select_set(), BM_EDGES_OF_MESH, BM_elem_flag_set, BM_elem_flag_test, BM_ELEM_SELECT, BM_ELEM_TAG, BM_face_is_any_edge_flag_test(), BM_face_is_any_vert_flag_test(), BM_face_select_set(), BM_FACES_OF_MESH, BM_ITER_MESH, BM_mesh_deselect_flush(), BM_vert_is_all_edge_flag_test(), BM_vert_is_all_face_flag_test(), BM_vert_select_set(), BM_VERTS_OF_MESH, SCE_SELECT_EDGE, SCE_SELECT_FACE, SCE_SELECT_VERTEX, BMesh::totedgesel, BMesh::totfacesel, and BMesh::totvertsel.
Referenced by edbm_select_sharp_edges_exec(), and EDBM_selectmode_toggle_multi().
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.
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().
bool EDBM_selectmode_disable_multi | ( | struct bContext * | C, |
short | selectmode_disable, | ||
short | selectmode_fallback | ||
) |
Definition at line 2751 of file editmesh_select.c.
References BKE_view_layer_array_from_bases_in_edit_mode_unique_data, C, CTX_data_ensure_evaluated_depsgraph(), CTX_data_scene(), depsgraph, ED_view3d_viewcontext_init(), EDBM_selectmode_disable_multi_ex(), MEM_freeN, NULL, scene, and ViewContext::view_layer.
Referenced by ringsel_finish().
bool EDBM_selectmode_disable_multi_ex | ( | struct Scene * | scene, |
struct Base ** | bases, | ||
uint | bases_len, | ||
short | selectmode_disable, | ||
short | selectmode_fallback | ||
) |
Definition at line 2732 of file editmesh_select.c.
References BKE_editmesh_from_object(), EDBM_selectmode_disable(), Base::object, and scene.
Referenced by edbm_offset_edgeloop_exec(), and EDBM_selectmode_disable_multi().
void EDBM_selectmode_flush | ( | struct BMEditMesh * | em | ) |
Definition at line 371 of file editmesh_utils.c.
References EDBM_selectmode_flush_ex(), and BMEditMesh::selectmode.
Referenced by deselect_nth_active(), do_lasso_select_mesh(), do_mesh_box_select(), edbm_bevel_exit(), edbm_connect_vert_pair(), edbm_edge_rotate_selected_exec(), edbm_intersect_select(), edbm_loop_multiselect_exec(), edbm_loop_to_region_exec(), EDBM_mesh_hide(), EDBM_mesh_make(), EDBM_mesh_reveal(), edbm_quads_convert_to_tris_exec(), edbm_remove_doubles_exec(), edbm_select_all_exec(), edbm_select_axis_exec(), edbm_select_face_by_sides_exec(), EDBM_select_less(), edbm_select_linked_exec(), edbm_select_linked_pick_ex(), edbm_select_loose_exec(), edbm_select_mirror_exec(), EDBM_select_more(), edbm_select_non_manifold_exec(), EDBM_select_pick(), edbm_select_random_exec(), edbm_select_sharp_edges_exec(), edbm_select_ungrouped_exec(), EDBM_selectmode_set(), edbm_unsubdivide_exec(), edbm_vert_connect_path_exec(), knifetool_finish_single_post(), mesh_bisect_exec(), mesh_symmetrize_exec(), mouse_mesh_loop(), mouse_mesh_shortest_path_edge(), mouse_mesh_shortest_path_face(), mouse_mesh_shortest_path_vert(), ringsel_finish(), similar_edge_select_exec(), similar_face_select_exec(), similar_vert_select_exec(), uv_mouse_select_multi(), uv_select_all_perform(), and uv_select_linked_multi().
void EDBM_selectmode_flush_ex | ( | struct BMEditMesh * | em, |
short | selectmode | ||
) |
Definition at line 366 of file editmesh_utils.c.
References BMEditMesh::bm, BM_mesh_select_mode_flush_ex(), and BM_SELECT_LEN_FLUSH_RECALC_ALL.
Referenced by add_primitive_cube_gizmo_exec(), edbm_decimate_exec(), edbm_delete_edgeloop_exec(), EDBM_selectmode_flush(), edbm_unsubdivide_exec(), make_prim_finish(), ringsel_finish(), special_aftertrans_update__mesh(), and walker_deselect_nth().
void EDBM_selectmode_set | ( | struct BMEditMesh * | em | ) |
When switching select mode, makes sure selection is consistent for editing also for paranoia checks to make sure edge or face mode works.
Definition at line 2274 of file editmesh_select.c.
References BMEditMesh::bm, BM_edge_select_set(), BM_EDGES_OF_MESH, BM_elem_flag_test, BM_ELEM_SELECT, BM_face_select_set(), BM_FACES_OF_MESH, BM_ITER_MESH, BM_vert_select_set(), BM_VERTS_OF_MESH, EDBM_select_flush(), EDBM_selectmode_flush(), edbm_strip_selections(), SCE_SELECT_EDGE, SCE_SELECT_FACE, SCE_SELECT_VERTEX, BMEditMesh::selectmode, BMesh::selectmode, BMesh::totedgesel, BMesh::totfacesel, and BMesh::totvertsel.
Referenced by edbm_region_to_loop_exec(), EDBM_selectmode_disable(), edbm_selectmode_ensure(), EDBM_selectmode_set_multi(), and EDBM_selectmode_toggle_multi().
User access this.
Definition at line 2560 of file editmesh_select.c.
References BKE_editmesh_from_object(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data, BLI_assert, C, CTX_data_edit_object(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), Object::data, DEG_id_tag_update(), EDBM_selectmode_set(), Scene::id, ID_RECALC_COPY_ON_WRITE, ID_RECALC_SELECT, MEM_freeN, NC_GEOM, NC_SCENE, ND_SELECT, ND_TOOLSETTINGS, NULL, OB_MESH, scene, BMEditMesh::selectmode, ToolSettings::selectmode, Scene::toolsettings, Object::type, WM_event_add_notifier(), and WM_main_add_notifier().
Referenced by object_mode_set_exec(), and transformops_loopsel_hack().
Definition at line 350 of file editmesh_utils.c.
References BKE_editmesh_from_object(), C, CTX_data_edit_object(), CTX_data_scene(), NC_SCENE, ND_TOOLSETTINGS, scene, BMEditMesh::selectmode, ToolSettings::selectmode, Scene::toolsettings, and WM_event_add_notifier().
Referenced by edbm_region_to_loop_exec().
bool EDBM_selectmode_toggle_multi | ( | struct bContext * | C, |
short | selectmode_new, | ||
int | action, | ||
bool | use_extend, | ||
bool | use_expand | ||
) |
User facing function, does notification.
Definition at line 2434 of file editmesh_select.c.
References BKE_editmesh_from_object(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data, BLI_assert, C, CTX_data_edit_object(), CTX_data_scene(), CTX_data_tool_settings(), CTX_data_view_layer(), CTX_wm_view3d(), Object::data, DEG_id_tag_update(), EDBM_selectmode_convert(), EDBM_selectmode_set(), highest_order_bit_s(), Scene::id, ID_RECALC_COPY_ON_WRITE, ID_RECALC_SELECT, MEM_freeN, NC_GEOM, NC_SCENE, ND_SELECT, ND_TOOLSETTINGS, NULL, OB_MESH, ret, SCE_SELECT_EDGE, SCE_SELECT_FACE, SCE_SELECT_VERTEX, scene, BMEditMesh::selectmode, ToolSettings::selectmode, Object::type, WM_event_add_notifier(), and WM_main_add_notifier().
Referenced by edbm_select_mode_exec().
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().
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 | ||
) |
Definition at line 1002 of file editmesh_select.c.
References BKE_editmesh_from_object(), BMEditMesh::bm, bm, BM_edge_is_boundary(), BM_EDGES_OF_MESH, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_elem_index_get, BM_face_calc_center_median(), BM_face_calc_center_median_vcos(), BM_FACES_OF_MESH, BM_ITER_MESH, BM_mesh_elem_index_ensure(), BM_VERT, BM_VERTS_OF_MESH, BMVert::co, copy_m3_m4(), Object::data, DEG_get_evaluated_id(), ViewContext::depsgraph, dist_squared_ray_to_seg_v3(), dist_squared_to_ray_v3_normalized(), e, ED_view3d_viewcontext_init_object(), ED_view3d_win_to_ray_clipped(), Mesh_Runtime::edit_data, float(), invert_m3(), mid_v3_v3v3(), mul_m4_v3(), mul_v3_m4v3(), ViewContext::mval, NULL, Base::object, Object::obmat, point, ViewContext::region, Mesh::runtime, UNPACK2, UNUSED_VARS, v, ViewContext::v3d, and EditMeshData::vertexCos.
Referenced by gizmo_preselect_elem_test_select().
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().
Bad level call from Python API.
Definition at line 1543 of file editmesh_utils.c.
References EDBM_update().
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().
bool EDBM_uv_check | ( | struct BMEditMesh * | em | ) |
Can we edit UV's for this mesh?
Definition at line 1075 of file editmesh_utils.c.
References BMEditMesh::bm, CD_MLOOPUV, CustomData_has_layer(), BMesh::ldata, and BMesh::totface.
Referenced by ED_space_image_show_uvedit(), ED_uvedit_test(), EDBM_uv_active_face_get(), and uv_seams_from_islands_exec().
bool EDBM_vert_color_check | ( | struct BMEditMesh * | em | ) |
Definition at line 1081 of file editmesh_utils.c.
References BMEditMesh::bm, CD_PROP_BYTE_COLOR, CustomData_has_layer(), BMesh::ldata, and BMesh::totface.
struct BMVert* EDBM_vert_find_nearest | ( | struct ViewContext * | vc, |
float * | dist_px_manhattan_p | ||
) |
Definition at line 359 of file editmesh_select.c.
References BKE_view_layer_base_find(), EDBM_vert_find_nearest_ex(), NULL, ViewContext::obact, and ViewContext::view_layer.
Referenced by edbm_elem_find_nearest().
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 | ||
) |
Nearest vertex under the cursor.
dist_px_manhattan_p | (in/out), minimal distance to the nearest and at the end, actual distance. |
use_select_bias |
|
use_cycle | Cycle over elements within FIND_NEAR_CYCLE_THRESHOLD_MIN in order of index. |
Definition at line 257 of file editmesh_select.c.
References BMEditMesh::bm, bm, BM_vert_at_index_find_or_table(), data, ViewContext::depsgraph, NearestVertUserData_Hit::dist, DRW_select_buffer_context_create(), DRW_select_buffer_find_nearest_to_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, findnearestvert__doClosest(), if(), NearestVertUserData_Hit::index, mesh_foreachScreenVert(), ViewContext::mval, NULL, ViewContext::obedit, Base::object, ViewContext::region, ViewContext::rv3d, RV3D_CLIPPING_ENABLED, SCE_SELECT_VERTEX, UINT_MAX, ViewContext::v3d, V3D_PROJ_TEST_CLIP_BB, V3D_PROJ_TEST_CLIP_DEFAULT, NearestVertUserData_Hit::vert, and XRAY_FLAG_ENABLED.
Referenced by EDBM_vert_find_nearest(), and unified_findnearest().
void EDBM_verts_mirror_apply | ( | struct BMEditMesh * | em, |
int | sel_from, | ||
int | sel_to | ||
) |
Definition at line 1319 of file editmesh_utils.c.
References BLI_assert, BMEditMesh::bm, BM_elem_flag_test, BM_ELEM_SELECT, BM_ITER_MESH, BM_VERT, BM_VERTS_OF_MESH, BMVert::co, copy_v3_v3(), EDBM_verts_mirror_get(), BMesh::elem_table_dirty, NULL, v, and BMesh::vtable.
Referenced by edbm_do_smooth_laplacian_vertex_exec(), and edbm_do_smooth_vertex_exec().
void EDBM_verts_mirror_cache_begin | ( | struct BMEditMesh * | em, |
int | axis, | ||
bool | use_self, | ||
bool | use_select, | ||
bool | respecthide, | ||
bool | use_topology | ||
) |
Definition at line 1235 of file editmesh_utils.c.
References BM_SEARCH_MAXDIST_MIRR, EDBM_verts_mirror_cache_begin_ex(), and NULL.
Referenced by ED_vgroup_mirror(), edbm_do_smooth_laplacian_vertex_exec(), edbm_do_smooth_vertex_exec(), and EDBM_select_mirrored().
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 | ||
) |
em | Edit-mesh used for generating mirror data. |
use_self | Allow a vertex to point to itself (middle verts). |
use_select | Restrict to selected verts. |
respecthide | Skip hidden vertices. |
use_topology | Use topology mirror. |
maxdist | Distance for close point test. |
r_index | Optional 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().
void EDBM_verts_mirror_cache_clear | ( | struct BMEditMesh * | em, |
struct BMVert * | v | ||
) |
Definition at line 1303 of file editmesh_utils.c.
References BLI_assert, BMEditMesh::bm, CustomData_bmesh_get_layer_n(), BMHeader::data, BMVert::head, BMEditMesh::mirror_cdlayer, v, and BMesh::vdata.
void EDBM_verts_mirror_cache_end | ( | struct BMEditMesh * | em | ) |
Definition at line 1314 of file editmesh_utils.c.
References BMEditMesh::mirror_cdlayer.
Referenced by ED_vgroup_mirror(), edbm_do_smooth_laplacian_vertex_exec(), edbm_do_smooth_vertex_exec(), and EDBM_select_mirrored().
struct BMVert* EDBM_verts_mirror_get | ( | struct BMEditMesh * | em, |
struct BMVert * | v | ||
) |
Definition at line 1253 of file editmesh_utils.c.
References BLI_assert, BMEditMesh::bm, bm, CustomData_bmesh_get_layer_n(), BMHeader::data, BMVert::head, BMEditMesh::mirror_cdlayer, NULL, BMesh::totvert, v, BMesh::vdata, and BMesh::vtable.
Referenced by ED_vgroup_mirror(), EDBM_select_mirrored(), EDBM_verts_mirror_apply(), EDBM_verts_mirror_get_edge(), and EDBM_verts_mirror_get_face().
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().
struct BMFace* EDBM_verts_mirror_get_face | ( | struct BMEditMesh * | em, |
struct BMFace * | f | ||
) |
Definition at line 1286 of file editmesh_utils.c.
References BLI_array_alloca, BM_face_exists(), BM_FACE_FIRST_LOOP, EDBM_verts_mirror_get(), BMFace::len, BMLoop::next, NULL, and BMLoop::v.
Referenced by EDBM_select_mirrored().
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 | ||
) |
Definition at line 977 of file meshtools.cc.
References editbmesh_get_x_mirror_vert_spatial(), and editbmesh_get_x_mirror_vert_topo().
Referenced by ED_mesh_defvert_mirror_update_em(), and ED_mesh_mirror_get_vert().
void em_setup_viewcontext | ( | struct bContext * | C, |
struct ViewContext * | vc | ||
) |
Definition at line 4353 of file editmesh_select.c.
References BKE_editmesh_from_object(), C, CTX_data_ensure_evaluated_depsgraph(), depsgraph, ED_view3d_viewcontext_init(), ViewContext::em, and ViewContext::obedit.
Referenced by edbm_dupli_extrude_cursor_invoke(), edbm_preselect_or_active_init_viewcontext(), edbm_select_linked_pick_invoke(), EDBM_select_pick(), edbm_shortest_path_pick_invoke(), gizmo_preselect_edgering_test_select(), gizmo_preselect_elem_test_select(), knifeproject_exec(), knifetool_invoke(), loopcut_modal(), mouse_mesh_loop(), ringsel_init(), and view3d_circle_select_recalc().
int* mesh_get_x_mirror_faces | ( | struct Object * | ob, |
struct BMEditMesh * | em, | ||
struct Mesh * | me_eval | ||
) |
This is a Mesh-based copy of mesh_get_x_mirror_faces().
Definition at line 1115 of file meshtools.cc.
References Freestyle::a, BLI_assert, BLI_ghash_free(), BLI_ghash_insert(), BLI_ghash_lookup(), BLI_ghash_new_ex(), Object::data, ED_mesh_mirror_spatial_table_begin(), ED_mesh_mirror_spatial_table_end(), Mesh::editflag, if(), ME_EDIT_MIRROR_TOPO, MEM_callocN, MEM_freeN, mesh_get_x_mirror_vert(), Mesh::mface, mirror_facecmp(), mirror_facehash(), mirror_facerotation(), Mesh::mvert, SWAP, Mesh::totface, Mesh::totvert, MFace::v1, MFace::v2, MFace::v3, and MFace::v4.
Referenced by PE_mirror_x().
int mesh_get_x_mirror_vert | ( | struct Object * | ob, |
struct Mesh * | me_eval, | ||
int | index, | ||
bool | use_topology | ||
) |
Retrieves mirrored cache vert, or NULL if there isn't one.
Definition at line 916 of file meshtools.cc.
References mesh_get_x_mirror_vert_spatial(), and mesh_get_x_mirror_vert_topo().
Referenced by do_weight_paint_vertex_multi(), do_weight_paint_vertex_single(), ED_mesh_defvert_mirror_update_ob(), ED_mesh_mirror_get_vert(), ED_vgroup_mirror(), envelope_bone_weighting(), heat_bone_weighting(), mesh_get_x_mirror_faces(), object_shape_key_mirror(), and weight_paint_set().
bool paintface_deselect_all_visible | ( | struct bContext * | C, |
struct Object * | ob, | ||
int | action, | ||
bool | flush_flags | ||
) |
Definition at line 255 of file editface.cc.
References BKE_mesh_from_object(), C, MPoly::flag, ME_FACE_SEL, ME_HIDE, Mesh::mpoly, paintface_flush_flags(), SEL_DESELECT, SEL_INVERT, SEL_SELECT, SEL_TOGGLE, SELECT, and Mesh::totpoly.
Referenced by do_lasso_select_paintface(), do_paintface_box_select(), ed_wpaint_vertex_select_pick(), face_select_all_exec(), paint_facesel_circle_select(), and paintface_mouse_select().
Copy the face flags, most importantly selection from the mesh to the final derived mesh, use in object mode when selecting faces (while painting).
Definition at line 39 of file editface.cc.
References BKE_mesh_batch_cache_dirty_tag(), BKE_MESH_BATCH_DIRTY_ALL, BKE_MESH_BATCH_DIRTY_SELECT_PAINT, BKE_mesh_flush_select_from_polys(), BKE_mesh_from_object(), BLI_assert, C, CD_ORIGINDEX, CTX_data_ensure_evaluated_depsgraph(), CustomData_get_layer(), Object::data, Object_Runtime::data_eval, Object_Runtime::data_orig, DEG_get_evaluated_object(), DEG_id_tag_update(), depsgraph, MPoly::flag, ID_RECALC_COPY_ON_WRITE, ID_RECALC_SELECT, ME_HIDE, Mesh::mpoly, NC_GEOM, ND_SELECT, ORIGINDEX_NONE, Object::runtime, SELECT, Mesh::totpoly, and WM_event_add_notifier().
Referenced by do_lasso_select_paintface(), do_paintface_box_select(), paint_facesel_circle_select(), paintface_deselect_all_visible(), paintface_hide(), paintface_mouse_select(), paintface_reveal(), and paintface_select_linked().
Definition at line 116 of file editface.cc.
References BKE_mesh_flush_hidden_from_polys(), BKE_mesh_from_object(), C, MPoly::flag, ME_FACE_SEL, ME_HIDE, Mesh::mpoly, paintface_flush_flags(), SELECT, and Mesh::totpoly.
Referenced by face_select_hide_exec().
Definition at line 308 of file editface.cc.
References add_v3_v3v3(), usdtokens::b(), BKE_mesh_from_object(), MVert::co, copy_m3_m4(), MPoly::flag, MPoly::loopstart, ME_FACE_SEL, ME_HIDE, minmax_v3v3_v3(), Mesh::mloop, Mesh::mloopuv, Mesh::mpoly, mul_v3_m3v3(), Mesh::mvert, Object::obmat, MPoly::totloop, Mesh::totpoly, and MLoop::v.
Referenced by viewselected_exec().
bool paintface_mouse_select | ( | struct bContext * | C, |
const int | mval[2], | ||
const struct SelectPick_Params * | params, | ||
struct Object * | ob | ||
) |
Referenced by view3d_select_exec().
Definition at line 141 of file editface.cc.
References BKE_mesh_flush_hidden_from_polys(), BKE_mesh_from_object(), C, MPoly::flag, ME_FACE_SEL, ME_HIDE, Mesh::mpoly, paintface_flush_flags(), select(), SELECT, SET_FLAG_FROM_TEST, and Mesh::totpoly.
Referenced by face_vert_reveal_exec().
void paintface_select_linked | ( | struct bContext * | C, |
struct Object * | ob, | ||
const int | mval[2], | ||
bool | select | ||
) |
Definition at line 235 of file editface.cc.
References BKE_mesh_from_object(), C, ED_MESH_PICK_DEFAULT_FACE_DIST, ED_mesh_pick_face(), paintface_flush_flags(), select(), SELECT, select_linked_tfaces_with_seams(), and Mesh::totpoly.
Referenced by paint_select_linked_exec(), and paint_select_linked_pick_invoke().
Definition at line 464 of file editface.cc.
References BKE_mesh_from_object(), BKE_mesh_mselect_clear(), BKE_mesh_mselect_validate(), ELEM, MVert::flag, ME_HIDE, Mesh::mvert, paintvert_flush_flags(), SEL_DESELECT, SEL_INVERT, SEL_SELECT, SEL_TOGGLE, SELECT, and Mesh::totvert.
Referenced by do_lasso_select_paintvert(), do_paintvert_box_select(), ed_wpaint_vertex_select_pick(), paint_vertsel_circle_select(), paintvert_select_ungrouped(), and vert_select_all_exec().
(similar to void paintface_flush_flags(Object *ob)
) copy the vertex flags, most importantly selection from the mesh to the final derived mesh, use in object mode when selecting vertices (while painting).
Definition at line 412 of file editface.cc.
References BKE_mesh_batch_cache_dirty_tag(), BKE_MESH_BATCH_DIRTY_ALL, BKE_mesh_flush_select_from_verts(), BKE_mesh_from_object(), BKE_object_get_evaluated_mesh(), CD_ORIGINDEX, CustomData_get_layer(), MVert::flag, Mesh::mvert, ORIGINDEX_NONE, Mesh::totvert, and Mesh::vdata.
Referenced by do_lasso_select_paintvert(), do_paintvert_box_select(), ed_wpaint_vertex_select_pick(), paint_vertsel_circle_select(), paintvert_deselect_all_visible(), paintvert_hide(), paintvert_reveal(), paintvert_select_ungrouped(), and vgroup_select_verts().
Definition at line 555 of file editface.cc.
References BKE_mesh_flush_hidden_from_verts(), BKE_mesh_from_object(), C, MVert::flag, ME_HIDE, Mesh::mvert, NULL, paintvert_flush_flags(), paintvert_tag_select_update(), SELECT, and Mesh::totvert.
Referenced by vert_select_hide_exec().
Definition at line 583 of file editface.cc.
References BKE_mesh_flush_hidden_from_verts(), BKE_mesh_from_object(), C, MVert::flag, ME_HIDE, Mesh::mvert, NULL, paintvert_flush_flags(), paintvert_tag_select_update(), select(), SELECT, SET_FLAG_FROM_TEST, and Mesh::totvert.
Referenced by face_vert_reveal_exec().
Definition at line 527 of file editface.cc.
References BKE_mesh_from_object(), Mesh::dvert, MDeformVert::dw, ME_HIDE, Mesh::mvert, paintvert_deselect_all_visible(), paintvert_flush_flags(), SEL_DESELECT, SELECT, and Mesh::totvert.
Referenced by vert_select_ungrouped_exec().
Definition at line 458 of file editface.cc.
References C, Object::data, DEG_id_tag_update(), ID_RECALC_COPY_ON_WRITE, ID_RECALC_SELECT, NC_GEOM, ND_SELECT, and WM_event_add_notifier().
Referenced by do_lasso_select_paintvert(), do_paintvert_box_select(), ed_wpaint_vertex_select_pick(), paint_vertsel_circle_select(), paintvert_hide(), paintvert_reveal(), vert_select_all_exec(), and vert_select_ungrouped_exec().