Blender V2.61 - r43446
|
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "MEM_guardedalloc.h"
#include "DNA_scene_types.h"
#include "DNA_object_types.h"
#include "DNA_key_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_modifier_types.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_editVert.h"
#include "BLI_dynstr.h"
#include "BLI_rand.h"
#include "BLI_utildefines.h"
#include "BKE_DerivedMesh.h"
#include "BKE_context.h"
#include "BKE_depsgraph.h"
#include "BKE_global.h"
#include "BKE_key.h"
#include "BKE_main.h"
#include "BKE_material.h"
#include "BKE_mesh.h"
#include "BKE_paint.h"
#include "BKE_report.h"
#include "BKE_multires.h"
#include "ED_mesh.h"
#include "ED_object.h"
#include "ED_screen.h"
#include "ED_util.h"
#include "ED_view3d.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "WM_api.h"
#include "WM_types.h"
#include "mesh_intern.h"
Go to the source code of this file.
Classes | |
struct | EditVertC |
struct | EditEdgeC |
struct | EditFaceC |
struct | EditSelectionC |
struct | UndoMesh |
Defines | |
#define | EDHASHSIZE (512*512) |
#define | EDHASH(a, b) (a % EDHASHSIZE) |
Typedefs | |
typedef struct EditVertC | EditVertC |
typedef struct EditEdgeC | EditEdgeC |
typedef struct EditFaceC | EditFaceC |
typedef struct EditSelectionC | EditSelectionC |
typedef struct UndoMesh | UndoMesh |
Functions | |
static void | BIF_undo_push (const char *UNUSED(arg)) |
static void | error (const char *UNUSED(arg)) |
static void * | calloc_em (EditMesh *UNUSED(em), size_t size, size_t nr) |
EditVert * | addvertlist (EditMesh *em, float *vec, EditVert *example) |
void | free_editvert (EditMesh *em, EditVert *eve) |
EditEdge * | findedgelist (EditMesh *em, EditVert *v1, EditVert *v2) |
static void | insert_hashedge (EditMesh *em, EditEdge *eed) |
static void | remove_hashedge (EditMesh *em, EditEdge *eed) |
EditEdge * | addedgelist (EditMesh *em, EditVert *v1, EditVert *v2, EditEdge *example) |
void | remedge (EditMesh *em, EditEdge *eed) |
void | free_editedge (EditMesh *em, EditEdge *eed) |
void | free_editface (EditMesh *em, EditFace *efa) |
void | free_vertlist (EditMesh *em, ListBase *edve) |
void | free_edgelist (EditMesh *em, ListBase *lb) |
void | free_facelist (EditMesh *em, ListBase *lb) |
EditFace * | addfacelist (EditMesh *em, EditVert *v1, EditVert *v2, EditVert *v3, EditVert *v4, EditFace *example, EditFace *exampleEdges) |
EditVert * | editedge_getOtherVert (EditEdge *eed, EditVert *eve) |
EditVert * | editedge_getSharedVert (EditEdge *eed, EditEdge *eed2) |
int | editedge_containsVert (EditEdge *eed, EditVert *eve) |
int | editface_containsVert (EditFace *efa, EditVert *eve) |
int | editface_containsEdge (EditFace *efa, EditEdge *eed) |
static void * | calloc_fastvert (EditMesh *em, size_t UNUSED(size), size_t UNUSED(nr)) |
static void * | calloc_fastedge (EditMesh *em, size_t UNUSED(size), size_t UNUSED(nr)) |
static void * | calloc_fastface (EditMesh *em, size_t UNUSED(size), size_t UNUSED(nr)) |
static void | init_editmesh_fastmalloc (EditMesh *em, int totvert, int totedge, int totface) |
static void | end_editmesh_fastmalloc (void) |
void | free_editMesh (EditMesh *em) |
static void | editMesh_set_hash (EditMesh *em) |
static void | edge_normal_compare (EditEdge *eed, EditFace *efa1) |
static void | edge_drawflags (Mesh *me, EditMesh *em) |
void | make_editMesh (Scene *scene, Object *ob) |
void | load_editMesh (Scene *scene, Object *obedit) |
void | remake_editMesh (Scene *scene, Object *ob) |
static int | mesh_separate_selected (wmOperator *op, Main *bmain, Scene *scene, Base *editbase) |
static int | mesh_separate_material (wmOperator *op, Main *bmain, Scene *scene, Base *editbase) |
static int | mesh_separate_loose (wmOperator *op, Main *bmain, Scene *scene, Base *editbase) |
static int | mesh_separate_exec (bContext *C, wmOperator *op) |
void | MESH_OT_separate (wmOperatorType *ot) |
static void | free_undoMesh (void *umv) |
static void * | editMesh_to_undoMesh (void *emv) |
static void | undoMesh_to_editMesh (void *umv, void *emv) |
static void * | getEditMesh (bContext *C) |
void | undo_push_mesh (bContext *C, const char *name) |
void | EM_init_index_arrays (EditMesh *em, int forVert, int forEdge, int forFace) |
void | EM_free_index_arrays (void) |
EditVert * | EM_get_vert_for_index (int index) |
EditEdge * | EM_get_edge_for_index (int index) |
EditFace * | EM_get_face_for_index (int index) |
int | EM_texFaceCheck (EditMesh *em) |
int | EM_vertColorCheck (EditMesh *em) |
void | em_setup_viewcontext (bContext *C, ViewContext *vc) |
void | paintvert_flush_flags (Object *ob) |
void | paintvert_deselect_all_visible (Object *ob, int action, short flush_flags) |
Variables | |
static void *(* | callocvert )(EditMesh *, size_t, size_t) = calloc_em |
static void *(* | callocedge )(EditMesh *, size_t, size_t) = calloc_em |
static void *(* | callocface )(EditMesh *, size_t, size_t) = calloc_em |
static EnumPropertyItem | prop_separate_types [] |
static EditVert ** | g_em_vert_array = NULL |
static EditEdge ** | g_em_edge_array = NULL |
static EditFace ** | g_em_face_array = NULL |
Definition in file editmesh.c.
#define EDHASH | ( | a, | |
b | |||
) | (a % EDHASHSIZE) |
Definition at line 94 of file editmesh.c.
Referenced by findedgelist(), insert_hashedge(), and remove_hashedge().
#define EDHASHSIZE (512*512) |
Definition at line 93 of file editmesh.c.
Referenced by addvertlist(), findedgelist(), and free_editMesh().
typedef struct EditSelectionC EditSelectionC |
Definition at line 225 of file editmesh.c.
References BLI_addtail(), EditEdge::bweight, callocedge, EditEdge::crease, EditEdge::dir, EditMesh::edges, HashEdge::eed, EM_FGON, findedgelist(), EditEdge::h, insert_hashedge(), NULL, EditEdge::seam, EditEdge::sharp, swap(), EditMesh::totedge, EditEdge::v1, and EditEdge::v2.
Referenced by addedgeface_mesh(), addfacelist(), adduplicateflag(), esubdivideflag(), extrudeflag_vert(), extrudeflag_verts_indiv(), make_editMesh(), make_prim(), mesh_rip_invoke(), mesh_rip_setface(), removedoublesflag(), and undoMesh_to_editMesh().
EditFace* addfacelist | ( | EditMesh * | em, |
EditVert * | v1, | ||
EditVert * | v2, | ||
EditVert * | v3, | ||
EditVert * | v4, | ||
EditFace * | example, | ||
EditFace * | exampleEdges | ||
) | [read] |
Definition at line 344 of file editmesh.c.
References addedgelist(), BLI_addtail(), callocface, EditFace::cent, cent_quad_v3(), cent_tri_v3(), EditVert::co, CustomData_em_copy_data(), CustomData_em_set_default(), CustomData_em_validate_data(), EditFace::data, EditFace::e1, EditFace::e2, EditFace::e3, EditFace::e4, EditMesh::faces, EditMesh::fdata, EditFace::flag, EditMesh::mat_nr, EditFace::mat_nr, EditFace::n, normal_quad_v3(), normal_tri_v3(), NULL, EditMesh::totface, EditFace::v1, EditFace::v2, EditFace::v3, and EditFace::v4.
Referenced by addedgeface_mesh(), addface_from_edges(), addfaces_from_edgenet(), adduplicateflag(), createRepresentation(), EM_face_from_faces(), extrudeflag_edge(), extrudeflag_edges_indiv(), extrudeflag_face_indiv(), extrudeflag_vert(), fill_mesh(), fill_quad_double_adj_fan(), fill_quad_double_adj_inner(), fill_quad_double_adj_path(), fill_quad_double_op(), fill_quad_doublevert(), fill_quad_quadruple(), fill_quad_single(), fill_quad_singlevert(), fill_quad_triple(), fill_tri_double(), fill_tri_single(), fill_tri_triple(), make_editMesh(), make_prim(), and undoMesh_to_editMesh().
Definition at line 109 of file editmesh.c.
References BLI_addtail(), EditVert::bweight, callocvert, EditVert::co, CustomData_em_copy_data(), CustomData_em_set_default(), EditVert::data, EDHASHSIZE, EditVert::hash, EditVert::keyindex, EditMesh::totvert, EditMesh::vdata, VECCOPY, and EditMesh::verts.
Referenced by adduplicate_vertex(), createRepresentation(), dupli_extrude_cursor(), extrudeflag_edge(), extrudeflag_edges_indiv(), extrudeflag_face_indiv(), extrudeflag_vert(), extrudeflag_verts_indiv(), fill_quad_double_adj_inner(), make_editMesh(), make_prim(), mesh_rip_invoke(), subdivide_edge_addvert(), and undoMesh_to_editMesh().
static void BIF_undo_push | ( | const char * | UNUSEDarg | ) | [static] |
Definition at line 86 of file editmesh.c.
Referenced by remake_editMesh().
static void* calloc_em | ( | EditMesh * | UNUSEDem, |
size_t | size, | ||
size_t | nr | ||
) | [static] |
Definition at line 99 of file editmesh.c.
Referenced by end_editmesh_fastmalloc().
static void* calloc_fastedge | ( | EditMesh * | em, |
size_t | UNUSEDsize, | ||
size_t | UNUSEDnr | ||
) | [static] |
Definition at line 462 of file editmesh.c.
References EditMesh::curedge, HashEdge::eed, and EditEdge::fast.
Referenced by init_editmesh_fastmalloc().
static void* calloc_fastface | ( | EditMesh * | em, |
size_t | UNUSEDsize, | ||
size_t | UNUSEDnr | ||
) | [static] |
Definition at line 468 of file editmesh.c.
References EditMesh::curface, and EditFace::fast.
Referenced by init_editmesh_fastmalloc().
static void* calloc_fastvert | ( | EditMesh * | em, |
size_t | UNUSEDsize, | ||
size_t | UNUSEDnr | ||
) | [static] |
Definition at line 456 of file editmesh.c.
References EditMesh::curvert, and EditVert::fast.
Referenced by init_editmesh_fastmalloc().
Definition at line 630 of file editmesh.c.
References Mesh::drawflag, EditFace::e1, EditFace::e2, EditFace::e3, EditFace::e4, edge_normal_compare(), EditMesh::edges, EditEdge::f, EditVert::f1, EditEdge::f1, EditEdge::f2, EditMesh::faces, ListBase::first, ME_ALLEDGES, EditEdge::next, EditFace::next, EditVert::next, recalc_editnormals(), EditEdge::tmp, EditEdge::v1, EditEdge::v2, and EditMesh::verts.
Referenced by load_editMesh().
Definition at line 588 of file editmesh.c.
References cent_quad_v3(), cent_tri_v3(), EditVert::co, EditEdge::f, EditEdge::f1, EditEdge::f2, EditFace::n, normalize_v3(), sub_v3_v3v3(), EditEdge::tmp, EditFace::v1, EditFace::v2, EditFace::v3, and EditFace::v4.
Referenced by edge_drawflags().
Definition at line 437 of file editmesh.c.
References EditEdge::v1, and EditEdge::v2.
Referenced by createSlideVerts().
Definition at line 415 of file editmesh.c.
References NULL, EditEdge::v1, and EditEdge::v2.
Referenced by createSlideVerts(), and doEdgeSlide().
Definition at line 426 of file editmesh.c.
References NULL, EditEdge::v1, and EditEdge::v2.
Referenced by createSlideVerts(), and doEdgeSlide().
Definition at line 447 of file editmesh.c.
References EditFace::e1, EditFace::e2, EditFace::e3, and EditFace::e4.
Referenced by createSlideVerts().
Definition at line 442 of file editmesh.c.
References EditFace::v1, EditFace::v2, EditFace::v3, and EditFace::v4.
static void editMesh_set_hash | ( | EditMesh * | em | ) | [static] |
Definition at line 570 of file editmesh.c.
References EditMesh::edges, HashEdge::eed, findedgelist(), ListBase::first, EditMesh::hashedgetab, insert_hashedge(), MEM_freeN(), EditEdge::next, NULL, EditEdge::v1, and EditEdge::v2.
Referenced by mesh_separate_selected().
static void* editMesh_to_undoMesh | ( | void * | emv | ) | [static] |
Definition at line 1649 of file editmesh.c.
References EditVertC::bweight, EditVert::bweight, EditEdgeC::bweight, EditEdge::bweight, CD_CALLOC, CD_MASK_EDITMESH, EditVertC::co, EditVert::co, copy_v3_v3(), EditEdgeC::crease, EditEdge::crease, CustomData_copy(), CustomData_from_em_block(), EditSelection::data, EditFace::data, EditVert::data, EditEdge::data, EditMesh::edata, UndoMesh::edata, UndoMesh::edges, EditMesh::edges, EDITEDGE, EDITFACE, EDITVERT, EditFaceC::f, EditEdge::f, EditVert::f, EditEdgeC::f, EditFace::f, EditVertC::f, UndoMesh::faces, EditMesh::faces, UndoMesh::fdata, EditMesh::fdata, EditFace::fgonf, EditFaceC::fgonf, EditEdge::fgoni, EditEdgeC::fgoni, ListBase::first, EditFace::flag, EditFaceC::flag, EditFaceC::h, EditEdge::h, EditVert::h, EditEdgeC::h, EditFace::h, EditVertC::h, EditSelectionC::index, EditVert::keyindex, EditVertC::keyindex, EditVert::l, EditFace::l, EditEdge::l, EditFaceC::mat_nr, EditFace::mat_nr, MEM_callocN(), EditEdge::next, EditFace::next, EditVert::next, EditSelection::next, EditVertC::no, EditVert::no, NULL, EditEdge::seam, EditEdgeC::seam, EditMesh::selected, UndoMesh::selected, EditMesh::selectmode, UndoMesh::selectmode, UndoMesh::shapenr, EditMesh::shapenr, EditEdge::sharp, EditEdgeC::sharp, EditVert::tmp, EditFace::tmp, EditEdge::tmp, UndoMesh::totedge, UndoMesh::totface, UndoMesh::totsel, UndoMesh::totvert, EditSelection::type, EditSelectionC::type, EditFace::v1, EditEdgeC::v1, EditEdge::v1, EditFaceC::v1, EditFace::v2, EditEdgeC::v2, EditEdge::v2, EditFaceC::v2, EditFace::v3, EditFaceC::v3, EditFace::v4, EditFaceC::v4, UndoMesh::vdata, EditMesh::vdata, UndoMesh::verts, and EditMesh::verts.
Referenced by undo_push_mesh().
void EM_free_index_arrays | ( | void | ) |
Definition at line 1915 of file editmesh.c.
References MEM_freeN(), and NULL.
Referenced by createRepresentation(), draw_em_fancy(), draw_object_backbufsel(), ED_mesh_mirrtopo_init(), edgetag_shortest_path(), EM_make_hq_normals(), EM_make_uv_vert_map(), make_editMesh(), mesh_foreachScreenEdge(), mesh_foreachScreenFace(), mesh_foreachScreenVert(), select_edgeloop(), select_linked(), snapDerivedMesh(), stitch_exec(), undoMesh_to_editMesh(), and uv_faces_do_sticky().
EditEdge* EM_get_edge_for_index | ( | int | index | ) | [read] |
Definition at line 1930 of file editmesh.c.
References NULL.
Referenced by bbs_mesh_wire__setDrawOptions(), draw_dm_bweights__setDrawOptions(), draw_dm_creases__setDrawOptions(), draw_dm_edges__setDrawOptions(), draw_dm_edges_seams__setDrawOptions(), draw_dm_edges_sel__setDrawOptions(), draw_dm_edges_sel_interp__setDrawInterpOptions(), draw_dm_edges_sel_interp__setDrawOptions(), draw_dm_edges_sharp__setDrawOptions(), edgetag_add_adjacent(), edgetag_cut_cost(), edgetag_shortest_path(), make_editMesh(), mesh_foreachScreenEdge__mapFunc(), snapDerivedMesh(), and undoMesh_to_editMesh().
EditFace* EM_get_face_for_index | ( | int | index | ) | [read] |
Definition at line 1935 of file editmesh.c.
References NULL.
Referenced by bbs_mesh_solid__drawCenter(), bbs_mesh_solid__setSolidDrawOptions(), draw_dm_face_centers__mapFunc(), draw_dm_face_normals__mapFunc(), draw_dm_faces_sel__compareDrawOptions(), draw_dm_faces_sel__setDrawOptions(), draw_em_fancy__setFaceOpts(), draw_em_fancy__setGLSLFaceOpts(), draw_em_tf_mapped__set_draw(), EM_make_hq_normals(), EM_make_uv_vert_map(), make_editMesh(), mesh_foreachScreenFace__mapFunc(), select_linked(), snapDerivedMesh(), stitch_exec(), tex_mat_set_face_editmesh_cb(), undoMesh_to_editMesh(), uv_edge_tag_faces(), and uv_faces_do_sticky().
EditVert* EM_get_vert_for_index | ( | int | index | ) | [read] |
Definition at line 1925 of file editmesh.c.
References NULL.
Referenced by bbs_mesh_verts__mapFunc(), createRepresentation(), draw_dm_bweights__mapFunc(), draw_dm_vert_normals__mapFunc(), draw_dm_verts__mapFunc(), ED_mesh_mirrtopo_init(), edgetag_cut_cost(), EM_make_hq_normals(), make_editMesh(), mesh_foreachScreenVert__mapFunc(), snapDerivedMesh(), and undoMesh_to_editMesh().
void EM_init_index_arrays | ( | EditMesh * | em, |
int | forVert, | ||
int | forEdge, | ||
int | forFace | ||
) |
Definition at line 1874 of file editmesh.c.
References BLI_countlist(), EditMesh::edges, EditMesh::faces, ListBase::first, i, MEM_mallocN(), EditFace::next, EditEdge::next, EditVert::next, EditMesh::totedge, EditMesh::totface, EditMesh::totvert, and EditMesh::verts.
Referenced by createRepresentation(), draw_em_fancy(), draw_object_backbufsel(), ED_mesh_mirrtopo_init(), edgetag_shortest_path(), EM_make_hq_normals(), EM_make_uv_vert_map(), make_editMesh(), mesh_foreachScreenEdge(), mesh_foreachScreenFace(), mesh_foreachScreenVert(), select_edgeloop(), select_linked(), snapDerivedMesh(), stitch_exec(), undoMesh_to_editMesh(), and uv_faces_do_sticky().
void em_setup_viewcontext | ( | bContext * | C, |
ViewContext * | vc | ||
) |
Definition at line 1963 of file editmesh.c.
References Object::data, Mesh::edit_mesh, ViewContext::em, ViewContext::obedit, and view3d_set_viewcontext().
Referenced by dupli_extrude_cursor(), mouse_mesh(), mouse_mesh_loop(), mouse_mesh_shortest_path(), ringsel_init(), select_linked_exec(), select_linked_pick_invoke(), and xsortvert_flag().
int EM_texFaceCheck | ( | EditMesh * | em | ) |
Definition at line 1941 of file editmesh.c.
References CD_MTFACE, CustomData_has_layer(), EditMesh::faces, EditMesh::fdata, and ListBase::first.
Referenced by collapse_edgeuvs(), collapseEdges(), collapseuvs(), ED_space_image_show_uvedit(), ED_space_image_show_uvshadow(), ED_uvedit_test(), EM_get_active_mtface(), image_refresh(), mesh_mirror_uvs(), and mesh_rotate_uvs().
int EM_vertColorCheck | ( | EditMesh * | em | ) |
Definition at line 1952 of file editmesh.c.
References CD_MCOL, CustomData_has_layer(), EditMesh::faces, EditMesh::fdata, and ListBase::first.
Referenced by mesh_mirror_colors(), and mesh_rotate_colors().
static void end_editmesh_fastmalloc | ( | void | ) | [static] |
Definition at line 499 of file editmesh.c.
References calloc_em(), callocedge, callocface, and callocvert.
Referenced by make_editMesh(), and undoMesh_to_editMesh().
static void error | ( | const char * | UNUSEDarg | ) | [static] |
Definition at line 87 of file editmesh.c.
Referenced by make_editMesh(), and mesh_separate_loose().
Definition at line 151 of file editmesh.c.
References EDHASH, EDHASHSIZE, HashEdge::eed, EditVert::hash, EditMesh::hashedgetab, MEM_callocN(), HashEdge::next, NULL, EditEdge::v1, and EditEdge::v2.
Referenced by addedgelist(), addfaces_from_edgenet(), editMesh_set_hash(), fix_new_face(), and removedoublesflag().
Definition at line 316 of file editmesh.c.
References HashEdge::eed, ListBase::first, free_editedge(), ListBase::last, EditEdge::next, next, NULL, EditMesh::totedge, and EditMesh::totedgesel.
Referenced by createRepresentation(), delete_mesh(), and free_editMesh().
Definition at line 277 of file editmesh.c.
References EDITEDGE, EM_remove_selection(), EditEdge::fast, and addon::engine::free().
Referenced by delete_mesh(), delfaceflag(), edge_rotate(), erase_edges(), extrudeflag_edge(), extrudeflag_vert(), free_edgelist(), free_tagged_edges_faces(), mesh_rip_invoke(), and removedoublesflag().
Definition at line 285 of file editmesh.c.
References EditMesh::act_face, CustomData_em_free_block(), EditFace::data, EDITFACE, EM_remove_selection(), EM_set_actFace(), EditMesh::faces, EditFace::fast, EditMesh::fdata, ListBase::first, addon::engine::free(), NULL, and EditMesh::totface.
Referenced by convert_to_triface(), delete_mesh(), delfaceflag(), edge_rotate(), erase_faces(), extrudeflag_edge(), extrudeflag_face_indiv(), extrudeflag_vert(), free_facelist(), free_tagged_edges_faces(), and removedoublesflag().
void free_editMesh | ( | EditMesh * | em | ) |
Definition at line 507 of file editmesh.c.
References EditMesh::act_face, EditMesh::alledges, EditMesh::allfaces, EditMesh::allverts, BLI_freelistN(), EditMesh::curedge, EditMesh::curface, EditMesh::curvert, CustomData_free(), EditMesh::derivedCage, EditMesh::derivedFinal, EditMesh::edges, EDHASHSIZE, HashEdge::eed, EditMesh::faces, EditMesh::fdata, ListBase::first, free_edgelist(), free_facelist(), free_vertlist(), EditMesh::hashedgetab, max, MEM_freeN(), mesh_mirrtopo_table(), mesh_octree_table(), DerivedMesh::needsFree, HashEdge::next, NULL, DerivedMesh::release, EditMesh::selected, EditMesh::totedge, EditMesh::totface, EditMesh::totvert, EditMesh::vdata, and EditMesh::verts.
Referenced by bevel_menu(), drop_named_image_invoke(), ED_editors_exit(), ED_object_exit_editmode(), join_mesh_exec(), make_editMesh(), mesh_separate_selected(), and undoMesh_to_editMesh().
Definition at line 139 of file editmesh.c.
References CustomData_em_free_block(), EditVert::data, EDITVERT, EM_remove_selection(), EditVert::fast, addon::engine::free(), EditMesh::totvert, and EditMesh::vdata.
Referenced by delete_mesh(), delfaceflag(), erase_vertices(), extrudeflag_edge(), extrudeflag_vert(), free_vertlist(), mesh_rip_invoke(), removedoublesflag(), and spin_mesh().
Definition at line 330 of file editmesh.c.
References ListBase::first, free_editface(), ListBase::last, EditFace::next, next, NULL, EditMesh::totface, and EditMesh::totfacesel.
Referenced by createRepresentation(), delete_mesh(), and free_editMesh().
static void free_undoMesh | ( | void * | umv | ) | [static] |
Definition at line 1635 of file editmesh.c.
References CustomData_free(), UndoMesh::edata, UndoMesh::edges, UndoMesh::faces, UndoMesh::fdata, MEM_freeN(), UndoMesh::selected, UndoMesh::totedge, UndoMesh::totface, UndoMesh::totvert, UndoMesh::vdata, and UndoMesh::verts.
Referenced by undo_push_mesh().
Definition at line 300 of file editmesh.c.
References ListBase::first, free_editvert(), ListBase::last, EditVert::next, next, NULL, EditMesh::totvert, and EditMesh::totvertsel.
Referenced by createRepresentation(), delete_mesh(), and free_editMesh().
static void* getEditMesh | ( | bContext * | C | ) | [static] |
Definition at line 1850 of file editmesh.c.
References CTX_data_edit_object(), Object::data, Mesh::edit_mesh, NULL, OB_MESH, and Object::type.
Referenced by undo_push_mesh().
static void init_editmesh_fastmalloc | ( | EditMesh * | em, |
int | totvert, | ||
int | totedge, | ||
int | totface | ||
) | [static] |
Definition at line 478 of file editmesh.c.
References EditMesh::alledges, EditMesh::allfaces, EditMesh::allverts, calloc_fastedge(), calloc_fastface(), calloc_fastvert(), callocedge, callocface, callocvert, EditMesh::curedge, EditMesh::curface, EditMesh::curvert, MEM_callocN(), and NULL.
Referenced by make_editMesh(), and undoMesh_to_editMesh().
Definition at line 177 of file editmesh.c.
References EDHASH, HashEdge::eed, EditEdge::hash, EditVert::hash, EditMesh::hashedgetab, HashEdge::next, EditEdge::v1, and EditEdge::v2.
Referenced by addedgelist(), and editMesh_set_hash().
Definition at line 950 of file editmesh.c.
References Mesh::act_face, Scene::base, BLI_findlink(), Key::block, EditEdge::bweight, MEdge::bweight, EditVert::bweight, MVert::bweight, CD_ASSIGN, CD_CALLOC, CD_MASK_MESH, CD_MEDGE, CD_MFACE, CD_MVERT, EditVert::co, MVert::co, EditEdge::crease, MEdge::crease, CustomData_add_layer(), CustomData_copy(), CustomData_free(), CustomData_from_em_block(), CustomData_set_layer(), EditSelection::data, KeyBlock::data, EditFace::data, EditEdge::data, EditVert::data, Object::data, EditFace::e1, EditFace::e2, EditFace::e3, EditFace::e4, EditMesh::edata, edge_drawflags(), EditMesh::edges, Mesh::edit_mesh, EDITEDGE, EDITFACE, EDITVERT, ELEM, Key::elemsize, EM_FGON, EM_get_actFace(), EM_stats_update(), eModifierType_Hook, EditFace::f, EditEdge::f, EditVert::f, EditEdge::f2, EditMesh::faces, EditMesh::fdata, Mesh::fdata, ListBase::first, EditFace::flag, MFace::flag, MEdge::flag, MVert::flag, G, EditFace::h, EditEdge::h, EditVert::h, i, Mesh::id, Object::id, if(), MSelect::index, HookModifierData::indexar, Mesh::key, KEY_RELATIVE, EditVert::keyindex, EditFace::l, EditEdge::l, EditVert::l, EditFace::mat_nr, MFace::mat_nr, ME_EDGEDRAW, ME_EDGERENDER, ME_FACE_SEL, ME_FGON, ME_HIDE, ME_LOOSEEDGE, ME_SEAM, ME_SHARP, MEM_callocN(), MEM_freeN(), mesh_calc_normals(), mesh_update_customdata_pointers(), Mesh::mface, Object::modifiers, Mesh::mselect, multires_topology_changed(), Mesh::mvert, Base::next, EditSelection::next, KeyBlock::next, ModifierData::next, ID::next, EditFace::next, EditEdge::next, EditVert::next, EditVert::no, MVert::no, normal_float_to_short_v3(), NULL, OB_RECALC_DATA, Base::object, Object::par1, Object::par2, Object::par3, Object::parent, Object::partype, PARVERT1, PARVERT3, Object::recalc, Key::refkey, KeyBlock::relative, EditEdge::seam, SELECT, EditMesh::selected, EditMesh::shapenr, EditEdge::sharp, sub_v3_v3v3(), test_index_face(), EditFace::tmp, EditEdge::tmp, EditVert::tmp, Mesh::totedge, EditMesh::totedge, KeyBlock::totelem, Mesh::totface, EditMesh::totface, HookModifierData::totindex, Mesh::totselect, Mesh::totvert, EditMesh::totvert, EditSelection::type, MSelect::type, Key::type, ModifierData::type, ID::us, EditFace::v1, MFace::v1, EditEdge::v1, MEdge::v1, EditFace::v2, MFace::v2, EditEdge::v2, MEdge::v2, EditFace::v3, MFace::v3, MFace::v4, EditFace::v4, EditMesh::vdata, VECADD, VECCOPY, and EditMesh::verts.
Referenced by drop_named_image_invoke(), ED_object_exit_editmode(), join_mesh_exec(), mesh_separate_selected(), object_hook_index_array(), and vertex_parent_set_exec().
Definition at line 730 of file editmesh.c.
References Mesh::act_face, EditMesh::act_face, Object::actcol, addedgelist(), addfacelist(), addvertlist(), BLI_addtail(), MEdge::bweight, EditEdge::bweight, MVert::bweight, EditVert::bweight, CD_CALLOC, CD_MASK_EDITMESH, MVert::co, co, MEdge::crease, EditEdge::crease, CustomData_copy(), CustomData_to_em_block(), EditSelection::data, EditFace::data, EditEdge::data, EditVert::data, KeyBlock::data, Object::data, EditMesh::edata, Mesh::edit_mesh, EDITEDGE, EDITFACE, EDITVERT, EM_FGON, EM_fgon_flags(), EM_free_index_arrays(), EM_get_actFace(), EM_get_edge_for_index(), EM_get_face_for_index(), EM_get_vert_for_index(), EM_hide_reset(), EM_init_index_arrays(), EM_select_edge(), EM_select_face(), EM_selectmode_set(), EM_set_actFace(), end_editmesh_fastmalloc(), error(), EditFace::f, EditEdge::f, EditVert::f, EditMesh::faces, FALSE, EditMesh::fdata, Mesh::fdata, ListBase::first, MFace::flag, EditFace::flag, MEdge::flag, MVert::flag, free_editMesh(), EditFace::h, EditEdge::h, EditVert::h, MSelect::index, init_editmesh_fastmalloc(), EditVert::keyindex, MFace::mat_nr, EditFace::mat_nr, EditMesh::mat_nr, ME_FACE_SEL, ME_FGON, ME_HIDE, ME_SEAM, ME_SHARP, Mesh::medge, MEM_callocN(), MEM_freeN(), MEM_mallocN(), Mesh::mface, Mesh::mselect, Mesh::mvert, MVert::no, EditVert::no, normal_short_to_float_v3(), NULL, ob_get_keyblock(), paint_facesel_test(), paint_vertsel_test(), SCE_SELECT_EDGE, EditEdge::seam, SELECT, EditMesh::selected, ToolSettings::selectmode, EditMesh::selectmode, Object::shapenr, EditMesh::shapenr, EditEdge::sharp, Scene::toolsettings, Mesh::totedge, EditMesh::totedge, KeyBlock::totelem, totelem, Mesh::totface, EditMesh::totface, Mesh::totselect, Mesh::totvert, EditMesh::totvert, EditSelection::type, MSelect::type, undo_editmode_clear(), EditFace::v1, MFace::v1, EditEdge::v1, MEdge::v1, EditFace::v2, MFace::v2, EditEdge::v2, MEdge::v2, EditFace::v3, MFace::v3, EditFace::v4, MFace::v4, and EditMesh::vdata.
Referenced by drop_named_image_invoke(), ED_object_enter_editmode(), join_mesh_exec(), mesh_separate_selected(), object_hook_index_array(), remake_editMesh(), and vertex_parent_set_exec().
void MESH_OT_separate | ( | wmOperatorType * | ot | ) |
Definition at line 1566 of file editmesh.c.
References wmOperatorType::description, ED_operator_editmesh(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, mesh_separate_exec(), wmOperatorType::name, OPTYPE_UNDO, wmOperatorType::poll, wmOperatorType::prop, RNA_def_enum(), wmOperatorType::srna, and WM_menu_invoke().
Referenced by ED_operatortypes_mesh().
static int mesh_separate_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 1540 of file editmesh.c.
References CTX_data_active_base(), CTX_data_main(), CTX_data_scene(), Object::data, mesh_separate_loose(), mesh_separate_material(), mesh_separate_selected(), NC_GEOM, NC_SCENE, ND_DATA, ND_OB_SELECT, Base::object, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), and WM_event_add_notifier().
Referenced by MESH_OT_separate().
static int mesh_separate_loose | ( | wmOperator * | op, |
Main * | bmain, | ||
Scene * | scene, | ||
Base * | editbase | ||
) | [static] |
Definition at line 1488 of file editmesh.c.
References BKE_mesh_end_editmesh(), BKE_mesh_get_editmesh(), BLI_countlist(), Object::data, EM_clear_flag_all(), error(), EditVert::f, ListBase::first, EditVert::h, Mesh::key, mesh_separate_selected(), EditVert::next, NULL, Base::object, SELECT, selectconnected_mesh_all(), and EditMesh::verts.
Referenced by mesh_separate_exec().
static int mesh_separate_material | ( | wmOperator * | op, |
Main * | bmain, | ||
Scene * | scene, | ||
Base * | editbase | ||
) | [static] |
Definition at line 1466 of file editmesh.c.
References BKE_mesh_end_editmesh(), BKE_mesh_get_editmesh(), Object::data, EM_clear_flag_all(), EM_select_by_material(), mesh_separate_selected(), Base::object, SELECT, Object::totcol, and EditMesh::totfacesel.
Referenced by mesh_separate_exec().
static int mesh_separate_selected | ( | wmOperator * | op, |
Main * | bmain, | ||
Scene * | scene, | ||
Base * | editbase | ||
) | [static] |
Definition at line 1348 of file editmesh.c.
References EditMesh::act_face, add_mesh(), adduplicateflag(), assign_matarar(), BA_DESELECT, BKE_mesh_end_editmesh(), BKE_mesh_get_editmesh(), BKE_report(), BLI_addtail(), BLI_freelistN(), BLI_remlink(), CD_DEFAULT, CD_MASK_EDITMESH, CustomData_copy(), DAG_id_tag_update(), Object::data, delfaceflag(), Mesh::drawflag, ED_base_object_select(), ED_object_add_duplicate(), EditMesh::edata, EditMesh::edges, Mesh::edit_mesh, Mesh::editflag, editMesh_set_hash(), EM_selectmode_set(), EM_set_actFace(), EM_stats_update(), EditEdge::f, EditVert::f, EditFace::f, EditMesh::faces, EditMesh::fdata, ListBase::first, Mesh::flag, free_editMesh(), give_matarar(), give_totcolp(), Mesh::id, Object::id, Mesh::key, load_editMesh(), make_editMesh(), MEM_freeN(), ID::name, EditEdge::next, EditFace::next, EditVert::next, NULL, OB_RECALC_DATA, Base::object, wmOperator::reports, RPT_WARNING, SELECT, EditMesh::selected, Mesh::smoothresh, Mesh::texflag, EditMesh::totvertsel, ID::us, EditMesh::vdata, and EditMesh::verts.
Referenced by mesh_separate_exec(), mesh_separate_loose(), and mesh_separate_material().
void paintvert_deselect_all_visible | ( | Object * | ob, |
int | action, | ||
short | flush_flags | ||
) |
Definition at line 2012 of file editmesh.c.
References MVert::flag, get_mesh(), ME_HIDE, Mesh::mvert, NULL, 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(), mouse_weight_paint_vertex_select(), vert_select_all_exec(), and vert_select_inverse_exec().
void paintvert_flush_flags | ( | Object * | ob | ) |
Definition at line 1977 of file editmesh.c.
References CD_ORIGINDEX, Object::derivedFinal, MVert::flag, get_mesh(), DerivedMesh::getNumVerts, DerivedMesh::getVertArray, DerivedMesh::getVertDataArray, i, Mesh::mvert, NULL, and ORIGINDEX_NONE.
Referenced by do_lasso_select_paintvert(), do_paintvert_box_select(), mouse_weight_paint_vertex_select(), paint_vertsel_circle_select(), paintvert_deselect_all_visible(), and vgroup_select_verts().
Definition at line 1331 of file editmesh.c.
References BIF_undo_push(), DAG_id_tag_update(), Object::id, make_editMesh(), and OB_RECALC_DATA.
Definition at line 269 of file editmesh.c.
References BLI_remlink(), EditMesh::edges, remove_hashedge(), and EditMesh::totedge.
Referenced by delete_mesh(), delfaceflag(), edge_rotate(), erase_edges(), extrudeflag_edge(), extrudeflag_vert(), free_tagged_edges_faces(), mesh_rip_invoke(), and removedoublesflag().
Definition at line 196 of file editmesh.c.
References EDHASH, HashEdge::eed, EditVert::hash, EditMesh::hashedgetab, HashEdge::next, NULL, EditEdge::v1, and EditEdge::v2.
Referenced by remedge().
void undo_push_mesh | ( | bContext * | C, |
const char * | name | ||
) |
Definition at line 1861 of file editmesh.c.
References editMesh_to_undoMesh(), free_undoMesh(), getEditMesh(), NULL, undo_editmode_push(), and undoMesh_to_editMesh().
Referenced by ED_undo_push().
static void undoMesh_to_editMesh | ( | void * | umv, |
void * | emv | ||
) | [static] |
Definition at line 1746 of file editmesh.c.
References addedgelist(), addfacelist(), addvertlist(), BLI_addtail(), EditVertC::bweight, EditVert::bweight, EditEdgeC::bweight, EditEdge::bweight, CD_CALLOC, CD_MASK_EDITMESH, EditVertC::co, copy_v3_v3(), EditEdgeC::crease, EditEdge::crease, CustomData_copy(), CustomData_free(), CustomData_to_em_block(), EditSelection::data, EditFace::data, EditVert::data, EditEdge::data, EditMesh::edata, UndoMesh::edata, UndoMesh::edges, EDITEDGE, EDITFACE, EDITVERT, EM_free_index_arrays(), EM_get_edge_for_index(), EM_get_face_for_index(), EM_get_vert_for_index(), EM_init_index_arrays(), EM_nedges_selected(), EM_nfaces_selected(), EM_nvertices_selected(), end_editmesh_fastmalloc(), EditFaceC::f, EditEdge::f, EditVert::f, EditEdgeC::f, EditFace::f, EditVertC::f, UndoMesh::faces, UndoMesh::fdata, EditMesh::fdata, EditFace::fgonf, EditFaceC::fgonf, EditEdge::fgoni, EditEdgeC::fgoni, EditFace::flag, EditFaceC::flag, free_editMesh(), EditFaceC::h, EditEdge::h, EditVert::h, EditEdgeC::h, EditFace::h, EditVertC::h, EditSelectionC::index, init_editmesh_fastmalloc(), EditVert::keyindex, EditVertC::keyindex, EditFaceC::mat_nr, EditFace::mat_nr, MEM_callocN(), MEM_freeN(), MEM_mallocN(), EditVertC::no, EditVert::no, NULL, EditEdge::seam, EditEdgeC::seam, EditMesh::selected, UndoMesh::selected, EditMesh::selectmode, UndoMesh::selectmode, UndoMesh::shapenr, EditMesh::shapenr, EditEdge::sharp, EditEdgeC::sharp, UndoMesh::totedge, EditMesh::totedge, EditMesh::totface, UndoMesh::totface, UndoMesh::totsel, EditMesh::totvert, UndoMesh::totvert, EditSelection::type, EditSelectionC::type, EditEdgeC::v1, EditFaceC::v1, EditEdgeC::v2, EditFaceC::v2, EditFaceC::v3, EditFaceC::v4, UndoMesh::vdata, EditMesh::vdata, and UndoMesh::verts.
Referenced by undo_push_mesh().
void*(* callocedge)(EditMesh *, size_t, size_t) = calloc_em [static] |
Definition at line 106 of file editmesh.c.
Referenced by addedgelist(), end_editmesh_fastmalloc(), and init_editmesh_fastmalloc().
void*(* callocface)(EditMesh *, size_t, size_t) = calloc_em [static] |
Definition at line 107 of file editmesh.c.
Referenced by addfacelist(), end_editmesh_fastmalloc(), and init_editmesh_fastmalloc().
void*(* callocvert)(EditMesh *, size_t, size_t) = calloc_em [static] |
Definition at line 105 of file editmesh.c.
Referenced by addvertlist(), end_editmesh_fastmalloc(), and init_editmesh_fastmalloc().
EditEdge** g_em_edge_array = NULL [static] |
Definition at line 1871 of file editmesh.c.
EditFace** g_em_face_array = NULL [static] |
Definition at line 1872 of file editmesh.c.
EditVert** g_em_vert_array = NULL [static] |
Definition at line 1870 of file editmesh.c.
EnumPropertyItem prop_separate_types[] [static] |
{ {0, "SELECTED", 0, "Selection", ""}, {1, "MATERIAL", 0, "By Material", ""}, {2, "LOOSE", 0, "By loose parts", ""}, {0, NULL, 0, NULL, NULL} }
Definition at line 1340 of file editmesh.c.