diff options
author | Chris Blackbourn <chrisbblend@gmail.com> | 2022-07-30 14:20:13 +0300 |
---|---|---|
committer | Chris Blackbourn <chrisbblend@gmail.com> | 2022-07-30 14:24:11 +0300 |
commit | a5814607289a7e01d4844ee5ef724e6388cf044e (patch) | |
tree | 32db74c27e02e493c20fba2e6d97c15ea56a747e /source/blender/editors/uvedit/uvedit_islands.c | |
parent | d31886b3fe3b939fb86079d5fb607e80103078da (diff) |
UV: Add options for uv select similar in island mode
In island selection mode, add new options for uv select similar:
* Area UV
* Area 3D
* Face (number of faces in island)
See also https://developer.blender.org/T47437
Differential Revision: https://developer.blender.org/D15553
Diffstat (limited to 'source/blender/editors/uvedit/uvedit_islands.c')
-rw-r--r-- | source/blender/editors/uvedit/uvedit_islands.c | 31 |
1 files changed, 8 insertions, 23 deletions
diff --git a/source/blender/editors/uvedit/uvedit_islands.c b/source/blender/editors/uvedit/uvedit_islands.c index 9a31fd6469d..2afc60a4b5c 100644 --- a/source/blender/editors/uvedit/uvedit_islands.c +++ b/source/blender/editors/uvedit/uvedit_islands.c @@ -309,23 +309,8 @@ static float uv_nearest_grid_tile_distance(const int udim_grid[2], /* -------------------------------------------------------------------- */ /** \name Calculate UV Islands - * - * \note Currently this is a private API/type, it could be made public. * \{ */ -struct FaceIsland { - struct FaceIsland *next, *prev; - BMFace **faces; - int faces_len; - rctf bounds_rect; - /** - * \note While this is duplicate information, - * it allows islands from multiple meshes to be stored in the same list. - */ - uint cd_loop_uv_offset; - float aspect_y; -}; - struct SharedUVLoopData { uint cd_loop_uv_offset; bool use_seams; @@ -347,14 +332,14 @@ static bool bm_loop_uv_shared_edge_check(const BMLoop *l_a, const BMLoop *l_b, v /** * Calculate islands and add them to \a island_list returning the number of items added. */ -static int bm_mesh_calc_uv_islands(const Scene *scene, - BMesh *bm, - ListBase *island_list, - const bool only_selected_faces, - const bool only_selected_uvs, - const bool use_seams, - const float aspect_y, - const uint cd_loop_uv_offset) +int bm_mesh_calc_uv_islands(const Scene *scene, + BMesh *bm, + ListBase *island_list, + const bool only_selected_faces, + const bool only_selected_uvs, + const bool use_seams, + const float aspect_y, + const uint cd_loop_uv_offset) { int island_added = 0; BM_mesh_elem_table_ensure(bm, BM_FACE); |