Blender V2.61 - r43446
|
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "MEM_guardedalloc.h"
#include "DNA_meshdata_types.h"
#include "DNA_modifier_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_editVert.h"
#include "BLI_edgehash.h"
#include "BLI_utildefines.h"
#include "BKE_customdata.h"
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_mesh.h"
#include "ED_mesh.h"
#include "ED_screen.h"
#include "ED_view3d.h"
#include "ED_transform.h"
#include "mesh_intern.h"
Go to the source code of this file.
Definition in file editmesh_lib.c.
#define NOCALC_EDGEWEIGHT_ADD_EDGEREF_FACE | ( | EDV1, | |
EDV2 | |||
) |
; \ { \ const unsigned int mf_v1 = EDV1; \ const unsigned int mf_v2 = EDV2; \ edge_ref = (EdgeFaceRef *)BLI_edgehash_lookup(edge_hash, mf_v1, mf_v2); \ if (!edge_ref) { \ edge_ref = &edge_ref_array[edge_ref_count]; edge_ref_count++; \ edge_ref->f1 = i; \ edge_ref->f2 = -1; \ BLI_edgehash_insert(edge_hash, mf_v1, mf_v2, edge_ref); \ } \ else { \ edge_ref->f2 = i; \ } \ }
Referenced by dm_calc_normal(), and EM_make_hq_normals().
#define SET_EED_FLAG | ( | eed, | |
flag | |||
) |
if (eed->h==0) { \ if (flag & SELECT && !(eed->f & SELECT)) { \ ++seledge; \ } \ eed->f |= flag; \ SET_EVE_FLAG(eed->v1, flag); \ SET_EVE_FLAG(eed->v2, flag); \ }
Definition at line 78 of file editmesh_lib.c.
Referenced by EM_set_flag_all_selectmode().
#define SET_EVE_FLAG | ( | eve, | |
flag | |||
) |
if (eve->h==0) { \ if (flag & SELECT && !(eve->f & SELECT)) { \ ++selvert; \ } \ eve->f |= flag; \ }
Definition at line 70 of file editmesh_lib.c.
typedef struct EdgeFaceRef EdgeFaceRef |
static void add_normal_aligned | ( | float * | nor, |
float * | add | ||
) | [static] |
Definition at line 1001 of file editmesh_lib.c.
References add_v3_v3(), dot_v3v3(), EditVert::f, and sub_v3_v3().
Referenced by extrudeflag_edge(), extrudeflag_edges_indiv(), and extrudeflag_vert().
Definition at line 1835 of file editmesh_lib.c.
References addvertlist(), EditVert::co, EditVert::f, EditVert::tmp, and EditVert::v.
Referenced by adduplicateflag().
void adduplicateflag | ( | EditMesh * | em, |
int | flag | ||
) |
Definition at line 1851 of file editmesh_lib.c.
References addedgelist(), addfacelist(), adduplicate_vertex(), EditMesh::edges, EM_clear_flag_all(), EM_fgon_flags(), EM_get_actFace(), EM_selectmode_set(), EM_set_actFace(), EditEdge::f, EditVert::f, EditFace::f, EditMesh::faces, ListBase::last, NULL, EditFace::prev, EditEdge::prev, EditVert::prev, EditVert::tmp, EditVert::v, EditFace::v1, EditEdge::v1, EditFace::v2, EditEdge::v2, EditFace::v3, EditFace::v4, and EditMesh::verts.
Referenced by mesh_duplicate_exec(), mesh_separate_selected(), spin_mesh(), and split_mesh().
static void check_fgons_selection | ( | EditMesh * | em | ) | [static] |
Definition at line 643 of file editmesh_lib.c.
References BLI_addtail(), BLI_movelisttolist(), BLI_remlink(), EditFace::e1, EditFace::e2, EditFace::e3, EditFace::e4, EditMesh::edges, EditEdge::f, EditFace::f, EditMesh::faces, EditEdge::fgoni, ListBase::first, MEM_callocN(), MEM_freeN(), EditEdge::next, EditFace::next, and SELECT.
Referenced by EM_convertsel(), and EM_selectmode_flush().
Definition at line 2041 of file editmesh_lib.c.
References EditFace::v1, EditFace::v2, EditFace::v3, and EditFace::v4.
Referenced by exist_face(), and removedoublesflag().
int convex | ( | float * | v1, |
float * | v2, | ||
float * | v3, | ||
float * | v4 | ||
) |
Definition at line 2097 of file editmesh_lib.c.
References ABS, isect_line_line_v2(), and normal_tri_v3().
Referenced by addedgeface_mesh(), beautify_fill(), draw_volume(), and edge_flip().
void delfaceflag | ( | EditMesh * | em, |
int | flag | ||
) |
Definition at line 1915 of file editmesh_lib.c.
References BLI_remlink(), EditFace::e1, EditFace::e2, EditFace::e3, EditFace::e4, EditMesh::edges, EditEdge::f, EditVert::f, EditFace::f, EditEdge::f2, EditMesh::faces, ListBase::first, free_editedge(), free_editface(), free_editvert(), EditEdge::next, EditFace::next, EditVert::next, remedge(), EditEdge::v1, EditEdge::v2, and EditMesh::verts.
Referenced by delete_mesh(), mesh_separate_selected(), and split_mesh().
static void deselect_nth_active | ( | EditMesh * | em, |
EditVert ** | eve_p, | ||
EditEdge ** | eed_p, | ||
EditFace ** | efa_p | ||
) | [static] |
Definition at line 2773 of file editmesh_lib.c.
References EditSelection::data, EditMesh::edges, EDITEDGE, EDITFACE, EDITVERT, EM_get_actFace(), EditEdge::f, EditVert::f, ListBase::first, ListBase::last, EditEdge::next, EditVert::next, NULL, SCE_SELECT_EDGE, SCE_SELECT_FACE, SCE_SELECT_VERTEX, SELECT, EditMesh::selected, EditMesh::selectmode, EditSelection::type, and EditMesh::verts.
Referenced by EM_deselect_nth().
void EM_add_data_layer | ( | EditMesh * | em, |
CustomData * | data, | ||
int | type, | ||
const char * | name | ||
) |
Definition at line 975 of file editmesh_lib.c.
References CD_CALLOC, CustomData_add_layer_named(), data, CustomData::layers, MEM_dupallocN(), MEM_freeN(), NULL, and update_data_blocks().
Referenced by ED_mesh_color_add(), ED_mesh_uv_texture_add(), ED_uvedit_assign_image(), ED_uvedit_ensure_uvs(), and vgroup_assign_verts().
static int EM_check_selection | ( | EditMesh * | em, |
void * | data | ||
) | [static] |
Definition at line 211 of file editmesh_lib.c.
References EditSelection::data, ListBase::first, EditSelection::next, and EditMesh::selected.
Referenced by EM_store_selection().
void EM_clear_flag_all | ( | EditMesh * | em, |
int | flag | ||
) |
Definition at line 493 of file editmesh_lib.c.
References BLI_freelistN(), EditMesh::edges, EditEdge::f, EditVert::f, EditFace::f, EditMesh::faces, ListBase::first, EditEdge::next, EditFace::next, EditVert::next, SELECT, EditMesh::selected, EditMesh::totedgesel, EditMesh::totfacesel, EditMesh::totvertsel, and EditMesh::verts.
Referenced by adduplicateflag(), edgering_sel(), EM_deselect_all(), EM_toggle_select_all(), extrudeflag_edge(), extrudeflag_edges_indiv(), extrudeflag_face_indiv(), extrudeflag_verts_indiv(), make_prim(), mesh_separate_loose(), mesh_separate_material(), mouse_mesh(), mouse_mesh_loop(), and region_to_loop().
void EM_convertsel | ( | EditMesh * | em, |
short | oldmode, | ||
short | selectmode | ||
) |
Definition at line 769 of file editmesh_lib.c.
References check_fgons_selection(), EditFace::e1, EditFace::e2, EditFace::e3, EditFace::e4, EditMesh::edges, EM_nedges_selected(), EM_nfaces_selected(), EM_nvertices_selected(), EM_select_edge(), EM_select_face(), EditEdge::f, EditVert::f, EditFace::f1, EditVert::f1, EditEdge::f1, EditMesh::faces, ListBase::first, EditEdge::next, EditFace::next, EditVert::next, SCE_SELECT_EDGE, SCE_SELECT_FACE, SCE_SELECT_VERTEX, SELECT, EditFace::v1, EditEdge::v1, EditFace::v2, EditEdge::v2, EditFace::v3, EditFace::v4, and EditMesh::verts.
Referenced by do_view3d_header_buttons().
void EM_data_interp_from_faces | ( | EditMesh * | em, |
EditFace * | efa1, | ||
EditFace * | efa2, | ||
EditFace * | efan, | ||
int | i1, | ||
int | i2, | ||
int | i3, | ||
int | i4 | ||
) |
Definition at line 910 of file editmesh_lib.c.
References CustomData_em_interp(), EditFace::data, EditMesh::fdata, NULL, and simple_enum_gen::w.
Referenced by EM_face_from_faces(), flipface(), and removedoublesflag().
void EM_data_interp_from_verts | ( | EditMesh * | em, |
EditVert * | v1, | ||
EditVert * | v2, | ||
EditVert * | eve, | ||
float | fac | ||
) |
Definition at line 895 of file editmesh_lib.c.
References CustomData_em_interp(), EditVert::data, NULL, EditMesh::vdata, and simple_enum_gen::w.
Referenced by fill_quad_double_adj_inner(), removedoublesflag(), and subdivide_edge_addvert().
void EM_deselect_flush | ( | EditMesh * | em | ) |
Definition at line 591 of file editmesh_lib.c.
References EditMesh::edges, EM_nedges_selected(), EM_nfaces_selected(), EditFace::f, EditEdge::f, EditVert::f, EditMesh::faces, ListBase::first, EditFace::next, EditEdge::next, SELECT, EditFace::v1, EditEdge::v1, EditFace::v2, EditEdge::v2, EditFace::v3, and EditFace::v4.
Referenced by border_select_exec(), circle_select_exec(), em_deselect_nth_vert(), EM_select_less(), hide_exec(), mouse_select(), and vgroup_select_verts().
int EM_deselect_nth | ( | EditMesh * | em, |
int | nth | ||
) |
Definition at line 2826 of file editmesh_lib.c.
References deselect_nth_active(), em_deselect_nth_edge(), em_deselect_nth_face(), and em_deselect_nth_vert().
Referenced by mesh_select_nth_exec().
Definition at line 2644 of file editmesh_lib.c.
References EditFace::e1, EditFace::e2, EditFace::e3, EditFace::e4, EditMesh::edges, EM_nedges_selected(), EM_nfaces_selected(), EM_nvertices_selected(), EM_select_edge(), EditEdge::f, EditFace::f, EditMesh::faces, ListBase::first, EditVert::l, EditEdge::l, EditEdge::next, EditFace::next, EditVert::next, NULL, SELECT, tag_edge_verts(), tag_edge_verts_test(), EditVert::tmp, EditEdge::tmp, EditFace::v4, and EditMesh::verts.
Referenced by EM_deselect_nth().
Definition at line 2572 of file editmesh_lib.c.
References EditMesh::edges, EM_nedges_selected(), EM_nfaces_selected(), EM_nvertices_selected(), EM_select_face(), EditFace::f, EditMesh::faces, ListBase::first, EditFace::l, EditEdge::l, EditEdge::next, EditFace::next, NULL, SELECT, tag_face_edges(), tag_face_edges_test(), EditFace::tmp, and EditEdge::tmp.
Referenced by EM_deselect_nth().
Definition at line 2720 of file editmesh_lib.c.
References EditMesh::edges, EM_deselect_flush(), EM_nvertices_selected(), EditEdge::f, EditVert::f, ListBase::first, EditVert::l, EditEdge::next, EditVert::next, NULL, SELECT, EditVert::tmp, EditEdge::v1, EditEdge::v2, and EditMesh::verts.
Referenced by EM_deselect_nth().
void EM_editselection_center | ( | float * | center, |
EditSelection * | ese | ||
) |
Definition at line 295 of file editmesh_lib.c.
References add_v3_v3v3(), EditFace::cent, EditVert::co, copy_v3_v3(), EditSelection::data, EDITEDGE, EDITFACE, EDITVERT, mul_v3_fl(), EditSelection::type, EditEdge::v1, and EditEdge::v2.
Referenced by calc_manipulator_stats(), calculateCenter(), EM_editselection_plane(), and snap_curs_to_active().
void EM_editselection_normal | ( | float * | normal, |
EditSelection * | ese | ||
) |
Definition at line 310 of file editmesh_lib.c.
References add_v3_v3v3(), EditVert::co, copy_v3_v3(), cross_v3_v3v3(), EditSelection::data, EDITEDGE, EDITFACE, EDITVERT, EditFace::n, EditVert::no, normalize_v3(), sub_v3_v3v3(), EditSelection::type, EditEdge::v1, and EditEdge::v2.
Referenced by getTransformOrientation().
void EM_editselection_plane | ( | float * | plane, |
EditSelection * | ese | ||
) |
Definition at line 340 of file editmesh_lib.c.
References add_v3_v3v3(), EditVert::co, copy_v3_v3(), cross_v3_v3v3(), EditSelection::data, EDITEDGE, EDITFACE, EDITVERT, EM_editselection_center(), EditVert::no, normalize_v3(), EditSelection::prev, sub_v3_v3v3(), EditSelection::type, EditFace::v1, EditEdge::v1, EditFace::v2, EditEdge::v2, EditFace::v3, and EditFace::v4.
Referenced by getTransformOrientation().
float EM_face_area | ( | EditFace * | efa | ) |
Definition at line 2141 of file editmesh_lib.c.
References area_quad_v3(), area_tri_v3(), EditVert::co, EditFace::v1, EditFace::v2, EditFace::v3, and EditFace::v4.
Referenced by draw_uvs_stretch(), EM_fgon_flags(), and similar_face_select__internal().
EditFace* EM_face_from_faces | ( | EditMesh * | em, |
EditFace * | efa1, | ||
EditFace * | efa2, | ||
int | i1, | ||
int | i2, | ||
int | i3, | ||
int | i4 | ||
) | [read] |
Definition at line 933 of file editmesh_lib.c.
References addfacelist(), EM_data_interp_from_faces(), NULL, EditVert::v, and EditFace::v1.
Referenced by beautify_fill(), convert_to_triface(), edge_flip(), edge_rotate(), and join_triangles().
float EM_face_perimeter | ( | EditFace * | efa | ) |
Definition at line 2147 of file editmesh_lib.c.
References EditVert::co, len_v3v3(), EditFace::v1, EditFace::v2, EditFace::v3, and EditFace::v4.
Referenced by similar_face_select__internal().
void EM_fgon_flags | ( | EditMesh * | em | ) |
Definition at line 2161 of file editmesh_lib.c.
References BLI_addtail(), BLI_remlink(), curindex, EditFace::e1, EditFace::e2, EditFace::e3, EditFace::e4, EditMesh::edges, EM_face_area(), EM_FGON, EM_FGON_DRAW, EditMesh::faces, EditFace::fgonf, EditEdge::fgoni, ListBase::first, EditEdge::h, EditEdge::next, EditFace::next, NULL, and size().
Referenced by adduplicateflag(), convert_to_triface(), delete_mesh(), EM_reveal_mesh(), extrude_mesh(), extrude_repeat_mesh_exec(), make_editMesh(), make_fgon(), and spin_mesh().
void EM_free_data_layer | ( | EditMesh * | em, |
CustomData * | data, | ||
int | type | ||
) |
Definition at line 987 of file editmesh_lib.c.
References CustomData_free_layer_active(), data, CustomData::layers, MEM_dupallocN(), MEM_freeN(), NULL, and update_data_blocks().
Referenced by delete_customdata_layer(), and object_modifier_remove().
void EM_free_uv_vert_map | ( | UvVertMap * | vmap | ) |
Definition at line 2377 of file editmesh_lib.c.
References UvVertMap::buf, MEM_freeN(), and UvVertMap::vert.
Referenced by select_edgeloop(), select_linked(), stitch_exec(), and uv_faces_do_sticky().
Definition at line 153 of file editmesh_lib.c.
References EditMesh::act_face, EditSelection::data, EDITFACE, EditFace::f, EditMesh::faces, ListBase::first, EditFace::h, if(), ListBase::last, EditFace::next, NULL, EditSelection::prev, SELECT, EditMesh::selected, and EditSelection::type.
Referenced by adduplicateflag(), construct_param_handle(), correct_uv_aspect(), deselect_nth_active(), draw_em_fancy(), ED_uvedit_assign_image(), EM_get_active_mtface(), EM_get_actSelection(), EM_mesh_copy_face(), image_refresh(), load_editMesh(), make_editMesh(), and navmesh_face_copy_exec().
int EM_get_actSelection | ( | EditMesh * | em, |
EditSelection * | ese | ||
) |
Definition at line 181 of file editmesh_lib.c.
References EditSelection::data, EDITFACE, EM_get_actFace(), ListBase::last, EditSelection::next, NULL, EditSelection::prev, EditMesh::selected, and EditSelection::type.
Referenced by calc_manipulator_stats(), calculateCenter(), getTransformOrientation(), and snap_curs_to_active().
Definition at line 2372 of file editmesh_lib.c.
References EditVert::v, and UvVertMap::vert.
Referenced by select_linked(), stitch_exec(), uv_faces_do_sticky(), and uv_vertex_map_get().
void EM_hide_reset | ( | EditMesh * | em | ) |
Definition at line 881 of file editmesh_lib.c.
References EditFace::e1, EditFace::e2, EditFace::e3, EditFace::e4, EditMesh::edges, EditMesh::faces, ListBase::first, EditEdge::h, EditVert::h, EditFace::h, EditEdge::next, EditFace::next, EditEdge::v1, and EditEdge::v2.
Referenced by make_editMesh().
void EM_make_hq_normals | ( | EditMesh * | em | ) |
Definition at line 2406 of file editmesh_lib.c.
References add_v3_v3(), add_v3_v3v3(), angle(), angle_normalized_v3v3(), BLI_edgehash_free(), BLI_edgehash_new(), BLI_edgehashIterator_free(), BLI_edgehashIterator_getKey(), BLI_edgehashIterator_getValue(), BLI_edgehashIterator_isDone(), BLI_edgehashIterator_new(), BLI_edgehashIterator_step(), copy_v3_v3(), EM_free_index_arrays(), EM_get_face_for_index(), EM_get_vert_for_index(), EM_init_index_arrays(), EdgeFaceRef::f1, EdgeFaceRef::f2, EditMesh::faces, ListBase::first, i, EditVert::l, M_PI, MEM_callocN(), MEM_freeN(), mul_v3_fl(), EditFace::n, EditFace::next, EditVert::next, EditVert::no, NOCALC_EDGEWEIGHT_ADD_EDGEREF_FACE, normalize_v3(), NULL, EditVert::tmp, EditMesh::totedge, EditMesh::totface, EditMesh::verts, and zero_v3().
Referenced by solidify_exec().
UvVertMap* EM_make_uv_vert_map | ( | EditMesh * | em, |
int | selected, | ||
int | do_face_idx_array, | ||
float * | limit | ||
) | [read] |
Definition at line 2254 of file editmesh_lib.c.
References UvVertMap::buf, CD_MTFACE, CustomData_em_get(), EditFace::data, EM_free_index_arrays(), EM_get_face_for_index(), EM_init_index_arrays(), UvMapVert::f, EditFace::f, fabsf, EditMesh::faces, EditMesh::fdata, ListBase::first, free_uv_vert_map(), EditFace::h, i, EditVert::l, MEM_callocN(), EditFace::next, EditVert::next, UvMapVert::next, next, NULL, SELECT, UvMapVert::separate, sub_v2_v2v2(), UvMapVert::tfindex, EditVert::tmp, MTFace::uv, EditVert::v, EditFace::v1, EditFace::v4, UvVertMap::vert, and EditMesh::verts.
Referenced by select_edgeloop(), select_linked(), stitch_exec(), and uv_faces_do_sticky().
int EM_nedges_selected | ( | EditMesh * | em | ) |
Definition at line 105 of file editmesh_lib.c.
References EditMesh::edges, EditEdge::f, ListBase::first, EditEdge::next, SELECT, and EditMesh::totedgesel.
Referenced by EM_convertsel(), EM_deselect_flush(), em_deselect_nth_edge(), em_deselect_nth_face(), EM_select_flush(), EM_selectmode_flush(), EM_selectmode_set(), EM_stats_update(), loop_multiselect(), and undoMesh_to_editMesh().
int EM_nfaces_selected | ( | EditMesh * | em | ) |
Definition at line 91 of file editmesh_lib.c.
References EditFace::f, EditMesh::faces, ListBase::first, EditFace::next, SELECT, and EditMesh::totfacesel.
Referenced by EM_convertsel(), EM_deselect_flush(), em_deselect_nth_edge(), em_deselect_nth_face(), EM_select_flush(), EM_selectmode_flush(), EM_selectmode_set(), EM_stats_update(), and undoMesh_to_editMesh().
int EM_nvertices_selected | ( | EditMesh * | em | ) |
Definition at line 119 of file editmesh_lib.c.
References EditVert::f, ListBase::first, EditVert::next, SELECT, EditMesh::totvertsel, and EditMesh::verts.
Referenced by EM_convertsel(), em_deselect_nth_edge(), em_deselect_nth_face(), em_deselect_nth_vert(), EM_selectmode_flush(), EM_selectmode_set(), EM_stats_update(), EM_toggle_select_all(), knife_cut_exec(), and undoMesh_to_editMesh().
Definition at line 2846 of file editmesh_lib.c.
References EditVert::co, EditVert::f, ListBase::first, Object::imat, mul_v3_m4v3(), EditVert::next, Object::obmat, project_float_noclip(), SELECT, SNAP_NOT_OBEDIT, snapObjectsContext(), and EditMesh::verts.
Referenced by dupli_extrude_cursor().
void EM_remove_selection | ( | EditMesh * | em, |
void * | data, | ||
int | UNUSEDtype | ||
) |
Definition at line 222 of file editmesh_lib.c.
References BLI_freelinkN(), EditSelection::data, ListBase::first, EditSelection::next, and EditMesh::selected.
Referenced by free_editedge(), free_editface(), free_editvert(), mesh_rip_invoke(), mouse_mesh(), and mouse_mesh_shortest_path().
void EM_select_edge | ( | EditEdge * | eed, |
int | sel | ||
) |
Definition at line 433 of file editmesh_lib.c.
References EditVert::f, EditEdge::f, SELECT, EditEdge::v1, and EditEdge::v2.
Referenced by addedgeface_mesh(), do_lasso_select_mesh__doSelectEdge(), do_mesh_box_select__doSelectEdge(), edge_rotate_selected(), edgeloop_select(), edgering_sel(), edgering_select(), edgetag_context_set(), EM_backbuf_checkAndSelectEdges(), EM_convertsel(), em_deselect_nth_edge(), EM_hide_mesh(), EM_reveal_mesh(), EM_select_less(), EM_select_more(), EM_select_swap(), EM_selectmode_set(), esubdivideflag(), make_editMesh(), mesh_circle_doSelectEdge(), mesh_rip_invoke(), mouse_mesh(), mouse_mesh_shortest_path(), region_to_loop(), select_linked_pick_invoke(), select_non_manifold(), select_sharp_edges_exec(), selectrandom_mesh(), similar_edge_select__internal(), uvedit_edge_deselect(), and uvedit_edge_select().
void EM_select_face | ( | EditFace * | efa, |
int | sel | ||
) |
Definition at line 407 of file editmesh_lib.c.
References EditFace::e1, EditFace::e2, EditFace::e3, EditFace::e4, EditEdge::f, EditVert::f, EditFace::f, SELECT, EditFace::v1, EditFace::v2, EditFace::v3, and EditFace::v4.
Referenced by addedgeface_mesh(), beautify_fill(), convert_to_triface(), edge_flip(), EM_convertsel(), EM_deselect_by_material(), em_deselect_nth_face(), EM_hide_mesh(), EM_reveal_mesh(), EM_select_by_material(), EM_select_face_fgon(), EM_select_less(), EM_select_more(), EM_select_swap(), EM_selectmode_flush(), EM_selectmode_set(), faceloop_select(), fill_mesh(), hide_exec(), join_triangles(), loop_to_region(), make_editMesh(), reveal_exec(), select_by_number_vertices_exec(), select_linked_limited_invoke(), select_linked_pick_invoke(), selectrandom_mesh(), similar_face_select__internal(), uvedit_edge_deselect(), uvedit_edge_select(), uvedit_face_deselect(), uvedit_face_select(), uvedit_uv_deselect(), and uvedit_uv_select().
Definition at line 447 of file editmesh_lib.c.
References EditFace::e1, EditFace::e2, EditFace::e3, EditFace::e4, EM_select_face(), EditMesh::faces, EditFace::fgonf, EditEdge::fgoni, ListBase::first, G, G_DEBUG, EditFace::next, and EditFace::v4.
Referenced by do_lasso_select_mesh__doSelectFace(), do_mesh_box_select__doSelectFace(), EM_backbuf_checkAndSelectFaces(), mesh_circle_doSelectFace(), and mouse_mesh().
void EM_select_flush | ( | EditMesh * | em | ) |
Definition at line 622 of file editmesh_lib.c.
References EditMesh::edges, EM_nedges_selected(), EM_nfaces_selected(), EditFace::f, EditEdge::f, EditVert::f, EditMesh::faces, ListBase::first, EditFace::next, EditEdge::next, SELECT, EditFace::v1, EditEdge::v1, EditFace::v2, EditEdge::v2, EditFace::v3, and EditFace::v4.
Referenced by addfaces_from_edgenet(), beautify_fill(), border_select_exec(), circle_select_exec(), edge_rotate_selected(), EdgeLoopDelete(), EM_selectmode_set(), extrudeflag_edge(), extrudeflag_face_indiv(), fill_mesh(), make_prim(), mouse_select(), reveal_exec(), select_axis_exec(), select_editmesh_hook(), select_vertex_path_exec(), selectconnected_mesh_all(), and vgroup_select_verts().
void EM_selectmode_flush | ( | EditMesh * | em | ) |
Definition at line 719 of file editmesh_lib.c.
References check_fgons_selection(), EditFace::e1, EditFace::e2, EditFace::e3, EditFace::e4, EditMesh::edges, EM_nedges_selected(), EM_nfaces_selected(), EM_nvertices_selected(), EM_select_face(), EditFace::f, EditEdge::f, EditVert::f, EditMesh::faces, ListBase::first, EditFace::next, EditEdge::next, SCE_SELECT_EDGE, SCE_SELECT_FACE, SCE_SELECT_VERTEX, SELECT, EditMesh::selectmode, EditFace::v1, EditEdge::v1, EditFace::v2, EditEdge::v2, EditFace::v3, and EditFace::v4.
Referenced by bevel_menu(), do_lasso_select_mesh(), do_mesh_box_select(), edge_flip(), EM_deselect_by_material(), EM_reveal_mesh(), EM_select_by_material(), EM_select_less(), EM_select_swap(), EM_selectmode_set(), esubdivideflag(), extrudeflag_vert(), join_triangles(), loop_multiselect(), mesh_circle_select(), mouse_mesh(), mouse_mesh_loop(), mouse_mesh_shortest_path(), ringsel_finish(), select_by_number_vertices_exec(), select_mirror_exec(), selectrandom_mesh(), similar_edge_select_exec(), and similar_face_select_exec().
void EM_selectmode_set | ( | EditMesh * | em | ) |
Definition at line 840 of file editmesh_lib.c.
References EditMesh::edges, EM_nedges_selected(), EM_nfaces_selected(), EM_nvertices_selected(), EM_select_edge(), EM_select_face(), EM_select_flush(), EM_selectmode_flush(), EM_strip_selections(), EditVert::f, EditFace::f, EditEdge::f, EditMesh::faces, ListBase::first, EditVert::next, EditFace::next, EditEdge::next, SCE_SELECT_EDGE, SCE_SELECT_FACE, SCE_SELECT_VERTEX, SELECT, EditMesh::selectmode, and EditMesh::verts.
Referenced by addedgeface_mesh(), adduplicateflag(), beautify_fill(), do_view3d_header_buttons(), make_editMesh(), mesh_rip_invoke(), mesh_separate_selected(), region_to_loop(), and ringsel_finish().
Definition at line 833 of file editmesh_lib.c.
References Mesh::edit_mesh, get_mesh(), EditMesh::selectmode, ToolSettings::selectmode, and Scene::toolsettings.
Referenced by undo_editmode_step().
Definition at line 148 of file editmesh_lib.c.
References EditMesh::act_face.
Referenced by adduplicateflag(), free_editface(), make_editMesh(), mesh_separate_selected(), mouse_mesh(), and mouse_select().
void EM_set_flag_all | ( | EditMesh * | em, |
int | flag | ||
) |
Definition at line 509 of file editmesh_lib.c.
References EditMesh::edges, EditEdge::f, EditVert::f, EditFace::f, EditMesh::faces, ListBase::first, EditEdge::h, EditVert::h, EditFace::h, EditEdge::next, EditFace::next, EditVert::next, SELECT, EditMesh::totedge, EditMesh::totedgesel, EditMesh::totface, EditMesh::totfacesel, EditMesh::totvert, EditMesh::totvertsel, and EditMesh::verts.
Referenced by select_by_number_vertices_exec().
void EM_set_flag_all_selectmode | ( | EditMesh * | em, |
int | flag | ||
) |
Definition at line 526 of file editmesh_lib.c.
References EditFace::e1, EditFace::e2, EditFace::e3, EditFace::e4, EditMesh::edges, EditEdge::f, EditVert::f, EditFace::f, EditMesh::faces, ListBase::first, EditEdge::h, EditVert::h, EditFace::h, EditEdge::next, EditFace::next, EditVert::next, SCE_SELECT_EDGE, SCE_SELECT_FACE, SCE_SELECT_VERTEX, SELECT, EditMesh::selectmode, SET_EED_FLAG, EditMesh::totedge, EditMesh::totedgesel, EditMesh::totface, EditMesh::totfacesel, EditMesh::totvert, EditMesh::totvertsel, and EditMesh::verts.
Referenced by EM_select_all(), and EM_toggle_select_all().
void EM_solidify | ( | EditMesh * | em, |
float | dist | ||
) |
Definition at line 2512 of file editmesh_lib.c.
References angle_normalized_v3v3(), angle_quad_v3(), angle_tri_v3(), EditVert::co, EditMesh::faces, ListBase::first, i, EditVert::l, madd_v3_v3fl(), MEM_callocN(), MEM_freeN(), EditFace::next, EditVert::next, EditVert::no, SELECT, shell_angle_to_dist(), EditVert::tmp, EditMesh::totface, EditMesh::totvert, and EditMesh::verts.
Referenced by solidify_exec().
void EM_stats_update | ( | EditMesh * | em | ) |
Definition at line 133 of file editmesh_lib.c.
References BLI_countlist(), EditMesh::edges, EM_nedges_selected(), EM_nfaces_selected(), EM_nvertices_selected(), EditMesh::faces, EditMesh::totedge, EditMesh::totface, EditMesh::totvert, and EditMesh::verts.
Referenced by extrude_mesh(), load_editMesh(), make_prim(), mesh_extrude_itemf(), and mesh_separate_selected().
void EM_store_selection | ( | EditMesh * | em, |
void * | data, | ||
int | type | ||
) |
Definition at line 233 of file editmesh_lib.c.
References BLI_addtail(), EditSelection::data, data, EM_check_selection(), MEM_callocN(), EditMesh::selected, and EditSelection::type.
Referenced by mouse_mesh(), mouse_mesh_loop(), mouse_mesh_shortest_path(), and ringsel_finish().
static void EM_strip_selections | ( | EditMesh * | em | ) | [static] |
Definition at line 259 of file editmesh_lib.c.
References BLI_freelinkN(), EDITEDGE, EDITFACE, EDITVERT, ListBase::first, EditSelection::next, SCE_SELECT_EDGE, SCE_SELECT_FACE, SCE_SELECT_VERTEX, EditMesh::selected, EditMesh::selectmode, and EditSelection::type.
Referenced by EM_selectmode_set().
void EM_validate_selections | ( | EditMesh * | em | ) |
Definition at line 244 of file editmesh_lib.c.
References BLI_freelinkN(), EditSelection::data, EDITEDGE, EDITFACE, EDITVERT, ListBase::first, EditSelection::next, SELECT, EditMesh::selected, and EditSelection::type.
Referenced by hide_exec(), and stats_object_edit().
int EM_view3d_poll | ( | bContext * | C | ) |
Definition at line 2387 of file editmesh_lib.c.
References ED_operator_editmesh(), and ED_operator_view3d_active().
Referenced by MESH_OT_knife_cut(), MESH_OT_rip(), MESH_OT_screw(), MESH_OT_spin(), and MESH_OT_vertices_sort().
Definition at line 2079 of file editmesh_lib.c.
References compareface(), EditMesh::faces, ListBase::first, EditFace::next, NULL, EditFace::v1, EditFace::v2, EditFace::v3, and EditFace::v4.
Referenced by addedgeface_mesh(), edge_flip(), and join_triangles().
Definition at line 1789 of file editmesh_lib.c.
References extrudeflag_edge(), extrudeflag_vert(), SCE_SELECT_VERTEX, and EditMesh::selectmode.
Referenced by dupli_extrude_cursor(), extrude_mesh(), extrude_repeat_mesh_exec(), solidify_exec(), and spin_mesh().
static short extrudeflag_edge | ( | Object * | obedit, |
EditMesh * | em, | ||
short | UNUSEDflag, | ||
float * | nor, | ||
int | all | ||
) | [static] |
Definition at line 1244 of file editmesh_lib.c.
References EditMesh::act_face, add_normal_aligned(), addfacelist(), addvertlist(), BLI_remlink(), EditVert::co, copy_v3_v3(), EditEdge::dir, EditFace::e1, EditFace::e2, EditFace::e3, EditFace::e4, EditMesh::edges, EM_clear_flag_all(), EM_select_flush(), eModifierMode_Realtime, eModifierType_Mirror, EditEdge::f, EditVert::f, EditFace::f, EditVert::f1, EditEdge::f1, EditEdge::f2, fabsf, EditMesh::faces, ListBase::first, MirrorModifierData::flag, flipface(), free_editedge(), free_editface(), free_editvert(), invert_m4_m4(), is_zero_v3(), ListBase::last, MirrorModifierData::mirror_ob, MOD_MIR_AXIS_X, MOD_MIR_AXIS_Y, MOD_MIR_AXIS_Z, MOD_MIR_CLIPPING, ModifierData::mode, Object::modifiers, mul_m4_v3(), mult_m4_m4m4(), EditFace::n, EditEdge::next, ModifierData::next, EditFace::next, EditVert::next, normalize_v3(), NULL, Object::obmat, EditFace::prev, EditEdge::prev, recalc_editnormals(), remedge(), SELECT, set_edge_directions_f2(), EditVert::tmp, EditEdge::tmp, MirrorModifierData::tolerance, ModifierData::type, EditVert::v, EditFace::v1, EditEdge::v1, EditFace::v2, EditEdge::v2, EditFace::v3, EditFace::v4, and EditMesh::verts.
Referenced by extrudeflag().
short extrudeflag_edges_indiv | ( | EditMesh * | em, |
short | flag, | ||
float * | nor | ||
) |
Definition at line 1151 of file editmesh_lib.c.
References add_normal_aligned(), addfacelist(), addvertlist(), EditVert::co, EditEdge::dir, EditFace::e1, EditFace::e2, EditFace::e3, EditFace::e4, EditMesh::edges, EM_clear_flag_all(), EditEdge::f, EditVert::f, EditFace::f, EditEdge::f2, EditMesh::faces, ListBase::first, is_zero_v3(), ListBase::last, EditFace::n, EditEdge::next, EditFace::next, EditVert::next, normalize_v3(), NULL, EditVert::prev, recalc_editnormals(), SELECT, set_edge_directions_f2(), EditVert::tmp, EditEdge::tmp, EditVert::v, EditEdge::v1, EditEdge::v2, and EditMesh::verts.
Referenced by extrude_mesh().
short extrudeflag_face_indiv | ( | EditMesh * | em, |
short | UNUSEDflag, | ||
float * | UNUSEDnor | ||
) |
Definition at line 1058 of file editmesh_lib.c.
References addfacelist(), addvertlist(), BLI_remlink(), EditVert::co, copy_v3_v3(), EditFace::e1, EditFace::e2, EditFace::e3, EditFace::e4, EditMesh::edges, EM_clear_flag_all(), EM_select_flush(), EditVert::f, EditFace::f, EditVert::f1, EditEdge::f2, EditMesh::faces, ListBase::first, free_editface(), ListBase::last, EditFace::n, EditEdge::next, EditFace::next, EditVert::next, EditVert::no, NULL, EditFace::prev, recalc_editnormals(), SELECT, EditFace::v1, EditFace::v2, EditFace::v3, EditFace::v4, and EditMesh::verts.
Referenced by extrude_mesh().
Definition at line 1499 of file editmesh_lib.c.
References add_normal_aligned(), addedgelist(), addfacelist(), addvertlist(), BLI_remlink(), EditVert::co, copy_v3_v3(), EditEdge::crease, EditEdge::dir, EditFace::e1, EditFace::e2, EditFace::e3, EditFace::e4, EditMesh::edges, EM_selectmode_flush(), eModifierMode_Realtime, eModifierType_Mirror, EditEdge::f, EditVert::f, EditFace::f1, EditVert::f1, EditEdge::f1, EditEdge::f2, fabsf, EditMesh::faces, faceselectedAND(), faceselectedOR(), ListBase::first, MirrorModifierData::flag, free_editedge(), free_editface(), free_editvert(), invert_m4_m4(), is_zero_v3(), ListBase::last, MirrorModifierData::mirror_ob, MOD_MIR_AXIS_X, MOD_MIR_AXIS_Y, MOD_MIR_AXIS_Z, MOD_MIR_CLIPPING, ModifierData::mode, Object::modifiers, mul_m4_v3(), mult_m4_m4m4(), EditFace::n, EditEdge::next, ModifierData::next, EditFace::next, EditVert::next, EditVert::no, normalize_v3(), NULL, Object::obmat, EditEdge::prev, EditVert::prev, remedge(), set_edge_directions_f2(), EditVert::tmp, EditEdge::tmp, MirrorModifierData::tolerance, ModifierData::type, EditVert::v, EditFace::v1, EditEdge::v1, EditFace::v2, EditEdge::v2, EditFace::v3, EditFace::v4, and EditMesh::verts.
Referenced by extrudeflag(), and make_prim().
short extrudeflag_verts_indiv | ( | EditMesh * | em, |
short | flag, | ||
float * | UNUSEDnor | ||
) |
Definition at line 1218 of file editmesh_lib.c.
References addedgelist(), addvertlist(), EditVert::co, EM_clear_flag_all(), EditVert::f, ListBase::first, ListBase::last, EditVert::next, NULL, EditVert::prev, SELECT, EditVert::tmp, EditVert::v, and EditMesh::verts.
Referenced by extrude_mesh().
int faceselectedAND | ( | EditFace * | efa, |
int | flag | ||
) |
Definition at line 484 of file editmesh_lib.c.
References EditVert::f, EditFace::v1, EditFace::v2, EditFace::v3, and EditFace::v4.
Referenced by extrudeflag_vert(), and fill_mesh().
int faceselectedOR | ( | EditFace * | efa, |
int | flag | ||
) |
Definition at line 474 of file editmesh_lib.c.
References EditVert::f, EditFace::v1, EditFace::v2, EditFace::v3, and EditFace::v4.
Referenced by erase_faces(), extrudeflag_vert(), mesh_rip_invoke(), and removedoublesflag().
void recalc_editnormals | ( | EditMesh * | em | ) |
Definition at line 2007 of file editmesh_lib.c.
References accumulate_vertex_normals(), EditFace::cent, cent_quad_v3(), cent_tri_v3(), EditVert::co, copy_v3_v3(), EditMesh::faces, ListBase::first, EditFace::n, EditFace::next, EditVert::next, EditVert::no, normal_quad_v3(), normal_tri_v3(), normalize_v3(), NULL, EditFace::v1, EditFace::v2, EditFace::v3, EditFace::v4, EditMesh::verts, and zero_v3().
Referenced by addedgeface_mesh(), delete_mesh(), dupli_extrude_cursor(), edge_drawflags(), EM_mesh_copy_edge(), EM_recalc_normal_direction(), esubdivideflag(), extrude_repeat_mesh_exec(), extrudeflag_edge(), extrudeflag_edges_indiv(), extrudeflag_face_indiv(), filterSmartReebGraph(), flip_normals(), make_prim(), merge_exec(), mesh_noise_exec(), mesh_set_smooth_faces(), object_origin_set_exec(), recalcData_view3d(), removedoublesflag_exec(), smooth_vertex(), solidify_exec(), special_transvert_update(), spin_mesh(), split_mesh(), and v3d_editvertex_buts().
void rotateflag | ( | EditMesh * | em, |
short | flag, | ||
float * | cent, | ||
float | rotmat[][3] | ||
) |
Definition at line 1798 of file editmesh_lib.c.
References EditVert::co, EditVert::f, ListBase::first, mul_m3_v3(), EditVert::next, and EditMesh::verts.
Referenced by dupli_extrude_cursor(), make_prim(), and spin_mesh().
static void set_edge_directions_f2 | ( | EditMesh * | em, |
int | val | ||
) | [static] |
Definition at line 1009 of file editmesh_lib.c.
References EditEdge::dir, EditFace::e1, EditFace::e2, EditFace::e3, EditFace::e4, EditFace::f, EditEdge::f2, EditMesh::faces, ListBase::first, EditFace::next, SELECT, EditFace::v1, EditEdge::v1, EditFace::v2, EditFace::v3, and EditFace::v4.
Referenced by extrudeflag_edge(), extrudeflag_edges_indiv(), and extrudeflag_vert().
static void tag_edge_verts | ( | EditEdge * | eed | ) | [static] |
Definition at line 2635 of file editmesh_lib.c.
References EditVert::l, EditVert::tmp, EditEdge::v1, and EditEdge::v2.
Referenced by em_deselect_nth_edge().
static int tag_edge_verts_test | ( | EditEdge * | eed | ) | [static] |
Definition at line 2639 of file editmesh_lib.c.
References EditVert::l, EditVert::tmp, EditEdge::v1, and EditEdge::v2.
Referenced by em_deselect_nth_edge().
static void tag_face_edges | ( | EditFace * | efa | ) | [static] |
Definition at line 2557 of file editmesh_lib.c.
References EditFace::e1, EditFace::e2, EditFace::e3, EditFace::e4, EditEdge::l, EditEdge::tmp, and EditFace::v4.
Referenced by em_deselect_nth_face().
static int tag_face_edges_test | ( | EditFace * | efa | ) | [static] |
Definition at line 2564 of file editmesh_lib.c.
References EditFace::e1, EditFace::e2, EditFace::e3, EditFace::e4, EditEdge::l, EditEdge::tmp, and EditFace::v4.
Referenced by em_deselect_nth_face().
void translateflag | ( | EditMesh * | em, |
short | flag, | ||
float * | vec | ||
) |
Definition at line 1818 of file editmesh_lib.c.
References EditVert::co, EditVert::f, ListBase::first, EditVert::next, and EditMesh::verts.
Referenced by dupli_extrude_cursor(), extrude_repeat_mesh_exec(), make_prim(), and spin_mesh().
static void update_data_blocks | ( | EditMesh * | em, |
CustomData * | olddata, | ||
CustomData * | data | ||
) | [static] |
Definition at line 949 of file editmesh_lib.c.
References CustomData_em_copy_data(), CustomData_em_free_block(), CustomData_em_set_default(), EditFace::data, EditVert::data, EditMesh::faces, EditMesh::fdata, ListBase::first, EditFace::next, EditVert::next, NULL, EditMesh::vdata, and EditMesh::verts.
Referenced by EM_add_data_layer(), and EM_free_data_layer().