|
Blender V4.3
|
#include "BLI_listbase.h"#include "BLI_math_vector.h"#include "BKE_editmesh.hh"#include "DNA_image_types.h"#include "ED_uvedit.hh"Go to the source code of this file.
Classes | |
| struct | SharedUVLoopData |
Functions | |
UDIM packing helper functions | |
| bool | uv_coords_isect_udim (const Image *image, const int udim_grid[2], const float coords[2]) |
Calculate UV Islands | |
| static bool | bm_loop_uv_shared_edge_check (const BMLoop *l_a, const BMLoop *l_b, void *user_data) |
| static bool | uvedit_is_face_affected_for_calc_uv_islands (const Scene *scene, BMFace *efa, const bool only_selected_faces, const bool only_selected_uvs, const BMUVOffsets &uv_offsets) |
| 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 BMUVOffsets uv_offsets) |
Utilities for manipulating UV islands.
GEO_uv_parametrizer.hh, however the data structures there don't support arbitrary topology such as an edge with 3 or more faces using it. This API uses BMesh data structures and doesn't have limitations for manifold meshes. Definition in file uvedit_islands.cc.
|
static |
Definition at line 69 of file uvedit_islands.cc.
References BM_elem_flag_test, BM_ELEM_SEAM, BM_loop_uv_share_edge_check(), BMLoop::e, and l_b.
Referenced by bm_mesh_calc_uv_islands().
| 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, | ||
| BMUVOffsets | offsets ) |
Calculate islands and add them to island_list returning the number of items added.
Definition at line 110 of file uvedit_islands.cc.
References FaceIsland::aspect_y, BLI_addtail(), BLI_assert, bm, BM_EDGE, BM_elem_flag_set, BM_ELEM_TAG, BM_FACE, BM_face_at_index(), BM_FACES_OF_MESH, BM_ITER_MESH, bm_loop_uv_shared_edge_check(), BM_mesh_calc_face_groups(), BM_mesh_elem_table_ensure(), FaceIsland::faces, faces, FaceIsland::faces_len, int, MEM_callocN, MEM_freeN(), MEM_mallocN, FaceIsland::offsets, SharedUVLoopData::offsets, BMesh::totface, SharedUVLoopData::use_seams, BMUVOffsets::uv, and uvedit_is_face_affected_for_calc_uv_islands().
Referenced by uv_select_similar_island_exec(), and uvedit_pack_islands_multi().
Returns true if UV coordinates lie on a valid tile in UDIM grid or tiled image.
Definition at line 29 of file uvedit_islands.cc.
References floorf, IMA_SRC_TILED, is_zero_v2(), LISTBASE_FOREACH, tile, and tile_index.
Referenced by blender::geometry::UVPackIsland_Params::setUDIMOffsetFromSpaceImage(), and uvedit_pack_islands_multi().
|
static |
Returns true if efa is able to be affected by a packing operation, given various parameters.
Checks if it's (not) hidden, and optionally selected, and/or UV selected.
Will eventually be superseded by BM_uv_element_map_create().
Loosely based on uvedit_is_face_affected, but "bug-compatible" with previous code.
Definition at line 91 of file uvedit_islands.cc.
References BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ELEM_SELECT, and uvedit_face_select_test().
Referenced by bm_mesh_calc_uv_islands().