|
Blender V4.3
|
#include "MEM_guardedalloc.h"#include "BLI_utildefines.h"#include "BLI_array_utils.hh"#include "BLI_bitmap.h"#include "BLI_heap_simple.h"#include "BLI_math_geom.h"#include "BLI_math_matrix.h"#include "BLI_stack.h"#include "BLI_vector.hh"#include "BLT_translation.hh"#include "DNA_defaults.h"#include "DNA_mesh_types.h"#include "DNA_meshdata_types.h"#include "DNA_modifier_types.h"#include "DNA_screen_types.h"#include "BKE_deform.hh"#include "BKE_lib_id.hh"#include "BKE_mesh.hh"#include "BKE_mesh_mapping.hh"#include "BKE_modifier.hh"#include "UI_interface.hh"#include "UI_resources.hh"#include "RNA_access.hh"#include "RNA_prototypes.hh"#include "WM_types.hh"#include "MOD_ui_common.hh"#include "bmesh.hh"Go to the source code of this file.
Classes | |
| struct | EMat |
| struct | Frame |
| struct | SkinNode |
| struct | SkinOutput |
| struct | EdgeStackElem |
Macros | |
| #define | MAX_SKIN_NODE_FRAMES 2 |
| #define | NUM_SUBDIVISIONS_MAX 128 |
| #define | PRINT_HOLE_INFO 0 |
Enumerations | |
| enum | SkinNodeFlag { CAP_START = 1 , CAP_END = 2 , SEAM_FRAME = 4 , FLIP_NORMAL = 8 } |
| enum | eSkinErrorFlag { SKIN_ERROR_NO_VALID_ROOT = (1 << 0) , SKIN_ERROR_HULL = (1 << 1) } |
Variables | |
| ModifierTypeInfo | modifierType_Skin |
| #define MAX_SKIN_NODE_FRAMES 2 |
Definition at line 156 of file MOD_skin.cc.
| #define NUM_SUBDIVISIONS_MAX 128 |
Referenced by calc_edge_subdivisions().
| #define PRINT_HOLE_INFO 0 |
Definition at line 1125 of file MOD_skin.cc.
| enum eSkinErrorFlag |
| Enumerator | |
|---|---|
| SKIN_ERROR_NO_VALID_ROOT | |
| SKIN_ERROR_HULL | |
Definition at line 1815 of file MOD_skin.cc.
| enum SkinNodeFlag |
| Enumerator | |
|---|---|
| CAP_START | |
| CAP_END | |
| SEAM_FRAME | |
| FLIP_NORMAL | |
Definition at line 126 of file MOD_skin.cc.
|
static |
Definition at line 1030 of file MOD_skin.cc.
References BLI_assert, BM_CREATE_NO_DOUBLE, BM_elem_flag_enable, BM_ELEM_SMOOTH, BM_face_create_verts(), BM_face_normal_update(), ELEM, BMFace::mat_nr, MOD_SKIN_SMOOTH_SHADING, v2, and verts.
Referenced by add_quad_from_tris(), connect_frames(), and skin_output_end_nodes().
|
static |
Definition at line 1478 of file MOD_skin.cc.
References add_poly(), e, quad, and quad_from_tris().
Referenced by hull_merge_triangles().
|
static |
Definition at line 1906 of file MOD_skin.cc.
References BKE_mesh_from_bmesh_for_eval_nomain(), bm, BM_mesh_free(), build_edge_mats(), build_frames(), build_skin(), blender::bke::mesh::build_vert_to_edge_map(), CD_MVERT_SKIN, CustomData_get_layer(), MEM_freeN(), result, SKIN_ERROR_NO_VALID_ROOT, skin_set_orig_indices(), Mesh::vert_data, and Mesh::verts_num.
Referenced by final_skin().
|
static |
Definition at line 776 of file MOD_skin.cc.
References BLI_BITMAP_NEW, BLI_stack_free(), BLI_stack_is_empty(), BLI_stack_new, BLI_stack_push(), build_emats_stack(), calc_edge_mat(), EdgeStackElem::e, blender::bke::mesh::edge_other_vert(), flag, EdgeStackElem::mat, MEM_freeN(), MVERT_SKIN_ROOT, EdgeStackElem::parent_v, size(), and v.
Referenced by base_skin().
|
static |
Definition at line 720 of file MOD_skin.cc.
References angle(), angle_normalized_v3v3(), BLI_BITMAP_ENABLE, BLI_BITMAP_TEST, BLI_stack_pop(), BLI_stack_push(), calc_edge_mat(), copy_m3_m3(), cross_v3_v3v3(), e, EdgeStackElem::e, blender::bke::mesh::edge_other_vert(), flag, EdgeStackElem::mat, EMat::mat, MVERT_SKIN_ROOT, normalize_v3(), EMat::origin, EdgeStackElem::parent_v, rotate_normalized_v3_v3v3fl(), blender::offset_indices::GroupedSpan< T >::size(), sub_v3_v3v3(), and v.
Referenced by build_edge_mats().
|
static |
Definition at line 658 of file MOD_skin.cc.
References connection_node_frames(), end_node_frames(), size(), and v.
Referenced by base_skin().
|
static |
Definition at line 262 of file MOD_skin.cc.
References bm, BM_ALL_NOLOOP, BM_EDGE, BM_edge_exists(), BM_elem_flag_enable, BM_elem_flag_test, BM_ELEM_SELECT, BM_ELEM_SMOOTH, BM_ELEM_TAG, BM_FACE, BM_face_normal_update(), BM_FACES_OF_EDGE, BM_ITER_ELEM, BM_mesh_delete_hflag_tagged(), BM_mesh_elem_hflag_disable_all(), BM_VERT, BMO_ERROR_CANCEL, BMO_error_occurred_at_level(), BMO_FLAG_DEFAULTS, BMO_FLAG_RESPECT_HIDE, BMO_ITER, BMO_op_exec(), BMO_op_finish(), BMO_op_initf(), Frame::detached, e, Frame::inside_hull, BMFace::mat_nr, MOD_SKIN_SMOOTH_SHADING, BMOperator::slots_out, UNUSED_VARS, v, Frame::verts, and verts.
Referenced by skin_output_branch_hulls().
|
static |
Definition at line 1821 of file MOD_skin.cc.
References BM_data_layer_add(), bm_mesh_allocsize_default, BM_mesh_create(), BM_mesh_elem_toolflags_ensure(), bmesh_edit_begin(), bmesh_edit_end(), BMO_pop(), BMO_push(), CD_MDEFORMVERT, hull_merge_triangles(), output_frames(), SKIN_ERROR_HULL, skin_fix_hull_topology(), skin_merge_close_frame_verts(), skin_output_branch_hulls(), skin_output_connections(), skin_output_end_nodes(), skin_smooth_hulls(), skin_update_merged_vertices(), BMeshCreateParams::use_toolflags, and v.
Referenced by base_skin().
Definition at line 685 of file MOD_skin.cc.
References b, cross_v3_v3v3(), dot(), dot_v3v3(), normalize_v3(), and sub_v3_v3v3().
Referenced by build_edge_mats(), and build_emats_stack().
|
static |
Definition at line 838 of file MOD_skin.cc.
References flag, half_v2(), int, len_v3v3(), MVERT_SKIN_LOOSE, and NUM_SUBDIVISIONS_MAX.
Referenced by subdivide_base().
Definition at line 1127 of file MOD_skin.cc.
References add_v3_v3(), add_v3_v3v3(), BMVert::co, mul_v3_fl(), and Frame::verts.
Referenced by skin_hole_target_face().
|
static |
Definition at line 1175 of file MOD_skin.cc.
References BLI_assert, bm, BM_face_find_shortest_loop(), BM_FACES_OF_VERT, BM_ITER_ELEM, BM_vert_in_face(), BMO_FLAG_DEFAULTS, BMO_FLAG_RESPECT_HIDE, BMO_op_exec(), BMO_op_finish(), BMO_op_initf(), BMO_slot_get(), BMO_slot_map_elem_insert(), BMVert::co, BMLoop::e, BMFace::len, mid_v3_v3v3(), BMOperator::slots_in, BMEdge::v1, and BMEdge::v2.
Referenced by skin_fix_hole_no_good_verts().
|
static |
Definition at line 453 of file MOD_skin.cc.
References blender::bke::mesh::edge_other_vert(), SkinNode::frames, blender::offset_indices::GroupedSpan< T >::size(), SkinNode::totframe, and v.
Referenced by skin_merge_close_frame_verts(), and skin_output_branch_hulls().
|
static |
Definition at line 1048 of file MOD_skin.cc.
References add_poly(), dot_v3v3(), mid_v3_v3v3v3v3(), normal_quad_v3(), sub_v3_v3v3(), swap, UNPACK4, and UNPACK4_EX.
Referenced by skin_output_connections(), and skin_output_end_nodes().
|
static |
Definition at line 613 of file MOD_skin.cc.
References connection_node_mat(), copy_m3_m3(), create_frame(), SkinNode::flag, half_v2(), EMat::mat, negate_v3(), node_frames_init(), EMat::origin, SkinNode::seam_edges, SEAM_FRAME, and v.
Referenced by build_frames().
|
static |
Definition at line 580 of file MOD_skin.cc.
References angle(), angle_normalized_v3v3(), copy_m3_m3(), copy_v3_v3(), cross_v3_v3v3(), EMat::mat, normalize_v3(), EMat::origin, rotate_normalized_v3_v3v3fl(), and v.
Referenced by connection_node_frames().
|
static |
Definition at line 496 of file MOD_skin.cc.
References add_v3_v3v3(), Frame::co, mul_v3_v3fl(), and sub_v3_v3v3().
Referenced by connection_node_frames(), and end_node_frames().
|
static |
Definition at line 528 of file MOD_skin.cc.
References CAP_END, CAP_START, Frame::co, copy_m3_m3(), create_frame(), dot_v3v3(), SkinNode::flag, FLIP_NORMAL, SkinNode::frames, half_v2(), negate_v3(), node_frames_init(), normal_quad_v3(), v, and zero_m3().
Referenced by build_frames().
| ENUM_OPERATORS | ( | eSkinErrorFlag | , |
| SKIN_ERROR_HULL | ) |
| ENUM_OPERATORS | ( | SkinNodeFlag | , |
| FLIP_NORMAL | ) |
|
static |
Definition at line 1952 of file MOD_skin.cc.
References base_skin(), BKE_id_free(), CD_MVERT_SKIN, CustomData_get_layer(), mesh, result, and subdivide_base().
Referenced by modify_mesh().
Definition at line 384 of file MOD_skin.cc.
References Frame::co, and len_v3v3().
Referenced by BKE_cachefile_filepath_get(), BKE_gpencil_visible_stroke_advanced_iter(), merge_frame_corners(), and ptcache_frame_from_filename().
Definition at line 523 of file MOD_skin.cc.
References v.
Referenced by calc_edge_subdivisions(), connection_node_frames(), end_node_frames(), and subdivide_base().
|
static |
Definition at line 1487 of file MOD_skin.cc.
References add_quad_from_tris(), BLI_assert, BLI_heapsimple_free(), BLI_heapsimple_insert(), BLI_heapsimple_is_empty(), BLI_heapsimple_new(), BLI_heapsimple_pop_min(), BM_EDGE, BM_edge_face_pair(), BM_EDGES_OF_MESH, BM_elem_flag_enable, BM_elem_flag_test, BM_ELEM_TAG, BM_FACE, BM_face_calc_area(), BM_face_is_normal_valid(), BM_face_share_face_check(), BM_ITER_MESH, BM_mesh_delete_hflag_tagged(), BM_mesh_elem_hflag_disable_all(), dot_v3v3(), e, is_quad_convex_v3(), is_quad_symmetric(), len, quad, quad_crosses_symmetry_plane(), and quad_from_tris().
Referenced by build_skin().
|
static |
Definition at line 1970 of file MOD_skin.cc.
References BLI_assert, DNA_struct_default_get, eModifierMode_Editmode, MEMCMP_STRUCT_AFTER_IS_ZERO, MEMCPY_STRUCT_AFTER, and ModifierData::mode.
|
static |
Definition at line 177 of file MOD_skin.cc.
References copy_v3_v3(), len_squared_v3v3(), quad, and SkinModifierData::symmetry_axes.
Referenced by hull_merge_triangles().
|
static |
Definition at line 1137 of file MOD_skin.cc.
References BM_ITER_ELEM, BM_VERTS_OF_FACE, BMVert::co, FLT_MAX, isect_ray_tri_v3(), and v.
Referenced by skin_hole_target_face().
Definition at line 389 of file MOD_skin.cc.
References BLI_assert, copy_v3_v3(), frame_len(), l, len_v3v3(), merge(), mid_v3_v3v3(), and min_ff().
Referenced by skin_merge_close_frame_verts().
|
static |
Definition at line 1982 of file MOD_skin.cc.
References BKE_modifier_set_error(), BLI_assert, error(), final_skin(), mesh, ModifierEvalContext::object, result, SKIN_ERROR_HULL, and SKIN_ERROR_NO_VALID_ROOT.
Definition at line 483 of file MOD_skin.cc.
References SkinNode::flag, SkinNode::frames, SkinNode::seam_edges, and SkinNode::totframe.
Referenced by connection_node_frames(), and end_node_frames().
|
static |
Definition at line 1101 of file MOD_skin.cc.
References BKE_defvert_copy(), BLI_assert, bm, BM_CREATE_NOP, BM_vert_create(), CD_MDEFORMVERT, Frame::co, CustomData_bmesh_get(), BMHeader::data, Frame::frame, SkinNode::frames, BMVert::head, Frame::merge, SkinNode::totframe, MDeformVert::totweight, v, BMesh::vdata, and Frame::verts.
Referenced by build_skin().
Definition at line 2011 of file MOD_skin.cc.
References IFACE_, Panel::layout, modifier_panel_end(), modifier_panel_get_property_pointers(), ptr, RNA_enum_set(), UI_ITEM_NONE, UI_ITEM_R_FORCE_BLANK_DECORATE, UI_ITEM_R_TOGGLE, uiItemFullO(), uiItemO(), uiItemR(), uiLayoutRow(), uiLayoutRowWithHeading(), uiLayoutSetPropSep(), and WM_OP_EXEC_DEFAULT.
Referenced by panel_register().
|
static |
Definition at line 2063 of file MOD_skin.cc.
References eModifierType_Skin, modifier_panel_register(), and panel_draw().
|
static |
Definition at line 211 of file MOD_skin.cc.
References quad, and SkinModifierData::symmetry_axes.
Referenced by hull_merge_triangles().
Definition at line 1440 of file MOD_skin.cc.
References BLI_assert, bm, BM_face_as_array_vert_tri(), BM_iter_as_array(), BM_VERTS_OF_FACE, e, ELEM, and len.
Referenced by add_quad_from_tris(), and hull_merge_triangles().
|
static |
Definition at line 2006 of file MOD_skin.cc.
References CD_MASK_MDEFORMVERT, CD_MASK_MVERT_SKIN, and CustomData_MeshMasks::vmask.
|
static |
Definition at line 1295 of file MOD_skin.cc.
References b, FLT_MAX, len, and len_squared_v3v3().
Referenced by skin_fix_hole_no_good_verts(), skin_output_connections(), and skin_output_end_nodes().
Definition at line 1325 of file MOD_skin.cc.
References BLI_assert, bm, BM_EDGE, BM_elem_flag_enable, BM_ELEM_TAG, BM_FACE, BM_face_as_array_vert_quad(), BM_face_find_longest_loop(), BM_face_kill(), BM_FACES_OF_VERT, BM_iter_as_array(), BM_mesh_elem_hflag_disable_all(), BM_VERTS_OF_FACE, BMO_FLAG_DEFAULTS, BMO_FLAG_RESPECT_HIDE, BMO_ITER, BMO_op_callf(), BMO_op_exec(), BMO_op_finish(), BMO_op_init(), BMO_op_initf(), BMO_slot_get(), BMO_slot_map_elem_insert(), collapse_face_corners(), blender::Vector< T, InlineBufferCapacity, Allocator >::data(), BMLoop::e, BMFace::len, blender::Vector< T, InlineBufferCapacity, Allocator >::reinitialize(), skin_choose_quad_bridge_order(), BMOperator::slots_in, BMOperator::slots_out, SUBD_CORNER_STRAIGHT_CUT, vert_array_face_normal_update(), Frame::verts, and verts.
Referenced by skin_fix_hull_topology().
Definition at line 1606 of file MOD_skin.cc.
References bm, Frame::detached, SkinNode::frames, skin_fix_hole_no_good_verts(), skin_hole_detach_partially_attached_frame(), skin_hole_target_face(), SkinNode::totframe, and v.
Referenced by build_skin().
Definition at line 1422 of file MOD_skin.cc.
References bm, BM_CREATE_NOP, BM_vert_create(), Frame::inside_hull, and Frame::verts.
Referenced by skin_fix_hull_topology().
Definition at line 1239 of file MOD_skin.cc.
References bm, BM_face_calc_center_median(), BM_FACES_OF_MESH, BM_ITER_MESH, calc_frame_center(), BMVert::co, FLT_MAX, isect_ray_poly(), len_v3v3(), normal_quad_v3(), printf, and Frame::verts.
Referenced by skin_fix_hull_topology().
|
static |
Definition at line 1565 of file MOD_skin.cc.
References collect_hull_frames(), MEM_freeN(), merge_frame_corners(), and v.
Referenced by build_skin().
|
static |
Definition at line 1786 of file MOD_skin.cc.
References build_hull(), collect_hull_frames(), MEM_freeN(), result, SkinNode::totframe, and v.
Referenced by build_skin().
|
static |
Definition at line 1678 of file MOD_skin.cc.
References b, connect_frames(), e, SEAM_FRAME, skin_choose_quad_bridge_order(), Frame::verts, and verts.
Referenced by build_skin().
|
static |
Definition at line 1631 of file MOD_skin.cc.
References add_poly(), CAP_END, CAP_START, connect_frames(), SkinNode::flag, FLIP_NORMAL, SkinNode::frames, SEAM_FRAME, skin_choose_quad_bridge_order(), SkinNode::totframe, v, and Frame::verts.
Referenced by build_skin().
|
static |
Definition at line 1893 of file MOD_skin.cc.
References CD_CONSTRUCT, CD_ORIGINDEX, copy_vn_i(), CustomData_add_layer(), and ORIGINDEX_NONE.
Referenced by base_skin().
|
static |
Definition at line 1713 of file MOD_skin.cc.
References add_v3_v3(), bm, BM_data_layer_add(), BM_data_layer_free_n(), BM_edge_other_vert(), BM_EDGES_OF_VERT, BM_elem_flag_enable, BM_elem_flag_test, BM_ELEM_TAG, BM_face_normal_update(), BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_mesh_elem_hflag_disable_all(), BM_VERT, BM_VERTS_OF_MESH, SkinModifierData::branch_smoothing, CD_SHAPEKEY, BMVert::co, copy_v3_v3(), CustomData_bmesh_get_n(), CustomData_number_of_layers(), BMHeader::data, e, SkinNode::frames, BMVert::head, interp_v3_v3v3(), mul_v3_fl(), SkinNode::totframe, v, BMesh::vdata, and Frame::verts.
Referenced by build_skin().
Definition at line 1583 of file MOD_skin.cc.
References BLI_assert, Frame::corner, Frame::frame, SkinNode::frames, Frame::merge, SkinNode::totframe, v, and Frame::verts.
Referenced by build_skin().
Definition at line 895 of file MOD_skin.cc.
References BKE_defvert_add_index_notest(), BKE_mesh_new_nomain_from_template(), BLI_assert, calc_edge_subdivisions(), blender::Span< T >::cast(), CD_MVERT_SKIN, blender::array_utils::count_indices(), CustomData_copy_data(), CustomData_get_layer(), CustomData_get_layer_for_write(), MDeformWeight::def_nr, MDeformVert::dw, Mesh::edges_num, half_v2(), interp_v3_v3v3(), interpf(), MEM_freeN(), powf, result, MDeformVert::totweight, v, Mesh::vert_data, Mesh::verts_num, and MDeformWeight::weight.
Referenced by final_skin().
Recalculate the normals of all faces connected to verts.
Definition at line 106 of file MOD_skin.cc.
References vert_face_normal_mark_set(), vert_face_normal_mark_update(), and verts.
Referenced by skin_fix_hole_no_good_verts().
|
static |
Definition at line 83 of file MOD_skin.cc.
References BM_FACES_OF_VERT, BM_ITER_ELEM, FLT_MAX, BMFace::no, and v.
Referenced by vert_array_face_normal_update().
|
static |
Definition at line 92 of file MOD_skin.cc.
References BM_face_normal_update(), BM_FACES_OF_VERT, BM_ITER_ELEM, FLT_MAX, BMFace::no, and v.
Referenced by vert_array_face_normal_update().
| ModifierTypeInfo modifierType_Skin |
Definition at line 2068 of file MOD_skin.cc.