|
Blender V4.3
|
#include "DNA_mesh_types.h"#include "MEM_guardedalloc.h"#include "BLI_alloca.h"#include "BLI_bitmap.h"#include "BLI_linklist_stack.h"#include "BLI_math_geom.h"#include "BLI_math_matrix.h"#include "BLI_math_rotation.h"#include "BLI_math_vector.h"#include "BLI_memarena.h"#include "BLI_utildefines_stack.h"#include "BKE_context.hh"#include "BKE_crazyspace.hh"#include "BKE_editmesh.hh"#include "BKE_mesh.hh"#include "BKE_modifier.hh"#include "BKE_scene.hh"#include "ED_mesh.hh"#include "ED_object.hh"#include "DEG_depsgraph_query.hh"#include "transform.hh"#include "transform_orientations.hh"#include "transform_snap.hh"#include "transform_convert.hh"Go to the source code of this file.
Classes | |
| struct | TransCustomData_PartialUpdate |
| struct | PartialTypeState |
| struct | TransCustomDataMesh |
| struct | TransCustomDataMergeGroup |
| struct | TransCustomDataLayer |
Variables | |
| TransConvertTypeInfo | TransConvertType_Mesh |
Container TransCustomData Creation | |
| #define | PARTIAL_TYPE_MAX 2 |
| enum | ePartialType { PARTIAL_NONE = -1 , PARTIAL_TYPE_GROUP = 0 , PARTIAL_TYPE_ALL = 1 } |
| static void | mesh_customdata_free_fn (TransInfo *t, TransDataContainer *tc, TransCustomData *custom_data) |
| static void | mesh_customdatacorrect_free (TransCustomDataLayer *tcld) |
| static TransCustomDataMesh * | mesh_customdata_ensure (TransDataContainer *tc) |
| static void | mesh_customdata_free (TransCustomDataMesh *tcmd) |
CustomData TransCustomDataLayer Creation | |
| #define | USE_FACE_SUBSTITUTE |
| #define | FACE_SUBSTITUTE_INDEX INT_MIN |
| static BMFace * | mesh_customdatacorrect_find_best_face_substitute (BMFace *f) |
| static void | mesh_customdatacorrect_face_substitute_set (TransCustomDataLayer *tcld, BMFace *f, BMFace *f_copy) |
| static BMFace * | mesh_customdatacorrect_face_substitute_get (BMFace *f_copy) |
| static void | mesh_customdatacorrect_init_vert (TransCustomDataLayer *tcld, TransDataBasic *td, const int index) |
| static void | mesh_customdatacorrect_init_container_generic (TransDataContainer *, TransCustomDataLayer *tcld) |
| static void | mesh_customdatacorrect_init_container_merge_group (TransDataContainer *tc, TransCustomDataLayer *tcld) |
| static TransCustomDataLayer * | mesh_customdatacorrect_create_impl (TransDataContainer *tc, const bool use_merge_group) |
| static void | mesh_customdatacorrect_create (TransDataContainer *tc, const bool use_merge_group) |
| void | transform_convert_mesh_customdatacorrect_init (TransInfo *t) |
TransDataMirror Creation | |
| #define | TRANSFORM_MAXDIST_MIRROR 0.00002f |
| static bool | is_in_quadrant_v3 (const float co[3], const int quadrant[3], const float epsilon) |
| void | transform_convert_mesh_mirrordata_calc (BMEditMesh *em, const bool use_select, const bool use_topology, const bool mirror_axis[3], TransMirrorData *r_mirror_data) |
| void | transform_convert_mesh_mirrordata_free (TransMirrorData *mirror_data) |
| #define FACE_SUBSTITUTE_INDEX INT_MIN |
Definition at line 180 of file transform_convert_mesh.cc.
Referenced by mesh_customdatacorrect_apply_vert(), mesh_customdatacorrect_face_substitute_get(), and mesh_customdatacorrect_face_substitute_set().
| #define PARTIAL_TYPE_MAX 2 |
Definition at line 85 of file transform_convert_mesh.cc.
| #define TRANSFORM_MAXDIST_MIRROR 0.00002f |
Definition at line 1187 of file transform_convert_mesh.cc.
Referenced by createTransEditVerts(), and transform_convert_mesh_mirrordata_calc().
| #define USE_FACE_SUBSTITUTE |
Definition at line 178 of file transform_convert_mesh.cc.
| enum ePartialType |
Definition at line 68 of file transform_convert_mesh.cc.
|
static |
Find the closest point on the ngon on the opposite side. used to set the edge slide distance for ngons.
Definition at line 2253 of file transform_convert_mesh.cc.
References BMVert::co, copy_v3_v3(), FLT_MAX, isect_line_plane_v3(), len_squared_v3v3(), line_point_factor_v3(), BMLoop::next, BMLoop::prev, and BMLoop::v.
Referenced by isect_face_dst().
|
static |
Definition at line 951 of file transform_convert_mesh.cc.
References BLI_assert, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_elem_index_get, BM_ELEM_SELECT, BMVert::co, FLT_MAX, geodesic_distance_propagate_across_triangle(), len_v3(), mul_m3_v3(), mul_v3_m3v3(), sub_v3_v3v3(), and v2.
Referenced by transform_convert_mesh_connectivity_distance().
|
static |
Definition at line 1006 of file transform_convert_mesh.cc.
References BM_elem_flag_test, BM_ELEM_HIDDEN, BM_FACES_OF_EDGE, and BM_ITER_ELEM.
Referenced by transform_convert_mesh_connectivity_distance().
Quick check if we can transform.
Definition at line 1491 of file transform_convert_mesh.cc.
References TransInfo::around, BKE_editmesh_from_object(), BKE_editmesh_looptris_calc(), BLI_assert, bm, BMEditMesh::bm, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ELEM_SELECT, BM_ELEM_TAG, BM_ITER_MESH, BM_ITER_MESH_INDEX, BM_vert_at_index(), BM_VERTS_OF_MESH, BMVert::co, copy_m3_m4(), copy_v3_v3(), TransMeshDataCrazySpace::defmats, TransData::dist, ELEM, fabsf, MirrorDataVert::flag, TransInfo::flag, FLT_MAX, FOREACH_TRANS_DATA_CONTAINER, MirrorDataVert::index, TransIslandData::island_vert_map, TransDataMirror::loc_src, BMEditMesh::looptris, ME_EDIT_MIRROR_TOPO, MEM_callocN, MEM_freeN(), MEM_mallocN, mesh_transdata_center_copy(), TransMirrorData::mirror_elem_len, TransInfo::mode, poly_to_tri_count(), PSEUDOINVERSE_EPSILON, pseudoinverse_m3_m3(), TransMeshDataCrazySpace::quats, TransInfo::reports, SCE_SELECT_VERTEX, SCE_SNAP_ROTATE, BMEditMesh::selectmode, TransInfo::settings, blender::ed::object::shape_key_report_if_locked(), blender::Array< T, InlineBufferCapacity, Allocator >::size(), ToolSettings::snap_flag, T_PROP_CONNECTED, T_PROP_EDIT, T_PROP_EDIT_ALL, TD_MIRROR_EDGE_X, TD_MIRROR_EDGE_Y, TD_MIRROR_EDGE_Z, TD_SELECTED, TFM_DUMMY, TFM_SHRINKFATTEN, TFM_TRANSLATION, BMesh::totface, BMesh::totloop, BMesh::totvert, BMesh::totvertsel, transform_convert_mesh_connectivity_distance(), transform_convert_mesh_crazyspace_detect(), transform_convert_mesh_crazyspace_free(), transform_convert_mesh_crazyspace_transdata_set(), transform_convert_mesh_islanddata_free(), transform_convert_mesh_islands_calc(), transform_convert_mesh_mirrordata_calc(), transform_convert_mesh_mirrordata_free(), TRANSFORM_MAXDIST_MIRROR, usingSnappingNormal(), V3D_AROUND_LOCAL_ORIGINS, TransMirrorData::vert_map, and VertsToTransData().
|
static |
Definition at line 1189 of file transform_convert_mesh.cc.
Referenced by transform_convert_mesh_mirrordata_calc().
Definition at line 2285 of file transform_convert_mesh.cc.
References BM_loop_calc_face_direction(), bm_loop_calc_opposite_co(), BMVert::co, BMLoop::f, l, BMFace::len, mid_v3_v3v3(), BMLoop::next, BMLoop::prev, and BMLoop::v.
Referenced by transform_mesh_edge_slide_data_create().
|
static |
Definition at line 102 of file transform_convert_mesh.cc.
References BLI_assert, TransDataContainer::custom, TransCustomData::data, PartialTypeState::for_looptris, PartialTypeState::for_normals, TransCustomData::free_cb, MEM_callocN, mesh_customdata_free_fn(), PARTIAL_NONE, TransCustomDataMesh::partial_update_state_prev, and TransCustomDataContainer::type.
Referenced by mesh_customdatacorrect_create(), mesh_partial_ensure(), and mesh_partial_update().
|
static |
Definition at line 117 of file transform_convert_mesh.cc.
References ARRAY_SIZE, BM_mesh_partial_destroy(), TransCustomData_PartialUpdate::cache, TransCustomDataMesh::cd_layer_correct, MEM_freeN(), mesh_customdatacorrect_free(), and TransCustomDataMesh::partial_update.
Referenced by mesh_customdata_free_fn().
|
static |
Definition at line 132 of file transform_convert_mesh.cc.
References TransCustomData::data, and mesh_customdata_free().
Referenced by mesh_customdata_ensure().
|
static |
Definition at line 671 of file transform_convert_mesh.cc.
References TransCustomDataMesh::cd_layer_correct, TransDataContainer::custom, TransCustomData::data, TransCustomDataLayer::data, TransDataContainer::data, TransDataContainer::data_len, TransDataContainer::data_mirror, TransDataContainer::data_mirror_len, TransCustomDataLayer::merge_group, mesh_customdatacorrect_apply_vert(), TransCustomDataContainer::type, and TransCustomDataLayer::use_merge_group.
Referenced by recalcData_mesh(), and special_aftertrans_update__mesh().
|
static |
Definition at line 527 of file transform_convert_mesh.cc.
References BLI_array_alloca, BLI_ghash_lookup(), bm, TransCustomDataLayer::bm, BM_elem_index_get, BM_face_calc_center_median(), BM_face_interp_multires_ex(), BM_ITER_ELEM_INDEX, BM_iter_init, BM_loop_interp_from_face(), BM_LOOPS_OF_VERT, BM_vert_loop_groups_data_layer_merge(), BM_vert_loop_groups_data_layer_merge_weights(), TransCustomDataMergeGroup::cd_loop_groups, TransCustomDataLayer::cd_loop_mdisp_offset, BMVert::co, BMIter::count, TransCustomDataLayer::customdatalayer_map, TransCustomDataLayer::customdatalayer_map_len, dist_signed_squared_to_corner_v3v3v3(), eps, BMLoop::f, FACE_SUBSTITUTE_INDEX, float, l, len_squared_v3v3(), TransCustomDataLayer::merge_group, mesh_customdatacorrect_face_substitute_get(), mesh_vert_orig_co_get(), BMLoop::next, BMVert::no, TransCustomDataLayer::origfaces, BMLoop::prev, project_plane_normalized_v3_v3v3(), UNLIKELY, UNPACK3, TransCustomDataLayer::use_merge_group, BMLoop::v, and v.
Referenced by mesh_customdatacorrect_apply().
|
static |
Definition at line 427 of file transform_convert_mesh.cc.
References BLI_assert, TransCustomDataMesh::cd_layer_correct, mesh_customdata_ensure(), and mesh_customdatacorrect_create_impl().
Referenced by transform_convert_mesh_customdatacorrect_init().
|
static |
Definition at line 377 of file transform_convert_mesh.cc.
References TransCustomDataLayer::arena, BKE_editmesh_from_object(), BLI_memarena_new(), BLI_MEMARENA_STD_BUFSIZE, bm, BMEditMesh::bm, TransCustomDataLayer::bm, TransCustomDataLayer::cd_loop_mdisp_offset, CD_MDISPS, CustomData_has_layer(), CustomData_has_math(), TransDataContainer::data, TransDataContainer::data_len, TransDataContainer::data_mirror, TransDataContainer::data_mirror_len, BMesh::ldata, MEM_callocN, mesh_customdatacorrect_init_container_generic(), mesh_customdatacorrect_init_container_merge_group(), mesh_customdatacorrect_init_vert(), TransDataContainer::obedit, BMesh::shapenr, and TransCustomDataLayer::use_merge_group.
Referenced by mesh_customdatacorrect_create().
Definition at line 251 of file transform_convert_mesh.cc.
References BLI_assert, BM_elem_index_get, FACE_SUBSTITUTE_INDEX, and BMFace::no.
Referenced by mesh_customdatacorrect_apply_vert().
|
static |
Definition at line 217 of file transform_convert_mesh.cc.
References BLI_assert, bm, TransCustomDataLayer::bm, BM_elem_index_set, BM_face_copy(), BM_FACE_FIRST_LOOP, BM_loop_interp_from_face(), TransCustomDataLayer::bm_origfaces, CustomData_bmesh_copy_map_calc(), FACE_SUBSTITUTE_INDEX, is_zero_v3(), BMesh::ldata, mesh_customdatacorrect_find_best_face_substitute(), BMLoop::next, BMFace::no, and BMesh::pdata.
Referenced by mesh_customdatacorrect_init_vert().
Search for a neighboring face with area and preferably without selected vertex. Used to replace area-less faces in custom-data correction.
Definition at line 186 of file transform_convert_mesh.cc.
References BM_elem_flag_test, BM_ELEM_SELECT, BM_ITER_ELEM, BM_LOOPS_OF_FACE, BMLoop::f, is_zero_v3(), l, BMLoop::next, BMFace::no, BMLoop::radial_next, and BMLoop::v.
Referenced by mesh_customdatacorrect_face_substitute_set().
|
static |
Definition at line 441 of file transform_convert_mesh.cc.
References TransCustomDataLayer::arena, BLI_ghash_free(), BLI_memarena_free(), TransCustomDataLayer::bm, BM_mesh_free(), TransCustomDataLayer::bm_origfaces, bmesh_edit_end(), BMO_OPTYPE_FLAG_UNTAN_MULTIRES, TransCustomDataLayer::customdatalayer_map, MEM_freeN(), TransCustomDataLayer::merge_group, TransCustomDataLayer::origfaces, and TransCustomDataLayer::origverts.
Referenced by mesh_customdata_free(), and transform_convert_mesh_customdatacorrect_init().
|
static |
Definition at line 329 of file transform_convert_mesh.cc.
References BLI_ghash_ptr_new(), bm, TransCustomDataLayer::bm, BM_LOOP, bm_mesh_allocsize_default, BM_mesh_copy_init_customdata_all_layers(), BM_mesh_create(), TransCustomDataLayer::bm_origfaces, bmesh_edit_begin(), BMO_OPTYPE_FLAG_UNTAN_MULTIRES, TransCustomDataLayer::cd_loop_mdisp_offset, CD_MDISPS, CustomData_get_offset(), BMesh::ldata, TransCustomDataLayer::origfaces, and params.
Referenced by mesh_customdatacorrect_create_impl().
|
static |
Definition at line 349 of file transform_convert_mesh.cc.
References TransCustomDataLayer::arena, BLI_assert, BLI_ghash_ptr_new_ex(), BLI_memarena_alloc(), bm, TransCustomDataLayer::bm, CustomData_has_math(), CustomData_layer_has_math(), TransCustomDataLayer::customdatalayer_map, TransCustomDataLayer::customdatalayer_map_len, TransCustomDataLayer::data, TransCustomDataLayer::data_len, TransDataContainer::data_len, TransDataContainer::data_mirror_len, BMesh::ldata, MEM_mallocN, TransCustomDataLayer::merge_group, TransCustomDataLayer::origverts, and CustomData::totlayer.
Referenced by mesh_customdatacorrect_create_impl().
|
static |
Definition at line 259 of file transform_convert_mesh.cc.
References angle_v3v3v3(), TransCustomDataLayer::arena, BLI_array_alloca, BLI_ghash_ensure_p(), BLI_ghash_insert(), BLI_memarena_alloc(), bm, TransCustomDataLayer::bm, BM_face_copy(), BM_iter_init, BM_loop_find_next_nodouble(), BM_loop_find_prev_nodouble(), BM_LOOPS_OF_VERT, TransCustomDataLayer::bm_origfaces, BM_vert_loop_groups_data_layer_create(), TransCustomDataMergeGroup::cd_loop_groups, BMVert::co, BMIter::count, CustomData_bmesh_copy_map_calc(), TransCustomDataLayer::customdatalayer_map, TransCustomDataLayer::customdatalayer_map_len, TransCustomDataLayer::data, BMLoop::f, is_zero_v3(), l, BMesh::ldata, TransCustomDataLayer::merge_group, mesh_customdatacorrect_face_substitute_set(), BMLoop::next, BMFace::no, TransCustomDataLayer::origfaces, TransCustomDataLayer::origverts, BMesh::pdata, TransCustomDataLayer::use_merge_group, BMLoop::v, and v.
Referenced by mesh_customdatacorrect_create_impl().
|
static |
Definition at line 706 of file transform_convert_mesh.cc.
References BLI_assert, BLI_ghashIterator_getKey(), BLI_ghashIterator_getValue(), bm, TransCustomDataLayer::bm, BM_elem_attrs_copy(), BM_FACE_FIRST_LOOP, TransCustomDataLayer::bm_origfaces, TransCustomDataMesh::cd_layer_correct, CustomData_bmesh_copy_map_calc(), FOREACH_TRANS_DATA_CONTAINER, GHASH_ITER, BMesh::ldata, BMFace::len, BMLoop::next, and TransCustomDataLayer::origfaces.
Referenced by recalcData_mesh().
|
static |
Definition at line 1736 of file transform_convert_mesh.cc.
References BKE_editmesh_from_object(), BLI_assert, BLI_assert_unreachable, BLI_BITMAP_ENABLE, BLI_BITMAP_NEW, BLI_BITMAP_TEST, BMEditMesh::bm, BM_elem_index_get, BM_mesh_elem_index_ensure(), BM_mesh_partial_create_from_verts(), BM_mesh_partial_create_from_verts_group_multi(), BM_mesh_partial_create_from_verts_group_single(), BM_mesh_partial_destroy(), BM_VERT, TransCustomData_PartialUpdate::cache, TransDataContainer::data, TransDataContainer::data_len, TransDataContainer::data_mirror, TransDataContainer::data_mirror_len, equals_v3v3(), TransData::factor, flag, TransInfo::flag, TransDataMirror::loc_src, MEM_callocN, MEM_freeN(), mesh_customdata_ensure(), TransDataContainer::obedit, offsetof, params, PARTIAL_NONE, PARTIAL_TYPE_ALL, PARTIAL_TYPE_GROUP, TransCustomDataMesh::partial_update, POINTER_OFFSET, TransCustomData_PartialUpdate::prop_size, TransInfo::prop_size, TransCustomData_PartialUpdate::prop_size_prev, T_PROP_EDIT, TD_MIRROR_EDGE_AXIS_SHIFT, TD_MIRROR_EDGE_X, TD_MIRROR_EDGE_Y, TD_MIRROR_EDGE_Z, TD_MIRROR_X, TD_MIRROR_Y, TD_MIRROR_Z, BMesh::totvert, TransDataContainer::use_mirror_axis_any, and v.
Referenced by mesh_partial_update().
|
static |
Definition at line 1920 of file transform_convert_mesh.cc.
References TransInfo::con, CON_APPLY, PartialTypeState::for_looptris, PartialTypeState::for_normals, TransCon::mode, TransInfo::mode, PARTIAL_NONE, PARTIAL_TYPE_ALL, PARTIAL_TYPE_GROUP, TFM_RESIZE, TFM_ROTATION, TFM_TRANSLATION, transform_snap_is_active(), transform_snap_project_individual_is_active(), usingSnappingNormal(), validSnappingNormal(), and TransInfo::values_final.
Referenced by recalcData_mesh().
|
static |
Definition at line 1978 of file transform_convert_mesh.cc.
References BKE_editmesh_from_object(), BKE_editmesh_looptris_and_normals_calc(), BKE_editmesh_looptris_calc_with_partial_ex(), BMEditMesh::bm, BM_mesh_normals_update_with_partial_ex(), PartialTypeState::for_looptris, PartialTypeState::for_normals, mesh_customdata_ensure(), mesh_partial_ensure(), TransDataContainer::obedit, params, PARTIAL_NONE, PARTIAL_TYPE_ALL, PARTIAL_TYPE_GROUP, TransCustomDataMesh::partial_update_state_prev, BMesh::totvert, and BMesh::totvertsel.
Referenced by recalcData_mesh().
|
static |
Definition at line 1426 of file transform_convert_mesh.cc.
References TransIslandData::center, and copy_v3_v3().
Referenced by createTransEditVerts(), and VertsToTransData().
|
static |
Definition at line 2038 of file transform_convert_mesh.cc.
References copy_v3_v3(), TransDataContainer::data, TransDataContainer::data_len, TransDataContainer::data_mirror, TransDataContainer::data_mirror_len, TransDataMirror::loc_src, TD_MIRROR_EDGE_X, TD_MIRROR_EDGE_Y, TD_MIRROR_EDGE_Z, TD_MIRROR_X, TD_MIRROR_Y, TD_MIRROR_Z, and TransDataContainer::use_mirror_axis_any.
Referenced by recalcData_mesh().
|
static |
Definition at line 2244 of file transform_convert_mesh.cc.
References BM_vert_is_boundary(), BM_vert_is_edge_pair(), and v.
Referenced by transform_mesh_edge_slide_data_create().
|
static |
If we're sliding the vert, return its original location, if not, the current location is good.
Definition at line 520 of file transform_convert_mesh.cc.
References BLI_ghash_lookup(), BMVert::co, TransCustomDataLayer::merge_group, TransCustomDataLayer::origverts, and v.
Referenced by mesh_customdatacorrect_apply_vert().
|
static |
Definition at line 2073 of file transform_convert_mesh.cc.
References DEG_id_tag_update(), TransInfo::flag, FOREACH_TRANS_DATA_CONTAINER, ID_RECALC_GEOMETRY, mesh_customdatacorrect_apply(), mesh_customdatacorrect_restore(), mesh_partial_types_calc(), mesh_partial_update(), mesh_transdata_mirror_apply(), TransInfo::state, T_NO_MIRROR, TRANS_CANCEL, transform_convert_clip_mirror_modifier_apply(), and transform_snap_project_individual_apply().
Definition at line 2112 of file transform_convert_mesh.cc.
References BKE_editmesh_from_object(), bm, BMEditMesh::bm, BM_elem_flag_enable, BM_ELEM_SELECT, BM_ELEM_TAG, BM_mesh_elem_hflag_disable_all(), BM_VERT, ToolSettings::doublimit, ED_mesh_mirror_spatial_table_end(), EDBM_automerge(), EDBM_automerge_and_split(), EDBM_selectmode_flush_ex(), ELEM, TransInfo::flag, FOREACH_TRANS_DATA_CONTAINER, mesh_customdatacorrect_apply(), TransInfo::mode, SCE_SELECT_EDGE, SCE_SELECT_FACE, TransInfo::scene, BMEditMesh::selectmode, TransInfo::state, T_AUTOMERGE, T_AUTOSPLIT, TFM_EDGE_SLIDE, TFM_VERT_SLIDE, Scene::toolsettings, BMesh::totfacesel, and TRANS_CANCEL.
| void transform_convert_mesh_connectivity_distance | ( | BMesh * | bm, |
| const float | mtx[3][3], | ||
| float * | dists, | ||
| int * | index ) |
| mtx | Measure distance in this space. |
| dists | Store the closest connected distance to selected vertices. |
| index | Optionally store the original index we're measuring the distance to (can be NULL). |
Definition at line 1024 of file transform_convert_mesh.cc.
References BLI_assert, BLI_LINKSTACK_DECLARE, BLI_LINKSTACK_FREE, BLI_LINKSTACK_INIT, BLI_LINKSTACK_POP, BLI_LINKSTACK_PUSH, BLI_LINKSTACK_SIZE, BLI_LINKSTACK_SWAP, bm, BM_edge_other_vert(), BM_EDGES_OF_MESH, BM_EDGES_OF_VERT, BM_elem_flag_disable, BM_elem_flag_enable, BM_elem_flag_set, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_elem_index_get, BM_elem_index_set, BM_ELEM_SELECT, BM_ELEM_TAG, BM_ELEM_TAG_ALT, BM_ITER_ELEM, BM_ITER_MESH, BM_iter_mesh_count_flag(), BM_ITER_MESH_INDEX, BM_LOOPS_OF_EDGE, BM_VERTS_OF_MESH, bmesh_test_dist_add(), bmesh_test_loose_edge(), e, ELEM, BMesh::elem_index_dirty, BMLoop::f, FLT_MAX, l, BMLoop::next, LinkNode::next, v, and v2.
Referenced by createTransEditVerts(), createTransMeshSkin(), and createTransMeshVertCData().
| void transform_convert_mesh_crazyspace_detect | ( | TransInfo * | t, |
| TransDataContainer * | tc, | ||
| BMEditMesh * | em, | ||
| TransMeshDataCrazySpace * | r_crazyspace_data ) |
Detect CrazySpace (Blender term). Vertices with space affected by quaternions are marked with BM_ELEM_TAG.
Definition at line 1334 of file transform_convert_mesh.cc.
References BKE_crazyspace_get_first_deform_matrices_editbmesh(), BKE_crazyspace_get_mapped_editverts(), BKE_crazyspace_set_quats_editmesh(), BKE_editmesh_from_object(), BKE_modifiers_get_cage_index(), BKE_modifiers_is_correctable_deformed(), BKE_scene_graph_evaluated_ensure(), BMEditMesh::bm, TransInfo::context, CTX_data_main(), TransMeshDataCrazySpace::defmats, DEG_get_evaluated_id(), TransInfo::depsgraph, TransInfo::flag, float, Object::id, Scene::id, MEM_mallocN, TransDataContainer::obedit, TransMeshDataCrazySpace::quats, TransInfo::scene, T_PROP_EDIT, T_PROP_EDIT_ALL, and BMesh::totvert.
Referenced by createTransEditVerts(), createTransMeshSkin(), and createTransMeshVertCData().
| void transform_convert_mesh_crazyspace_free | ( | TransMeshDataCrazySpace * | r_crazyspace_data | ) |
Definition at line 1413 of file transform_convert_mesh.cc.
References MEM_freeN(), and TransMeshDataCrazySpace::quats.
Referenced by createTransEditVerts(), createTransMeshSkin(), and createTransMeshVertCData().
| void transform_convert_mesh_crazyspace_transdata_set | ( | const float | mtx[3][3], |
| const float | smtx[3][3], | ||
| const float | defmat[3][3], | ||
| const float | quat[4], | ||
| TransData * | r_td ) |
Definition at line 1377 of file transform_convert_mesh.cc.
References copy_m3_m3(), invert_m3_m3(), TransData::mtx, mul_m3_m3m3(), mul_m3_series, quat_to_mat3(), and TransData::smtx.
Referenced by createTransEditVerts(), createTransMeshSkin(), and createTransMeshVertCData().
| void transform_convert_mesh_customdatacorrect_init | ( | TransInfo * | t | ) |
Definition at line 464 of file transform_convert_mesh.cc.
References TransCustomDataMesh::cd_layer_correct, ELEM, FOREACH_TRANS_DATA_CONTAINER, mesh_customdatacorrect_create(), mesh_customdatacorrect_free(), TransInfo::mode, TransInfo::settings, TFM_ALIGN, TFM_BEND, TFM_EDGE_SLIDE, TFM_PUSHPULL, TFM_RESIZE, TFM_ROTATION, TFM_SHEAR, TFM_SHRINKFATTEN, TFM_TOSPHERE, TFM_TRACKBALL, TFM_TRANSLATION, TFM_VERT_SLIDE, ToolSettings::uvcalc_flag, UVCALC_TRANSFORM_CORRECT, UVCALC_TRANSFORM_CORRECT_KEEP_CONNECTED, and UVCALC_TRANSFORM_CORRECT_SLIDE.
Referenced by transform_mode_init().
| void transform_convert_mesh_islanddata_free | ( | TransIslandData * | island_data | ) |
Definition at line 931 of file transform_convert_mesh.cc.
References TransIslandData::axismtx, TransIslandData::center, TransIslandData::island_vert_map, and MEM_freeN().
Referenced by createTransEditVerts(), createTransMeshSkin(), and createTransMeshVertCData().
| void transform_convert_mesh_islands_calc | ( | BMEditMesh * | em, |
| const bool | calc_single_islands, | ||
| const bool | calc_island_center, | ||
| const bool | calc_island_axismtx, | ||
| TransIslandData * | r_island_data ) |
Definition at line 744 of file transform_convert_mesh.cc.
References add_v3_v3(), axis_dominant_v3_to_m3(), BLI_assert, bm, BMEditMesh::bm, BM_EDGE, BM_editselection_center(), BM_editselection_normal(), BM_editselection_plane(), BM_elem_flag_test, BM_elem_index_get, BM_ELEM_SELECT, BM_FACE, BM_ITER_ELEM, BM_ITER_MESH_INDEX, BM_mesh_calc_edge_groups(), BM_mesh_calc_face_groups(), BM_mesh_elem_index_ensure(), BM_mesh_elem_table_ensure(), BM_VERT, BM_VERTS_OF_EDGE, BM_VERTS_OF_FACE, BM_VERTS_OF_MESH, BMVert::co, copy_v3_v3(), copy_vn_i(), createSpaceNormalTangent(), data, BMEditSelection::ele, BMesh::etable, BMesh::ftable, BMEditSelection::htype, int, invert_m3(), is_zero_v3(), itype, MEM_freeN(), MEM_mallocN, MEM_reallocN, mul_v3_v3fl(), BMVert::no, normalize_v3(), SCE_SELECT_EDGE, SCE_SELECT_VERTEX, BMEditMesh::selectmode, BMesh::totedgesel, BMesh::totfacesel, BMesh::totvert, unit_m3(), v, and zero_v3().
Referenced by createTransEditVerts(), createTransMeshSkin(), and createTransMeshVertCData().
| void transform_convert_mesh_mirrordata_calc | ( | BMEditMesh * | em, |
| const bool | use_select, | ||
| const bool | use_topology, | ||
| const bool | mirror_axis[3], | ||
| TransMirrorData * | r_mirror_data ) |
Definition at line 1203 of file transform_convert_mesh.cc.
References add_v3_v3(), bm, BMEditMesh::bm, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ELEM_SELECT, BM_ITER_MESH_INDEX, BM_VERTS_OF_MESH, BMVert::co, EDBM_verts_mirror_cache_begin_ex(), flag, MirrorDataVert::flag, MirrorDataVert::index, is_in_quadrant_v3(), MEM_callocN, MEM_freeN(), MEM_mallocN, MEM_SAFE_FREE, TransMirrorData::mirror_elem_len, TD_MIRROR_X, BMesh::totvert, TRANSFORM_MAXDIST_MIRROR, and TransMirrorData::vert_map.
Referenced by createTransEditVerts(), and createTransMeshSkin().
| void transform_convert_mesh_mirrordata_free | ( | TransMirrorData * | mirror_data | ) |
Definition at line 1321 of file transform_convert_mesh.cc.
References MEM_freeN(), and TransMirrorData::vert_map.
Referenced by createTransEditVerts(), and createTransMeshSkin().
| Array< TransDataEdgeSlideVert > transform_mesh_edge_slide_data_create | ( | const TransDataContainer * | tc, |
| int * | r_group_len ) |
We need at least 3 points to calculate the intersection of prev-curr and next-curr destinations. next_next is only required to identify the edge in next.e.
| | | | | prev.e | curr.e | next.e | prev.v -— curr.v -— next.v -— next_next.v
Find the best direction to slide among the ones already computed.
| curr_side_other | previous state of the #SlideTempDataMesh where the faces are linked to the previous edge. |
| l_src | the source corner in the edge to slide. |
| l_dst | the current destination corner. |
Definition at line 2306 of file transform_convert_mesh.cc.
References BKE_editmesh_from_object(), bm, BMEditMesh::bm, BM_edge_exists(), BM_edge_is_boundary(), BM_edge_is_manifold(), BM_EDGES_OF_MESH, BM_EDGES_OF_VERT, BM_elem_flag_test, BM_elem_index_get, BM_elem_index_set, BM_ELEM_SELECT, BM_ITER_ELEM, BM_iter_elem_count_flag(), BM_ITER_MESH, BM_LOOPS_OF_EDGE, BM_VERT, BM_VERTS_OF_MESH, BMVert::co, TransDataContainer::data, TransDataContainer::data_len, TransDataEdgeSlideVert::dir_side, blender::math::distance(), blender::math::dot(), BMLoop::e, e, ELEM, BMesh::elem_index_dirty, BMLoop::f, blender::Array< T, InlineBufferCapacity, Allocator >::index_range(), int, isect_face_dst(), isect_line_line_epsilon_v3(), l, TransDataEdgeSlideVert::loop_nr, mesh_vert_is_inner(), blender::math::midpoint(), BMLoop::next, next, blender::math::normalize(), TransDataContainer::obedit, BMLoop::prev, BMLoop::radial_next, TransDataEdgeSlideVert::td, TD_SELECTED, BMLoop::v, and v.
Referenced by createEdgeSlideVerts().
| Array< TransDataVertSlideVert > transform_mesh_vert_slide_data_create | ( | const TransDataContainer * | tc, |
| Vector< float3 > & | r_loc_dst_buffer ) |
Definition at line 2178 of file transform_convert_mesh.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Vector< T, InlineBufferCapacity, Allocator >::as_span(), BM_edge_other_vert(), BM_EDGES_OF_VERT, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ITER_ELEM, BMVert::co, TransDataVertSlideVert::co_link_curr, TransDataContainer::data, TransDataContainer::data_len, BMVert::e, e, blender::Vector< T, InlineBufferCapacity, Allocator >::reserve(), blender::Array< T, InlineBufferCapacity, Allocator >::size(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), size(), TransDataVertSlideVert::td, TD_SELECTED, and v.
|
static |
Definition at line 1440 of file transform_convert_mesh.cc.
References TransInfo::around, TransData::axismtx, TransIslandData::axismtx, BLI_assert, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ELEM_SELECT, BM_vert_calc_normal_ex(), BM_vert_calc_shell_factor_ex(), BMVert::co, copy_m3_m3(), copy_v3_v3(), createSpaceNormal(), TransData::ext, TransDataExtension::isize, mesh_transdata_center_copy(), TransInfo::mode, BMVert::no, SCE_SELECT_FACE, BMEditMesh::selectmode, TFM_SHRINKFATTEN, and V3D_AROUND_LOCAL_ORIGINS.
Referenced by createTransEditVerts().
| TransConvertTypeInfo TransConvertType_Mesh |
Definition at line 2651 of file transform_convert_mesh.cc.
Referenced by convert_type_get(), init_proportional_edit(), init_TransDataContainers(), snap_object_context_init(), transform_modal_item_poll(), transform_mode_init(), transform_mode_snap_source_init(), transformEvent(), and viewRedrawPost().