|
Blender V4.3
|
#include "MEM_guardedalloc.h"#include "BLI_linklist_stack.h"#include "BLI_math_geom.h"#include "BLI_math_matrix.h"#include "BLI_math_vector.h"#include "BKE_context.hh"#include "BKE_customdata.hh"#include "BKE_editmesh.hh"#include "BKE_mesh_mapping.hh"#include "ED_image.hh"#include "ED_mesh.hh"#include "ED_uvedit.hh"#include "WM_api.hh"#include "transform.hh"#include "transform_convert.hh"Go to the source code of this file.
Classes | |
| struct | UVGroups |
Macros | |
| #define | TMP_LOOP_SELECT_TAG BM_ELEM_TAG_ALT |
Functions | |
UVs Transform Creation | |
| static void | UVsToTransData (const float aspect[2], float *uv, const float *center, const float calc_dist, const bool selected, BMLoop *l, TransData *r_td, TransData2D *r_td2d) |
| static void | uv_set_connectivity_distance (const ToolSettings *ts, BMesh *bm, float *dists, const float aspect[2]) |
| static void | createTransUVs (bContext *C, TransInfo *t) |
UVs Transform Flush | |
| static void | flushTransUVs (TransInfo *t) |
| static void | recalcData_uv (TransInfo *t) |
API for Vert and Edge Slide | |
| static UVGroups * | mesh_uv_groups_get (TransDataContainer *tc, BMesh *bm, const BMUVOffsets &offsets) |
API for Vert Slide | |
| Array< TransDataVertSlideVert > | transform_mesh_uv_vert_slide_data_create (const TransInfo *t, TransDataContainer *tc, Vector< float3 > &r_loc_dst_buffer) |
API for Edge Slide | |
| static bool | mesh_uv_group_is_inner (const TransDataContainer *tc, const BMUVOffsets &offsets, Span< int > group) |
| static bool | bm_loop_uv_calc_opposite_co (const BMLoop *l_tmp, const float2 &uv_tmp, const BMUVOffsets &offsets, const float2 &ray_direction, float2 &r_co) |
| static float2 | isect_face_dst (const BMLoop *l, const float2 &uv, const float2 &aspect, const BMUVOffsets &offsets) |
| Array< TransDataEdgeSlideVert > | transform_mesh_uv_edge_slide_data_create (const TransInfo *t, TransDataContainer *tc, int *r_group_len) |
Variables | |
| TransConvertTypeInfo | TransConvertType_MeshUV |
| #define TMP_LOOP_SELECT_TAG BM_ELEM_TAG_ALT |
Referenced by uv_set_connectivity_distance().
|
static |
Find the closest point on the ngon on the opposite side. used to set the edge slide distance for ngons.
Definition at line 759 of file transform_convert_mesh_uv.cc.
References BM_ELEM_CD_GET_FLOAT_P, blender::math::distance_squared(), FLT_MAX, isect_ray_seg_v2(), BMLoop::next, BMLoop::prev, and BMUVOffsets::uv.
Referenced by isect_face_dst().
Definition at line 247 of file transform_convert_mesh_uv.cc.
References add_v2_v2(), TransInfo::around, TransInfo::aspect, BKE_editmesh_from_object(), BMEditMesh::bm, BM_ELEM_CD_GET_FLOAT_P, BM_elem_flag_disable, BM_elem_flag_enable, BM_elem_flag_test, BM_elem_index_get, BM_ELEM_TAG, BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOPS_OF_FACE, BM_uv_element_get(), BM_uv_element_map_create(), BM_uv_element_map_free(), BM_uv_map_get_offsets(), count, CTX_wm_space_image(), CTX_wm_window(), ED_space_image_show_uvedit(), ED_uvedit_live_unwrap_begin(), SpaceImage::flag, TransInfo::flag, float, FLT_MAX, FOREACH_TRANS_DATA_CONTAINER, l, MEM_callocN, MEM_freeN(), MEM_SAFE_FREE, mul_v2_fl(), mul_v2_v2(), TransInfo::scene, TransInfo::settings, SI_CLIP_UV, SI_LIVE_UNWRAP, T_CLIP_UV, T_PROP_CONNECTED, T_PROP_EDIT, UvElementMap::total_islands, BMesh::totloop, BMUVOffsets::uv, uv_set_connectivity_distance(), uvedit_face_visible_test(), uvedit_uv_select_test(), UVsToTransData(), and V3D_AROUND_LOCAL_ORIGINS.
|
static |
Definition at line 415 of file transform_convert_mesh_uv.cc.
References TransInfo::area, TransInfo::aspect, ED_space_image_get_size(), ListBase::first, FOREACH_TRANS_DATA_CONTAINER, TransData2D::loc, TransData2D::loc2d, SpaceImage::pixel_round_mode, SI_PIXEL_ROUND_CENTER, SI_PIXEL_ROUND_CORNER, SI_PIXEL_ROUND_DISABLED, ScrArea::spacedata, TransInfo::state, and TRANS_CANCEL.
Referenced by recalcData_uv().
|
static |
Definition at line 796 of file transform_convert_mesh_uv.cc.
References BM_ELEM_CD_GET_FLOAT_P, bm_loop_uv_calc_opposite_co(), BMVert::co, BMLoop::f, l, BMFace::len, mid_v3_v3v3(), BMLoop::next, blender::math::orthogonal(), BMLoop::prev, BMUVOffsets::uv, and BMLoop::v.
Referenced by transform_mesh_uv_edge_slide_data_create().
|
static |
Definition at line 710 of file transform_convert_mesh_uv.cc.
References BM_ELEM_CD_GET_FLOAT_P, compare_v2v2(), TransDataContainer::data, l_b, BMLoop::next, BMLoop::prev, BMUVOffsets::uv, and BMLoop::v.
Referenced by transform_mesh_uv_edge_slide_data_create().
|
static |
Definition at line 614 of file transform_convert_mesh_uv.cc.
References bm, TransDataContainer::custom, TransCustomData::data, TransCustomData::free_cb, UVGroups::init(), and TransCustomDataContainer::type.
Referenced by transform_mesh_uv_edge_slide_data_create(), and transform_mesh_uv_vert_slide_data_create().
|
static |
Definition at line 463 of file transform_convert_mesh_uv.cc.
References TransInfo::area, DEG_id_tag_update(), ED_uvedit_live_unwrap_re_solve(), ListBase::first, SpaceImage::flag, flushTransUVs(), FOREACH_TRANS_DATA_CONTAINER, ID_RECALC_GEOMETRY, SI_LIVE_UNWRAP, and ScrArea::spacedata.
| Array< TransDataEdgeSlideVert > transform_mesh_uv_edge_slide_data_create | ( | const TransInfo * | t, |
| TransDataContainer * | tc, | ||
| int * | r_group_len ) |
We need at least 3 points to calculate the intersection of prev-curr and next-curr destinations.
| | | | | | prev -— curr -— next
Find the best direction to slide among the ones already computed.
| curr_prev | prev state of the #SlideTempDataUV 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 826 of file transform_convert_mesh_uv.cc.
References TransInfo::aspect, BKE_editmesh_from_object(), BLI_assert, bm, BMEditMesh::bm, BM_ELEM_CD_GET_FLOAT_P, BM_elem_index_get, BM_elem_index_set, BM_LOOP, BM_uv_map_get_offsets(), compare_v2v2(), TransDataContainer::data, TransDataContainer::data_len, blender::math::distance(), blender::math::dot(), ED_uvedit_select_mode_get(), ELEM, BMesh::elem_index_dirty, BMLoop::f, UVGroups::groups(), blender::Array< T, InlineBufferCapacity, Allocator >::index_range(), int, isect_face_dst(), ISECT_LINE_LINE_COLINEAR, isect_line_line_v2_point(), l, mesh_uv_group_is_inner(), mesh_uv_groups_get(), blender::math::midpoint(), BMLoop::next, next, blender::math::normalize(), TransDataContainer::obedit, BMLoop::prev, BMLoop::radial_next, TransInfo::scene, UVGroups::sd_array_create_and_init_edge(), UVGroups::sd_group_get(), TransInfo::settings, TransDataEdgeSlideVert::td, UVGroups::td_indices_get(), TD_SELECTED, BMUVOffsets::uv, UV_SELECT_EDGE, uvedit_edge_select_test_ex(), and BMLoop::v.
Referenced by createEdgeSlideVerts().
| Array< TransDataVertSlideVert > transform_mesh_uv_vert_slide_data_create | ( | const TransInfo * | t, |
| TransDataContainer * | tc, | ||
| Vector< float3 > & | r_loc_dst_buffer ) |
Definition at line 641 of file transform_convert_mesh_uv.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Vector< T, InlineBufferCapacity, Allocator >::as_span(), TransInfo::aspect, blender::Span< T >::begin(), BKE_editmesh_from_object(), bm, BMEditMesh::bm, BM_ELEM_CD_GET_FLOAT_P, BM_uv_map_get_offsets(), TransDataContainer::data, blender::Span< T >::end(), UVGroups::groups(), l, mesh_uv_groups_get(), BMLoop::next, TransDataContainer::obedit, POINTER_AS_INT, POINTER_FROM_INT, BMLoop::prev, blender::Vector< T, InlineBufferCapacity, Allocator >::reserve(), UVGroups::sd_array_create_and_init(), UVGroups::sd_group_get(), blender::Array< T, InlineBufferCapacity, Allocator >::size(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), UVGroups::td_indices_get(), and BMUVOffsets::uv.
|
static |
| dists | Store the closest connected distance to selected vertices. |
Definition at line 81 of file transform_convert_mesh_uv.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_ELEM_CD_GET_FLOAT_P, BM_elem_flag_disable, BM_elem_flag_enable, BM_elem_flag_test, BM_elem_flag_test_bool, BM_elem_index_get, BM_ELEM_TAG, BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOP, BM_LOOPS_OF_FACE, BM_LOOPS_OF_VERT, BM_mesh_elem_index_ensure(), BM_uv_map_get_offsets(), copy_v2_v2(), equals_v2v2(), BMLoop::f, FLT_MAX, l, len_v2(), MEM_dupallocN, MEM_freeN(), mul_v2_v2(), LinkNode::next, sub_v2_v2v2(), TMP_LOOP_SELECT_TAG, BMUVOffsets::uv, uvedit_uv_select_test_ex(), and BMLoop::v.
Referenced by createTransUVs().
|
static |
Definition at line 36 of file transform_convert_mesh_uv.cc.
References TransData::axismtx, copy_v2_v2(), copy_v3_v3(), TransData::dist, TransData::ext, l, TransData2D::loc, TransData2D::loc2d, TransData::mtx, TransData::smtx, TD_SELECTED, and unit_m3().
Referenced by createTransUVs().
| TransConvertTypeInfo TransConvertType_MeshUV |
Definition at line 1156 of file transform_convert_mesh_uv.cc.
Referenced by convert_type_get(), createEdgeSlideVerts(), createVertSlideVerts(), init_proportional_edit(), init_TransDataContainers(), and transform_modal_item_poll().