Blender
V3.3
|
Go to the source code of this file.
Classes | |
struct | BMEditMesh |
Typedefs | |
typedef struct BMEditMesh | BMEditMesh |
The EDBM module is for editmode bmesh stuff. In contrast, this module is for code shared with blenkernel that's only concerned with low level operations on the BMEditMesh structure.
Definition in file BKE_editmesh.h.
typedef struct BMEditMesh BMEditMesh |
This structure is used for mesh edit-mode.
Through this, you get access to both the edit BMesh, its tessellation, and various data that doesn't belong in the BMesh struct itself (mostly related to mesh evaluation).
The entire modifier system works with this structure, and not BMesh. #Mesh.edit_bmesh stores a pointer to this structure.
struct BoundBox* BKE_editmesh_cage_boundbox_get | ( | struct Object * | object, |
BMEditMesh * | em | ||
) |
Referenced by select_id_object_min_max().
BMEditMesh* BKE_editmesh_copy | ( | BMEditMesh * | em | ) |
Definition at line 36 of file editmesh.c.
References BMEditMesh::bm, BM_mesh_copy(), BMEditMesh::looptris, BMEditMesh::mat_nr, MEM_callocN, NULL, and BMEditMesh::selectmode.
BMEditMesh* BKE_editmesh_create | ( | BMesh * | bm | ) |
Definition at line 29 of file editmesh.c.
References BMEditMesh::bm, bm, and MEM_callocN.
Referenced by EDBM_mesh_make(), geometry_extract_apply(), and undomesh_to_editmesh().
void BKE_editmesh_ensure_autosmooth | ( | BMEditMesh * | em, |
struct Mesh * | me | ||
) |
If auto-smooth not already set, set it.
Definition at line 297 of file editmesh.c.
References BKE_editmesh_lnorspace_update(), Mesh::flag, and ME_AUTOSMOOTH.
Referenced by edbm_average_normals_exec(), edbm_normals_tools_exec(), edbm_set_normals_from_faces_exec(), edbm_smooth_normals_exec(), initNormalRotation(), normals_split_merge(), and point_normals_init().
void BKE_editmesh_free_data | ( | BMEditMesh * | em | ) |
Definition at line 181 of file editmesh.c.
References BMEditMesh::bm, BM_mesh_free(), BMEditMesh::looptris, and MEM_freeN.
Referenced by BKE_mesh_free_editmesh(), EDBM_mesh_free_data(), and geometry_extract_apply().
BMEditMesh* BKE_editmesh_from_object | ( | struct Object * | ob | ) |
Return the BMEditMesh for a given object.
Definition at line 58 of file editmesh.c.
References BLI_assert, Object::data, OB_MESH, and Object::type.
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(), applyNormalRotation(), average_islands_scale_exec(), BKE_modifier_get_evaluated_mesh_from_evaluated_object(), calc_ortho_extent(), calcEdgeSlide_mval_range(), construct_param_handle_multi(), contarget_get_mesh_mat(), createEdgeSlideVerts_double_side(), createEdgeSlideVerts_single_side(), createTransEdge(), createTransEditVerts(), createTransMeshSkin(), createTransMeshVertCData(), createTransUVs(), createVertSlideVerts(), cube_project_exec(), cylinder_project_exec(), deformVerts(), do_lasso_select_mesh(), do_lasso_select_mesh_uv(), ED_object_calc_active_center_for_editmode(), ED_object_editmode_enter_ex(), ED_operator_editmesh(), ED_operator_editmesh_auto_smooth(), ED_operator_uvmap(), ED_space_image_auto_set(), ED_space_image_show_uvedit(), ED_transform_calc_gizmo_stats(), ED_transverts_create_from_obedit(), ED_transverts_update_obedit(), ED_uvedit_ensure_uvs(), ED_uvedit_get_aspect(), ED_uvedit_live_unwrap_begin(), ED_uvedit_median_multi(), ED_uvedit_minmax_multi(), ED_uvedit_pack_islands_multi(), ED_uvedit_selectmode_clean(), ED_uvedit_test(), ED_vgroup_parray_mirror_assign(), ED_vgroup_parray_mirror_sync(), ED_view3d_gizmo_mesh_preselect_get_active(), ED_view3d_viewcontext_init_object(), 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_bevel_exit(), edbm_bevel_init(), edbm_bridge_edge_loops_exec(), edbm_collapse_edge_exec(), 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_mode_exec(), edbm_dissolve_verts_exec(), edbm_do_smooth_laplacian_vertex_exec(), edbm_do_smooth_vertex_exec(), edbm_duplicate_exec(), edbm_edge_rotate_selected_exec(), edbm_edge_split_exec(), EDBM_elem_from_index_any_multi(), EDBM_elem_to_index_any_multi(), 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_select_interior_exec(), edbm_faces_shade_flat_exec(), edbm_faces_shade_smooth_exec(), edbm_fill_exec(), edbm_fill_grid_exec(), edbm_fill_holes_exec(), edbm_flag_disable_all_multi(), edbm_flip_normals_exec(), edbm_hide_exec(), edbm_inset_calc(), edbm_inset_cancel(), edbm_inset_init(), edbm_intersect_boolean_exec(), edbm_intersect_exec(), edbm_knife_cut_exec(), edbm_loop_multiselect_exec(), edbm_loop_to_region_exec(), edbm_mark_seam_exec(), edbm_mark_sharp_exec(), edbm_merge_exec(), EDBM_mesh_deselect_all_multi_ex(), EDBM_mesh_elem_index_ensure_multi(), EDBM_mesh_knife(), EDBM_mesh_stats_multi(), edbm_mod_weighted_strength_exec(), edbm_normals_make_consistent_exec(), edbm_normals_tools_exec(), edbm_offset_edgeloop_exec(), edbm_point_normals_modal(), edbm_poke_face_exec(), edbm_preselect_or_active(), edbm_quads_convert_to_tris_exec(), edbm_region_to_loop_exec(), edbm_remove_doubles_exec(), edbm_reveal_exec(), edbm_reverse_colors_exec(), edbm_reverse_uvs_exec(), edbm_rip_edge_invoke(), edbm_rip_invoke(), edbm_rip_invoke__edge(), edbm_rip_invoke__vert(), edbm_rotate_colors_exec(), edbm_rotate_uvs_exec(), edbm_screw_exec(), edbm_select_all_exec(), edbm_select_axis_exec(), edbm_select_face_by_sides_exec(), edbm_select_id_bm_elem_get(), edbm_select_less_exec(), edbm_select_linked_exec(), edbm_select_linked_flat_faces_exec(), edbm_select_linked_pick_exec(), edbm_select_loose_exec(), edbm_select_mirror_exec(), edbm_select_more_exec(), edbm_select_non_manifold_exec(), edbm_select_nth_exec(), EDBM_select_pick(), edbm_select_random_exec(), edbm_select_sharp_edges_exec(), edbm_select_similar_region_exec(), edbm_select_ungrouped_exec(), edbm_select_ungrouped_poll(), EDBM_selectmode_disable_multi_ex(), EDBM_selectmode_set_multi(), EDBM_selectmode_to_scene(), EDBM_selectmode_toggle_multi(), edbm_separate_exec(), edbm_set_normals_from_faces_exec(), edbm_shortest_path_pick_exec(), edbm_shortest_path_select_exec(), edbm_smooth_normals_exec(), edbm_solidify_exec(), edbm_sort_elements_exec(), edbm_spin_exec(), edbm_split_exec(), edbm_subdivide_edge_ring_exec(), edbm_subdivide_exec(), edbm_tris_convert_to_quads_exec(), EDBM_unified_findnearest_from_raycast(), edbm_unsubdivide_exec(), edbm_vert_connect_concave_exec(), edbm_vert_connect_exec(), edbm_vert_connect_nonplaner_exec(), edbm_vert_connect_path_exec(), edbm_wireframe_exec(), edgering_select(), editbmesh_get_eval_cage_from_orig(), em_setup_viewcontext(), freeCustomNormalArray(), getTransformOrientation_ex(), gizmo_mesh_spin_init_refresh(), gizmo_preselect_edgering_test_select(), gizmo_preselect_elem_test_select(), initNormalRotation(), knife_bvh_init(), knife_bvh_raycast_cb(), knife_find_line_hits(), knife_make_cuts(), knife_ray_intersect_face(), knifeproject_exec(), knifetool_finish_single_post(), knifetool_init(), knifetool_init_obinfo(), knifetool_invoke(), loopcut_init(), make_prim_finish(), material_slot_assign_exec(), material_slot_de_select(), merge_type_itemf(), mesh_bisect_exec(), mesh_bisect_invoke(), mesh_circle_select(), mesh_data_from_duplicator_object(), mesh_symmetrize_exec(), mesh_symmetry_snap_exec(), minimize_stretch_exit(), minimize_stretch_iteration(), mouse_mesh_loop(), mouse_mesh_shortest_path_edge(), mouse_mesh_shortest_path_face(), mouse_mesh_shortest_path_vert(), mouse_mesh_uv_shortest_path_edge(), mouse_mesh_uv_shortest_path_face(), mouse_mesh_uv_shortest_path_vert(), nearest_world_object_fn(), normals_split_merge(), point_normals_apply(), point_normals_init(), raycast_obj_fn(), recalcData_mesh_cdata(), recalcData_mesh_skin(), reset_exec(), ringsel_find_edge(), select_id_object_min_max(), select_similar_type_itemf(), shape_itemf(), similar_edge_select_exec(), similar_face_select_exec(), similar_vert_select_exec(), skin_loose_mark_clear_exec(), skin_radii_equalize_exec(), skin_root_mark_exec(), smart_project_exec(), snap_curs_to_sel_ex(), snap_mesh_edge_verts_mixed(), snap_mesh_polygon(), snap_obj_fn(), snap_object_data_editmesh_treedata_get(), snap_object_data_mesh_get(), snap_sel_to_grid_exec(), snap_selected_to_location(), sort_bmelem_flag(), special_aftertrans_update__mesh(), sphere_project_exec(), stats_object_edit(), stitch_exit(), stitch_init(), stitch_invoke(), tc_mesh_customdatacorrect_create_impl(), tc_mesh_partial_ensure(), tc_mesh_partial_update(), transform_convert_mesh_crazyspace_detect(), transformEnd(), uiTemplateEditModeSelection(), uv_box_select_exec(), uv_circle_select_exec(), uv_find_nearest_edge(), uv_find_nearest_face_ex(), uv_find_nearest_loop_from_edge(), uv_find_nearest_loop_from_vert(), uv_find_nearest_vert(), uv_from_view_exec(), uv_hide_exec(), uv_map_clip_correct_multi(), uv_mouse_select_loop_generic_multi(), uv_mouse_select_multi(), uv_pin_exec(), uv_remove_doubles_to_selected(), uv_remove_doubles_to_unselected(), uv_reveal_exec(), uv_sculpt_stroke_apply(), uv_sculpt_stroke_init(), uv_select_all_perform(), uv_select_edgeloop(), uv_select_edgering(), uv_select_faceloop(), uv_select_flush_from_tag_face(), uv_select_flush_from_tag_loop(), uv_select_linked_multi(), uv_select_more_less(), uv_select_overlap(), uv_select_pinned_exec(), uv_select_similar_edge_exec(), uv_select_similar_face_exec(), uv_select_similar_vert_exec(), uv_select_split_exec(), uv_shortest_path_pick_ex(), uv_shortest_path_pick_exec(), uv_shortest_path_pick_invoke(), uv_shortest_path_select_exec(), uv_snap_selection_exec(), uv_snap_uvs_offset(), uv_snap_uvs_to_adjacent_unselected(), uv_snap_uvs_to_cursor(), uv_snap_uvs_to_pixels(), uv_weld_align(), uvedit_center(), uvedit_have_selection_multi(), uvedit_nearest_uv(), uvedit_select_is_any_selected(), uvedit_translate(), uvedit_unwrap(), vgroup_do_remap(), vgroup_smooth_subset(), and view3d_box_select_exec().
void BKE_editmesh_lnorspace_update | ( | BMEditMesh * | em, |
struct Mesh * | me | ||
) |
Definition at line 276 of file editmesh.c.
References BMEditMesh::bm, bm, BM_edges_sharp_from_angle_set(), BM_lnorspace_update(), CD_CUSTOMLOOPNORMAL, CustomData_has_layer(), Mesh::flag, BMesh::ldata, ME_AUTOSMOOTH, and Mesh::smoothresh.
Referenced by BKE_editmesh_ensure_autosmooth(), edbm_average_normals_exec(), edbm_normals_tools_exec(), edbm_set_normals_from_faces_exec(), edbm_smooth_normals_exec(), initNormalRotation(), initTransform(), normals_split_merge(), and point_normals_init().
void BKE_editmesh_looptri_and_normals_calc | ( | BMEditMesh * | em | ) |
Performing the face normal calculation at the same time as tessellation gives a reasonable performance boost (approx ~20% faster).
Definition at line 135 of file editmesh.c.
References BKE_editmesh_looptri_calc_ex(), BMEditMesh::bm, and BM_mesh_normals_update_ex().
Referenced by ED_object_editmode_enter_ex(), EDBM_update(), object_hook_index_array(), recalcData_mesh_cdata(), recalcData_mesh_skin(), tc_mesh_partial_update(), undomesh_to_editmesh(), and vertex_parent_set_exec().
void BKE_editmesh_looptri_and_normals_calc_with_partial | ( | BMEditMesh * | em, |
struct BMPartialUpdate * | bmpinfo | ||
) |
Definition at line 166 of file editmesh.c.
References BKE_editmesh_looptri_calc_with_partial_ex(), BMEditMesh::bm, and BM_mesh_normals_update_with_partial_ex().
Referenced by editmesh_partial_update_update_fn().
void BKE_editmesh_looptri_calc | ( | BMEditMesh * | em | ) |
Definition at line 127 of file editmesh.c.
References BKE_editmesh_looptri_calc_ex().
Referenced by EDBM_redo_state_restore(), EDBM_redo_state_restore_and_free(), and EDBM_update().
void BKE_editmesh_looptri_calc_ex | ( | BMEditMesh * | em, |
const struct BMeshCalcTessellation_Params * | params | ||
) |
Definition at line 110 of file editmesh.c.
References BKE_mesh_runtime_looptri_ensure(), editmesh_tessface_calc_intern(), and params.
Referenced by BKE_editmesh_looptri_and_normals_calc(), and BKE_editmesh_looptri_calc().
void BKE_editmesh_looptri_calc_with_partial | ( | BMEditMesh * | em, |
struct BMPartialUpdate * | bmpinfo | ||
) |
Definition at line 157 of file editmesh.c.
References BKE_editmesh_looptri_calc_with_partial_ex().
void BKE_editmesh_looptri_calc_with_partial_ex | ( | BMEditMesh * | em, |
struct BMPartialUpdate * | bmpinfo, | ||
const struct BMeshCalcTessellation_Params * | params | ||
) |
Definition at line 147 of file editmesh.c.
References BLI_assert, BMEditMesh::bm, BM_mesh_calc_tessellation_with_partial_ex(), BMEditMesh::looptris, NULL, params, poly_to_tri_count(), BMesh::totface, BMesh::totloop, and BMEditMesh::tottri.
Referenced by BKE_editmesh_looptri_and_normals_calc_with_partial(), BKE_editmesh_looptri_calc_with_partial(), and tc_mesh_partial_update().
float(* BKE_editmesh_vert_coords_alloc | ( | struct Depsgraph * | depsgraph, |
struct BMEditMesh * | em, | ||
struct Scene * | scene, | ||
struct Object * | ob, | ||
int * | r_vert_len | ||
) | )[3] |
Definition at line 212 of file editmesh.c.
References BKE_mesh_foreach_mapped_vert(), BLI_BITMAP_NEW, cage_mapped_verts_callback(), CD_MASK_BAREMESH, CageUserData::cos_cage, data, depsgraph, editbmesh_get_eval_cage(), float(), MEM_callocN, MEM_freeN, MESH_FOREACH_NOP, scene, and CageUserData::visit_bitmap.
Referenced by BKE_editmesh_vert_coords_when_deformed(), and knifetool_init_obinfo().
float(* BKE_editmesh_vert_coords_alloc_orco | ( | BMEditMesh * | em, |
int * | r_vert_len | ||
) | )[3] |
Definition at line 271 of file editmesh.c.
References BM_mesh_vert_coords_alloc().
Referenced by correctivesmooth_modifier_do().
const float(* BKE_editmesh_vert_coords_when_deformed | ( | struct Depsgraph * | depsgraph, |
struct BMEditMesh * | em, | ||
struct Scene * | scene, | ||
struct Object * | obedit, | ||
int * | r_vert_len, | ||
bool * | r_is_alloc | ||
) | )[3] |
Definition at line 241 of file editmesh.c.
References BKE_editmesh_vert_coords_alloc(), BKE_object_get_editmesh_eval_final(), DEG_get_evaluated_object(), depsgraph, Mesh_Runtime::edit_data, float(), ME_WRAPPER_TYPE_BMESH, NULL, Mesh::runtime, scene, EditMeshData::vertexCos, and Mesh_Runtime::wrapper_type.
Referenced by gizmo_preselect_edgering_test_select(), and ringsel_find_edge().