|
Blender
V2.93
|
#include "MEM_guardedalloc.h"#include "BLI_utildefines.h"#include "BLI_alloca.h"#include "BLI_bitmap.h"#include "BLI_kdtree.h"#include "BLI_math.h"#include "BLT_translation.h"#include "DNA_defaults.h"#include "DNA_mesh_types.h"#include "DNA_meshdata_types.h"#include "DNA_modifier_types.h"#include "DNA_object_types.h"#include "DNA_screen_types.h"#include "BKE_context.h"#include "BKE_deform.h"#include "BKE_mesh.h"#include "BKE_modifier.h"#include "BKE_screen.h"#include "UI_interface.h"#include "UI_resources.h"#include "RNA_access.h"#include "DEG_depsgraph.h"#include "MOD_modifiertypes.h"#include "MOD_ui_common.h"Go to the source code of this file.
Classes | |
| struct | WeldGroup |
| struct | WeldGroupEdge |
| struct | WeldVert |
| struct | WeldEdge |
| struct | WeldLoop |
| struct | WeldPoly |
| struct | WeldMesh |
| struct | WeldLoopOfPolyIter |
| struct | WeldVertexCluster |
Macros | |
| #define | OUT_OF_CONTEXT (uint)(-1) |
| #define | ELEM_COLLAPSED (uint)(-2) |
| #define | ELEM_MERGED (uint)(-2) |
Typedefs | |
| typedef struct WeldVert | WeldVert |
| typedef struct WeldEdge | WeldEdge |
| typedef struct WeldLoop | WeldLoop |
| typedef struct WeldPoly | WeldPoly |
| typedef struct WeldMesh | WeldMesh |
| typedef struct WeldLoopOfPolyIter | WeldLoopOfPolyIter |
Functions | |
Weld Vert API | |
| static void | weld_vert_ctx_alloc_and_setup (const uint mvert_len, uint *r_vert_dest_map, WeldVert **r_wvert, uint *r_wvert_len) |
| static void | weld_vert_groups_setup (const uint mvert_len, const uint wvert_len, const WeldVert *wvert, const uint *vert_dest_map, uint *r_vert_groups_map, uint **r_vert_groups_buffer, struct WeldGroup **r_vert_groups) |
Weld Edge API | |
| static void | weld_edge_ctx_setup (const uint mvert_len, const uint wedge_len, struct WeldGroup *r_vlinks, uint *r_edge_dest_map, WeldEdge *r_wedge, uint *r_edge_kiil_len) |
| static void | weld_edge_ctx_alloc (const MEdge *medge, const uint medge_len, const uint *vert_dest_map, uint *r_edge_dest_map, uint **r_edge_ctx_map, WeldEdge **r_wedge, uint *r_wedge_len) |
| static void | weld_edge_groups_setup (const uint medge_len, const uint edge_kill_len, const uint wedge_len, WeldEdge *wedge, const uint *wedge_map, uint *r_edge_groups_map, uint **r_edge_groups_buffer, struct WeldGroupEdge **r_edge_groups) |
Weld Poly and Loop API | |
| static bool | weld_iter_loop_of_poly_begin (WeldLoopOfPolyIter *iter, const WeldPoly *wp, const WeldLoop *wloop, const MLoop *mloop, const uint *loop_map, uint *group_buffer) |
| static bool | weld_iter_loop_of_poly_next (WeldLoopOfPolyIter *iter) |
| static void | weld_poly_loop_ctx_alloc (const MPoly *mpoly, const uint mpoly_len, const MLoop *mloop, const uint mloop_len, const uint *vert_dest_map, const uint *edge_dest_map, WeldMesh *r_weld_mesh) |
| static void | weld_poly_split_recursive (const uint *vert_dest_map, uint ctx_verts_len, WeldPoly *r_wp, WeldMesh *r_weld_mesh, uint *r_poly_kill, uint *r_loop_kill) |
| static void | weld_poly_loop_ctx_setup (const MLoop *mloop, const uint mvert_len, const uint *vert_dest_map, const uint remain_edge_ctx_len, struct WeldGroup *r_vlinks, WeldMesh *r_weld_mesh) |
Weld Mesh API | |
| static void | weld_mesh_context_create (const Mesh *mesh, uint *vert_dest_map, const uint vert_kill_len, WeldMesh *r_weld_mesh) |
| static void | weld_mesh_context_free (WeldMesh *weld_mesh) |
Weld CustomData | |
| static void | customdata_weld (const CustomData *source, CustomData *dest, const uint *src_indices, int count, int dest_index) |
Weld Modifier Main | |
| ModifierTypeInfo | modifierType_Weld |
| static Mesh * | weldModifier_doWeld (WeldModifierData *wmd, const ModifierEvalContext *ctx, Mesh *mesh) |
| static Mesh * | modifyMesh (ModifierData *md, const ModifierEvalContext *ctx, Mesh *mesh) |
| static void | initData (ModifierData *md) |
| static void | requiredDataMask (Object *UNUSED(ob), ModifierData *md, CustomData_MeshMasks *r_cddata_masks) |
| static void | panel_draw (const bContext *UNUSED(C), Panel *panel) |
| static void | panelRegister (ARegionType *region_type) |
Weld modifier: Remove doubles.
Definition in file MOD_weld.c.
| #define ELEM_COLLAPSED (uint)(-2) |
Definition at line 75 of file MOD_weld.c.
| #define ELEM_MERGED (uint)(-2) |
Definition at line 77 of file MOD_weld.c.
| #define OUT_OF_CONTEXT (uint)(-1) |
Definition at line 73 of file MOD_weld.c.
| typedef struct WeldLoopOfPolyIter WeldLoopOfPolyIter |
|
static |
Definition at line 1411 of file MOD_weld.c.
References add_v3_v3(), MVert::bweight, MEdge::bweight, CD_MEDGE, CD_MVERT, CLAMP_MAX, MVert::co, copy_v3_v3(), count, MEdge::crease, CustomData_copy_data(), CustomData_copy_layer_type_data(), CustomData_data_add(), CustomData_data_multiply(), CustomData_interp(), CustomData_layer_has_interp(), CustomData_layer_has_math(), CustomData_sizeof(), CustomDataLayer::data, MVert::flag, MEdge::flag, CustomData::layers, mul_v3_fl(), MVert::no, NULL, POINTER_OFFSET, size(), CustomData::totlayer, type, and CustomDataLayer::type.
Referenced by weldModifier_doWeld().
|
static |
Definition at line 1994 of file MOD_weld.c.
References BLI_assert, DNA_struct_default_get, MEMCMP_STRUCT_AFTER_IS_ZERO, and MEMCPY_STRUCT_AFTER.
|
static |
Definition at line 1988 of file MOD_weld.c.
References mesh, and weldModifier_doWeld().
Definition at line 2015 of file MOD_weld.c.
References IFACE_, Panel::layout, modifier_panel_end(), modifier_panel_get_property_pointers(), modifier_vgroup_ui(), NULL, ptr, uiItemR(), and uiLayoutSetPropSep().
Referenced by panelRegister().
|
static |
Definition at line 2031 of file MOD_weld.c.
References eModifierType_Weld, modifier_panel_register(), and panel_draw().
|
static |
Definition at line 2003 of file MOD_weld.c.
References CD_MASK_MDEFORMVERT, WeldModifierData::defgrp_name, and CustomData_MeshMasks::vmask.
|
static |
Definition at line 590 of file MOD_weld.c.
References WeldEdge::edge_dest, WeldEdge::edge_orig, MEM_mallocN, MEM_reallocN, OUT_OF_CONTEXT, v1, MEdge::v1, v2, MEdge::v2, WeldEdge::vert_a, and WeldEdge::vert_b.
Referenced by weld_mesh_context_create().
|
static |
Definition at line 467 of file MOD_weld.c.
References BLI_assert, WeldEdge::edge_dest, WeldEdge::edge_orig, ELEM, ELEM_COLLAPSED, WeldEdge::flag, WeldGroup::len, MEM_freeN, MEM_mallocN, WeldGroup::ofs, OUT_OF_CONTEXT, WeldEdge::vert_a, and WeldEdge::vert_b.
Referenced by weld_mesh_context_create().
|
static |
Definition at line 634 of file MOD_weld.c.
References BLI_assert, WeldEdge::edge_dest, WeldEdge::edge_orig, ELEM_COLLAPSED, ELEM_MERGED, WeldEdge::flag, WeldGroupEdge::group, WeldGroup::len, MEM_callocN, MEM_mallocN, WeldGroup::ofs, OUT_OF_CONTEXT, WeldGroupEdge::v1, WeldGroupEdge::v2, WeldEdge::vert_a, and WeldEdge::vert_b.
Referenced by weld_mesh_context_create().
|
static |
Definition at line 721 of file MOD_weld.c.
References ELEM_COLLAPSED, WeldLoop::flag, WeldPoly::flag, WeldLoopOfPolyIter::group, WeldLoopOfPolyIter::group_len, l, WeldLoopOfPolyIter::l_next, WeldPoly::loop_end, WeldLoopOfPolyIter::loop_end, WeldLoopOfPolyIter::loop_map, WeldPoly::loop_start, WeldLoopOfPolyIter::loop_start, WeldLoopOfPolyIter::mloop, OUT_OF_CONTEXT, WeldLoopOfPolyIter::v, and WeldLoopOfPolyIter::wloop.
Referenced by weld_poly_loop_ctx_setup(), and weldModifier_doWeld().
|
static |
Definition at line 773 of file MOD_weld.c.
References BLI_assert, MLoop::e, WeldLoopOfPolyIter::e, WeldLoop::edge, ELEM_COLLAPSED, WeldLoop::flag, WeldLoopOfPolyIter::group, WeldLoopOfPolyIter::group_len, l, WeldLoopOfPolyIter::l_curr, WeldLoopOfPolyIter::l_next, WeldLoopOfPolyIter::loop_end, WeldLoopOfPolyIter::loop_map, WeldLoop::loop_skip_to, WeldLoopOfPolyIter::loop_start, WeldLoopOfPolyIter::mloop, OUT_OF_CONTEXT, WeldLoopOfPolyIter::type, MLoop::v, WeldLoopOfPolyIter::v, WeldLoop::vert, and WeldLoopOfPolyIter::wloop.
Referenced by weld_poly_loop_ctx_setup(), and weldModifier_doWeld().
|
static |
Definition at line 1321 of file MOD_weld.c.
References WeldMesh::edge_groups, WeldMesh::edge_groups_buffer, WeldMesh::edge_groups_map, WeldMesh::edge_kill_len, Mesh::medge, MEM_callocN, MEM_freeN, MEM_mallocN, mesh, Mesh::mloop, Mesh::mpoly, Mesh::totedge, Mesh::totloop, Mesh::totpoly, Mesh::totvert, WeldMesh::vert_groups, WeldMesh::vert_groups_buffer, WeldMesh::vert_kill_len, weld_edge_ctx_alloc(), weld_edge_ctx_setup(), weld_edge_groups_setup(), weld_poly_loop_ctx_alloc(), weld_poly_loop_ctx_setup(), weld_vert_ctx_alloc_and_setup(), and weld_vert_groups_setup().
Referenced by weldModifier_doWeld().
|
static |
Definition at line 1390 of file MOD_weld.c.
References WeldMesh::edge_groups, WeldMesh::edge_groups_buffer, WeldMesh::edge_groups_map, WeldMesh::loop_map, MEM_freeN, WeldMesh::poly_map, WeldMesh::vert_groups, WeldMesh::vert_groups_buffer, WeldMesh::wloop, and WeldMesh::wpoly.
Referenced by weldModifier_doWeld().
|
static |
Definition at line 826 of file MOD_weld.c.
References CLAMP_MIN, e, MLoop::e, WeldLoop::edge, l, WeldGroup::len, WeldPoly::len, WeldPoly::loop_end, WeldMesh::loop_map, WeldLoop::loop_orig, WeldLoop::loop_skip_to, WeldPoly::loop_start, WeldPoly::loops, MPoly::loopstart, WeldMesh::max_poly_len, MEM_freeN, MEM_mallocN, MEM_reallocN, MIN2, WeldGroup::ofs, OUT_OF_CONTEXT, WeldPoly::poly_dst, WeldMesh::poly_map, WeldPoly::poly_orig, MPoly::totloop, v, MLoop::v, WeldLoop::vert, WeldMesh::wloop, WeldMesh::wloop_len, WeldMesh::wpoly, WeldMesh::wpoly_len, WeldMesh::wpoly_new, and WeldMesh::wpoly_new_len.
Referenced by weld_mesh_context_create().
|
static |
Definition at line 1071 of file MOD_weld.c.
References BLI_assert, WeldLoop::edge, ELEM_COLLAPSED, WeldLoop::flag, WeldPoly::flag, l, WeldGroup::len, WeldPoly::len, WeldMesh::loop_kill_len, WeldMesh::loop_map, WeldPoly::loops, MEM_freeN, MEM_mallocN, NULL, WeldGroup::ofs, OUT_OF_CONTEXT, WeldPoly::poly_dst, WeldMesh::poly_kill_len, WeldMesh::poly_map, WeldPoly::poly_orig, WeldLoopOfPolyIter::v, WeldLoop::vert, weld_iter_loop_of_poly_begin(), weld_iter_loop_of_poly_next(), weld_poly_split_recursive(), WeldMesh::wloop, WeldMesh::wloop_len, WeldMesh::wpoly, WeldMesh::wpoly_len, WeldMesh::wpoly_new, and WeldMesh::wpoly_new_len.
Referenced by weld_mesh_context_create().
|
static |
Definition at line 931 of file MOD_weld.c.
References BLI_assert, ELEM_COLLAPSED, WeldLoop::flag, WeldPoly::flag, WeldGroup::len, WeldPoly::len, WeldPoly::loop_end, WeldMesh::loop_map, WeldLoop::loop_orig, WeldLoop::loop_skip_to, WeldPoly::loop_start, WeldPoly::loops, NULL, WeldGroup::ofs, OUT_OF_CONTEXT, WeldPoly::poly_dst, WeldPoly::poly_orig, WeldLoop::vert, WeldMesh::wloop, WeldMesh::wpoly_new, and WeldMesh::wpoly_new_len.
Referenced by weld_poly_loop_ctx_setup().
|
static |
Definition at line 373 of file MOD_weld.c.
References MEM_mallocN, MEM_reallocN, OUT_OF_CONTEXT, WeldVert::vert_dest, and WeldVert::vert_orig.
Referenced by weld_mesh_context_create().
|
static |
Definition at line 399 of file MOD_weld.c.
References BLI_assert, ELEM_MERGED, WeldGroup::len, MEM_callocN, MEM_mallocN, WeldGroup::ofs, OUT_OF_CONTEXT, WeldVert::vert_dest, and WeldVert::vert_orig.
Referenced by weld_mesh_context_create().
|
static |
Definition at line 1576 of file MOD_weld.c.
References BKE_defvert_find_weight(), BKE_mesh_new_nomain_from_template(), BKE_object_defgroup_name_index(), BLI_array_alloca, BLI_assert, BLI_BITMAP_ENABLE, BLI_BITMAP_NEW, BLI_BITMAP_TEST, BLI_bvhtree_overlap_ex(), BVH_OVERLAP_RETURN_PAIRS, bvhtree_from_mesh_verts_ex(), CD_MASK_NORMAL, CD_MDEFORMVERT, MVert::co, WeldVertexCluster::co, copy_v3_v3(), count, CustomData_copy_data(), CustomData_get_layer(), customdata_weld(), data, WeldModifierData::defgrp_name, e, MLoop::e, WeldLoopOfPolyIter::e, WeldMesh::edge_groups, WeldMesh::edge_groups_buffer, WeldMesh::edge_groups_map, WeldMesh::edge_kill_len, ELEM_MERGED, MEdge::flag, WeldModifierData::flag, free_bvhtree_from_mesh(), WeldGroupEdge::group, WeldLoopOfPolyIter::group_len, BVHTreeOverlap::indexA, BVHTreeOverlap::indexB, Mesh::ldata, WeldGroup::len, len_squared_v3(), WeldMesh::loop_kill_len, WeldMesh::loop_map, MPoly::loopstart, madd_v3_v3fl(), WeldMesh::max_poly_len, ME_LOOSEEDGE, Mesh::medge, MEM_freeN, MEM_malloc_arrayN, WeldModifierData::merge_dist, WeldVertexCluster::merged_verts, mesh, Mesh::mloop, MOD_WELD_INVERT_VGROUP, MOD_WELD_MODE_ALL, MOD_WELD_MODE_CONNECTED, WeldModifierData::mode, Mesh::mpoly, Mesh::mvert, NULL, ModifierEvalContext::object, WeldGroup::ofs, OUT_OF_CONTEXT, WeldPoly::poly_dst, WeldMesh::poly_kill_len, WeldMesh::poly_map, range_vn_u(), result, square_f(), sub_v3_v3v3(), SWAP, Mesh::totedge, Mesh::totloop, MPoly::totloop, Mesh::totpoly, Mesh::totvert, tree, WeldLoopOfPolyIter::type, v, MLoop::v, WeldLoopOfPolyIter::v, v1, MEdge::v1, WeldGroupEdge::v1, v2, MEdge::v2, WeldGroupEdge::v2, WeldMesh::vert_groups, WeldMesh::vert_groups_buffer, WeldMesh::vert_kill_len, weld_iter_loop_of_poly_begin(), weld_iter_loop_of_poly_next(), weld_mesh_context_create(), weld_mesh_context_free(), WeldMesh::wloop, WeldMesh::wpoly, WeldMesh::wpoly_new, and WeldMesh::wpoly_new_len.
Referenced by modifyMesh().
| ModifierTypeInfo modifierType_Weld |
Definition at line 2036 of file MOD_weld.c.