|
Blender V5.0
|
Go to the source code of this file.
Classes | |
| struct | BMUVSelectPickParams |
| struct | UVSelectValidateInfo_Sync |
| struct | UVSelectValidateInfo_Flush |
| struct | UVSelectValidateInfo_Contiguous |
| struct | UVSelectValidateInfo_FlushAndContiguous |
| struct | UVSelectValidateInfo |
Functions | |
UV Selection Functions (low level) | |
Selection checking functions. These should be used instead of checking BM_ELEM_SELECT_UV, so hidden geometry is never considered selected. | |
| bool | BM_face_uvselect_test (const BMFace *f) |
| bool | BM_loop_vert_uvselect_test (const BMLoop *l) |
| bool | BM_loop_edge_uvselect_test (const BMLoop *l) |
UV Selection Connectivity Checks | |
Regarding the hflag parameter: this is typically set to:
Each function asserts that a supported hflag is passed in. | |
| bool | BM_loop_vert_uvselect_check_other_loop_vert (BMLoop *l, char hflag, int cd_loop_uv_offset) |
| bool | BM_loop_vert_uvselect_check_other_loop_edge (BMLoop *l, char hflag, int cd_loop_uv_offset) |
| bool | BM_loop_vert_uvselect_check_other_edge (BMLoop *l, char hflag, int cd_loop_uv_offset) |
| bool | BM_loop_vert_uvselect_check_other_face (BMLoop *l, char hflag, int cd_loop_uv_offset) |
| bool | BM_loop_edge_uvselect_check_other_loop_edge (BMLoop *l, char hflag, int cd_loop_uv_offset) |
| bool | BM_loop_edge_uvselect_check_other_face (BMLoop *l, char hflag, int cd_loop_uv_offset) |
| bool | BM_face_uvselect_check_edges_all (BMFace *f) |
UV Selection Functions | |
| void | BM_face_uvselect_set_noflush (BMesh *bm, BMFace *f, bool select) |
| void | BM_face_uvselect_set (BMesh *bm, BMFace *f, bool select) |
| void | BM_loop_edge_uvselect_set_noflush (BMesh *bm, BMLoop *l, bool select) |
| void | BM_loop_edge_uvselect_set (BMesh *bm, BMLoop *l, bool select) |
| void | BM_loop_vert_uvselect_set_noflush (BMesh *bm, BMLoop *l, bool select) |
| bool | BM_mesh_uvselect_clear (BMesh *bm) |
UV Selection Functions (Shared) | |
| void | BM_loop_vert_uvselect_set_shared (BMesh *bm, BMLoop *l, bool select, int cd_loop_uv_offset) |
| void | BM_loop_edge_uvselect_set_shared (BMesh *bm, BMLoop *l, bool select, int cd_loop_uv_offset) |
| void | BM_face_uvselect_set_shared (BMesh *bm, BMFace *f, bool select, int cd_loop_uv_offset) |
| void | BM_mesh_uvselect_set_elem_shared (BMesh *bm, bool select, int cd_loop_uv_offset, blender::Span< BMLoop * > loop_verts, blender::Span< BMLoop * > loop_edges, blender::Span< BMFace * > faces) |
UV Selection Picking | |
| void | BM_vert_uvselect_set_pick (BMesh *bm, BMVert *v, bool select, const BMUVSelectPickParams ¶ms) |
| void | BM_edge_uvselect_set_pick (BMesh *bm, BMEdge *e, bool select, const BMUVSelectPickParams ¶ms) |
| void | BM_face_uvselect_set_pick (BMesh *bm, BMFace *f, bool select, const BMUVSelectPickParams ¶ms) |
| void | BM_mesh_uvselect_set_elem_from_mesh (BMesh *bm, bool select, const BMUVSelectPickParams ¶ms, blender::Span< BMVert * > verts, blender::Span< BMEdge * > edges, blender::Span< BMFace * > faces) |
| void | BM_mesh_uvselect_set_elem_from_mesh (BMesh *bm, bool select, const BMUVSelectPickParams ¶ms, const blender::VectorList< BMVert * > &verts, const blender::VectorList< BMEdge * > &edges, const blender::VectorList< BMFace * > &faces) |
UV Selection Flushing (Only Select/De-Select) | |
This means:
It's often useful to call BM_mesh_uvselect_flush_shared_only_select after using these non-UV-coordinate aware flushing functions. | |
| void | BM_mesh_uvselect_flush_from_loop_verts_only_select (BMesh *bm) |
| void | BM_mesh_uvselect_flush_from_loop_verts_only_deselect (BMesh *bm) |
| void | BM_mesh_uvselect_flush_from_loop_edges_only_select (BMesh *bm) |
| void | BM_mesh_uvselect_flush_from_loop_edges_only_deselect (BMesh *bm) |
| void | BM_mesh_uvselect_flush_from_faces_only_select (BMesh *bm) |
| void | BM_mesh_uvselect_flush_from_faces_only_deselect (BMesh *bm) |
| void | BM_mesh_uvselect_flush_shared_only_select (BMesh *bm, int cd_loop_uv_offset) |
| void | BM_mesh_uvselect_flush_shared_only_deselect (BMesh *bm, int cd_loop_uv_offset) |
UV Selection Flushing (Between Elements) | |
Regarding the flush_down argument. Primitive UV selection functions always flush down:
This means it's often only necessary to flush up after the selection has been changed. | |
| void | BM_mesh_uvselect_flush_from_loop_verts (BMesh *bm) |
| void | BM_mesh_uvselect_flush_from_loop_edges (BMesh *bm, bool flush_down) |
| void | BM_mesh_uvselect_flush_from_faces (BMesh *bm, bool flush_down) |
| void | BM_mesh_uvselect_flush_from_verts (BMesh *bm, bool select) |
UV Selection Flushing (Selection Mode Aware) | |
| void | BM_mesh_uvselect_mode_flush_ex (BMesh *bm, const short selectmode, bool flush_down) |
| void | BM_mesh_uvselect_mode_flush (BMesh *bm) |
| void | BM_mesh_uvselect_mode_flush_only_select (BMesh *bm) |
| void | BM_mesh_uvselect_mode_flush_update (BMesh *bm, short selectmode_old, short selectmode_new, int cd_loop_uv_offset) |
| void | BM_mesh_uvselect_flush_post_subdivide (BMesh *bm, int cd_loop_uv_offset) |
UV Selection Flushing (From/To Mesh) | |
| void | BM_mesh_uvselect_sync_from_mesh_sticky_location (BMesh *bm, int cd_loop_uv_offset) |
| void | BM_mesh_uvselect_sync_from_mesh_sticky_disabled (BMesh *bm) |
| void | BM_mesh_uvselect_sync_from_mesh_sticky_vert (BMesh *bm) |
| void | BM_mesh_uvselect_sync_to_mesh (BMesh *bm) |
UV Selection Validation | |
| bool | BM_mesh_uvselect_is_valid (BMesh *bm, int cd_loop_uv_offset, bool check_sync, bool check_flush, bool check_contiguous, UVSelectValidateInfo *info) |
The BM_uvselect_* API deals with synchronizing selection between UV's and selected vertices edges & faces, where a selected vertex in the 3D viewport may only have some of its UV vertices selected in the UV editor.
Supporting this involves flushing in both directions depending on the selection being edited.
Flushing Selection ("flush") When an element is selected or de-selected, the selection state of connected geometry may change too. So, de-selecting a vertex must de-select all faces that use that vertex.
The rules for flushing may depend on the selection mode. When de-selecting a face in vertex-select-mode, all its vertices & edges must also be de-selected. When de-selecting a face in face-select-mode, only vertices and edges no longer connected to any selected faces will be de-selected.
Since applying these rules while selecting individual elements is often impractical, it's common to adjust the selection, then flush based on the selection mode afterwards.
Unlike viewport selection there is no requirement for hidden elements not to be selected. Therefor, UV selection checks must check the underlying geometry is not hidden. In practice this means hidden faces must be assumed unselected, since UV's are part of the faces (there is no such thing as a hidden face-corner) and any hidden edge or vertex causes connected faces to be hidden.
Selection setting functions flush down (unless the _noflush(...) version is used), this means selecting a face also selects all verts & edges, selecting an edge selects its vertices.
However it's expected the selection is flushed, de-selecting a vertex or edge must de-select it's faces (flushing up). For this, there are various flushing functions, exactly what is needed depends on the selection operation performed and the selection mode.
There are also situations that shouldn't be allowed such as a single selected vertex in face select mode.
Properly handling the selection state is important for operators that adjust the UV selection. This typically involves the following steps:
For a valid state:
This is mostly true for edges/faces too, however there cases where the UV selection causes an edge/face to be selected in mesh space but not UV space.
See BM_mesh_uvselect_is_valid for details.
As already noted, tools should maintain the synchronized UV selection where possible. However when this information isn't needed it should be cleared aggressively (see BM_mesh_uvselect_clear), since it adds both computation & memory overhead.
For actions that overwrite the selection such as selecting or de-selecting all, it's safe to "clear" the data, other actions such as adding new geometry that replaces the selection can also safely "clear" the UV selection.
In practice users modeling in the 3D viewport are likely to clear the UV selection data since selecting the mesh without extending the selection is effectively a "De-select All". So the chances this data persists when it's not needed over many editing operations are low.
Definition in file bmesh_uvselect.hh.
| void BM_edge_uvselect_set_pick | ( | BMesh * | bm, |
| BMEdge * | e, | ||
| bool | select, | ||
| const BMUVSelectPickParams & | params ) |
Definition at line 864 of file bmesh_uvselect.cc.
References bm, bm_edge_uvselect_set_pick(), e, params, and select.
Referenced by BM_mesh_uvselect_set_elem_from_mesh(), and EDBM_select_pick().
| bool BM_face_uvselect_check_edges_all | ( | BMFace * | f | ) |
Definition at line 250 of file bmesh_uvselect.cc.
References BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ELEM_SELECT_UV_EDGE, BM_FACE_FIRST_LOOP, and BMLoop::next.
Referenced by bm_edge_uvselect_set_pick(), and bm_vert_uvselect_set_pick().
Set the UV selection flag for f & flush down to edges & vertices.
Definition at line 324 of file bmesh_uvselect.cc.
References bm, BM_FACE_FIRST_LOOP, BM_face_uvselect_set_noflush(), BM_loop_edge_uvselect_set_noflush(), BM_loop_vert_uvselect_set_noflush(), BMLoop::next, and select.
Referenced by bm_face_uvselect_set_pick(), BM_mesh_uvselect_flush_post_subdivide(), bpy_bmface_uv_select_set(), uv_select_invert(), uvedit_face_select_disable(), and uvedit_face_select_enable().
Set the UV selection flag for f without flushing down to edges & vertices.
Definition at line 309 of file bmesh_uvselect.cc.
References BLI_assert, bm, BM_elem_flag_set, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ELEM_SELECT_UV, select, and UNUSED_VARS_NDEBUG.
Referenced by bm_edge_uvselect_set_pick(), BM_face_uvselect_set(), bm_face_uvselect_set_pick(), BM_face_uvselect_set_shared(), BM_mesh_uvselect_flush_from_loop_edges(), BM_mesh_uvselect_flush_from_loop_edges_only_deselect(), BM_mesh_uvselect_flush_from_loop_edges_only_select(), BM_mesh_uvselect_flush_from_loop_verts(), BM_mesh_uvselect_flush_from_loop_verts_only_deselect(), BM_mesh_uvselect_flush_from_loop_verts_only_select(), BM_mesh_uvselect_set_elem_shared(), bm_vert_uvselect_set_pick(), uv_select_flush_from_tag_face(), uv_select_flush_from_tag_loop(), uv_select_invert(), and uvedit_face_select_shared_vert().
| void BM_face_uvselect_set_pick | ( | BMesh * | bm, |
| BMFace * | f, | ||
| bool | select, | ||
| const BMUVSelectPickParams & | params ) |
Definition at line 872 of file bmesh_uvselect.cc.
References bm, bm_face_uvselect_set_pick(), params, and select.
Referenced by BM_mesh_uvselect_set_elem_from_mesh(), and EDBM_select_pick().
Definition at line 408 of file bmesh_uvselect.cc.
References bm, BM_FACE_FIRST_LOOP, BM_face_uvselect_set_noflush(), BM_loop_edge_uvselect_set_shared(), BM_loop_vert_uvselect_set_shared(), BMLoop::next, and select.
Referenced by BM_mesh_uvselect_set_elem_shared(), and EDBM_mesh_reveal().
| bool BM_face_uvselect_test | ( | const BMFace * | f | ) |
Definition at line 55 of file bmesh_uvselect.cc.
References BM_elem_flag_test, BM_ELEM_HIDDEN, and BM_ELEM_SELECT_UV.
| bool BM_loop_edge_uvselect_check_other_face | ( | BMLoop * | l, |
| char | hflag, | ||
| int | cd_loop_uv_offset ) |
Definition at line 229 of file bmesh_uvselect.cc.
References BLI_assert, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ELEM_SELECT, BM_ELEM_SELECT_UV, BM_loop_uv_share_edge_check(), ELEM, BMLoop::f, l, and BMLoop::radial_next.
Referenced by bm_face_uvselect_set_pick(), bm_mesh_uvselect_check_flush_and_contiguous(), bm_mesh_uvselect_flush_from_mesh_sticky_location_for_face_mode(), bm_mesh_uvselect_mode_flush_down_deselect_only(), BM_mesh_uvselect_set_elem_shared(), and uvedit_face_select_shared_vert().
| bool BM_loop_edge_uvselect_check_other_loop_edge | ( | BMLoop * | l, |
| char | hflag, | ||
| int | cd_loop_uv_offset ) |
Definition at line 208 of file bmesh_uvselect.cc.
References BLI_assert, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ELEM_SELECT, BM_ELEM_SELECT_UV_EDGE, BM_ELEM_TAG, BM_loop_uv_share_edge_check(), ELEM, BMLoop::f, l, and BMLoop::radial_next.
Referenced by BM_mesh_uvselect_flush_post_subdivide(), BM_mesh_uvselect_flush_shared_only_deselect(), and BM_mesh_uvselect_flush_shared_only_select().
Set the UV selection flag for e & flush down to vertices.
Definition at line 301 of file bmesh_uvselect.cc.
References bm, BM_loop_edge_uvselect_set_noflush(), BM_loop_vert_uvselect_set_noflush(), l, and select.
Referenced by BM_mesh_uvselect_flush_from_loop_edges_only_select(), BM_mesh_uvselect_flush_post_subdivide(), bpy_bmloop_uv_select_edge_set(), edbm_rip_edge_invoke(), and uvedit_edge_select_enable().
Set the UV selection flag for e without flushing down to vertices.
Definition at line 286 of file bmesh_uvselect.cc.
References BLI_assert, bm, BM_elem_flag_set, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ELEM_SELECT_UV_EDGE, l, select, and UNUSED_VARS_NDEBUG.
Referenced by bm_edge_uvselect_set_pick(), BM_face_uvselect_set(), bm_face_uvselect_set_pick(), BM_loop_edge_uvselect_set(), BM_loop_edge_uvselect_set_shared(), BM_mesh_uvselect_flush_from_faces(), BM_mesh_uvselect_flush_from_faces_only_deselect(), BM_mesh_uvselect_flush_from_faces_only_select(), BM_mesh_uvselect_flush_from_loop_edges_only_deselect(), BM_mesh_uvselect_flush_from_loop_verts(), BM_mesh_uvselect_flush_from_loop_verts_only_deselect(), BM_mesh_uvselect_flush_from_loop_verts_only_select(), BM_mesh_uvselect_flush_shared_only_deselect(), BM_mesh_uvselect_flush_shared_only_select(), bm_vert_uvselect_set_pick(), uv_select_invert(), uvedit_edge_select_disable(), uvedit_edge_select_set_noflush(), and uvedit_face_select_shared_vert().
| void BM_loop_edge_uvselect_set_shared | ( | BMesh * | bm, |
| BMLoop * | l, | ||
| bool | select, | ||
| int | cd_loop_uv_offset ) |
Definition at line 385 of file bmesh_uvselect.cc.
References bm, BM_elem_flag_test, BM_elem_flag_test_bool, BM_ELEM_HIDDEN, BM_ELEM_SELECT_UV_EDGE, BM_loop_edge_uvselect_set_noflush(), BM_loop_uv_share_edge_check(), BMLoop::f, l, BMLoop::radial_next, and select.
Referenced by bm_face_uvselect_set_pick(), BM_face_uvselect_set_shared(), BM_mesh_uvselect_set_elem_shared(), EDBM_mesh_reveal(), and uvedit_face_select_shared_vert().
| bool BM_loop_edge_uvselect_test | ( | const BMLoop * | l | ) |
Definition at line 49 of file bmesh_uvselect.cc.
References BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ELEM_SELECT_UV_EDGE, and l.
Referenced by ED_uvedit_active_vert_loop_get().
| bool BM_loop_vert_uvselect_check_other_edge | ( | BMLoop * | l, |
| char | hflag, | ||
| int | cd_loop_uv_offset ) |
Definition at line 135 of file bmesh_uvselect.cc.
References BLI_assert, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ELEM_SELECT, BM_ELEM_TAG, BM_loop_uv_share_vert_check(), bmesh_disk_edge_next(), BMLoop::e, ELEM, BMLoop::f, BMEdge::l, l, BMLoop::prev, BMLoop::radial_next, BMLoop::v, and v.
Referenced by bm_mesh_uvselect_flush_from_mesh_sticky_location_for_edge_mode().
| bool BM_loop_vert_uvselect_check_other_face | ( | BMLoop * | l, |
| char | hflag, | ||
| int | cd_loop_uv_offset ) |
Definition at line 174 of file bmesh_uvselect.cc.
References BLI_assert, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ELEM_SELECT, BM_ELEM_SELECT_UV, BM_ELEM_TAG, BM_loop_uv_share_vert_check(), bmesh_disk_edge_next(), ELEM, BMLoop::f, BMEdge::l, l, BMLoop::radial_next, BMLoop::v, and v.
Referenced by bm_face_uvselect_set_pick(), bm_mesh_uvselect_check_flush_and_contiguous(), bm_mesh_uvselect_flush_from_mesh_sticky_location_for_face_mode(), bm_mesh_uvselect_mode_flush_down_deselect_only(), and uvedit_face_select_shared_vert().
| bool BM_loop_vert_uvselect_check_other_loop_edge | ( | BMLoop * | l, |
| char | hflag, | ||
| int | cd_loop_uv_offset ) |
Definition at line 100 of file bmesh_uvselect.cc.
References BLI_assert, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ELEM_SELECT_UV_EDGE, BM_ELEM_TAG, BM_loop_uv_share_vert_check(), bmesh_disk_edge_next(), ELEM, BMLoop::f, BMEdge::l, l, BMLoop::prev, BMLoop::radial_next, BMLoop::v, and v.
Referenced by bm_edge_uvselect_set_pick(), bm_mesh_uvselect_check_flush_and_contiguous(), bm_mesh_uvselect_mode_flush_down_deselect_only(), and BM_mesh_uvselect_set_elem_shared().
| bool BM_loop_vert_uvselect_check_other_loop_vert | ( | BMLoop * | l, |
| char | hflag, | ||
| int | cd_loop_uv_offset ) |
Definition at line 66 of file bmesh_uvselect.cc.
References BLI_assert, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ELEM_SELECT_UV, BM_ELEM_TAG, BM_loop_uv_share_vert_check(), bmesh_disk_edge_next(), ELEM, BMLoop::f, BMEdge::l, l, BMLoop::radial_next, BMLoop::v, and v.
Referenced by BM_mesh_uvselect_flush_post_subdivide(), BM_mesh_uvselect_flush_shared_only_deselect(), and BM_mesh_uvselect_flush_shared_only_select().
Set the UV selection flag for v without flushing down. since there is nothing to flush down to.
Definition at line 271 of file bmesh_uvselect.cc.
References BLI_assert, bm, BM_elem_flag_set, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ELEM_SELECT_UV, l, select, and UNUSED_VARS_NDEBUG.
Referenced by bm_edge_uvselect_set_pick(), BM_face_uvselect_set(), bm_face_uvselect_set_pick(), BM_loop_edge_uvselect_set(), BM_loop_vert_uvselect_set_shared(), BM_mesh_uvselect_flush_from_faces(), BM_mesh_uvselect_flush_from_faces_only_deselect(), BM_mesh_uvselect_flush_from_faces_only_select(), BM_mesh_uvselect_flush_from_loop_edges(), BM_mesh_uvselect_flush_from_loop_edges_only_deselect(), BM_mesh_uvselect_flush_post_subdivide(), BM_mesh_uvselect_flush_shared_only_deselect(), BM_mesh_uvselect_flush_shared_only_select(), bm_vert_uvselect_set_pick(), bpy_bmloop_uv_select_vert_set(), uv_select_invert(), uvedit_edge_select_disable(), uvedit_face_select_shared_vert(), uvedit_uv_select_disable(), and uvedit_uv_select_enable().
| void BM_loop_vert_uvselect_set_shared | ( | BMesh * | bm, |
| BMLoop * | l, | ||
| bool | select, | ||
| int | cd_loop_uv_offset ) |
Definition at line 350 of file bmesh_uvselect.cc.
References BLI_assert, bm, BM_elem_flag_test, BM_elem_flag_test_bool, BM_ELEM_HIDDEN, BM_ELEM_SELECT_UV, BM_loop_uv_share_vert_check(), BM_loop_vert_uvselect_set_noflush(), bmesh_disk_edge_next(), BMLoop::f, BMEdge::l, l, BMLoop::radial_next, select, BMLoop::v, and v.
Referenced by bm_edge_uvselect_set_pick(), bm_face_uvselect_set_pick(), BM_face_uvselect_set_shared(), BM_mesh_uvselect_set_elem_shared(), EDBM_mesh_reveal(), uv_select_invert(), and uvedit_face_select_shared_vert().
| bool BM_loop_vert_uvselect_test | ( | const BMLoop * | l | ) |
Definition at line 45 of file bmesh_uvselect.cc.
References BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ELEM_SELECT_UV, and l.
| bool BM_mesh_uvselect_clear | ( | BMesh * | bm | ) |
Call this function when selecting mesh elements in the viewport and the relationship with UV's is lost.
This has two purposes:
Maintaining the UV selection isn't supported: Some selection operations don't support maintaining a valid UV selection, in that case it's necessary to clear the UV selection otherwise tools may seem to be broken if they aren't operating on the selection properly.
NOTE(@ideasman42): It's worth noting that in this case clearing the selection is "lossy", users may wish that all selection operations would handle UV selection data too. Supporting additional operations is always possible, at the time of writing it's impractical to do so, see: #131642 design task for details.
Internally this marks the UV selection data as invalid, using the mesh selection as the "source-of-truth".
Definition at line 335 of file bmesh_uvselect.cc.
References bm.
Referenced by EDBM_uvselect_clear(), uv_select_sync_update(), and uvedit_select_prepare_custom_data().
| void BM_mesh_uvselect_flush_from_faces | ( | BMesh * | bm, |
| bool | flush_down ) |
Mode independent UV selection/de-selection flush from UV faces.
Flush from faces down to edges & vertices (when flush_down is true).
Definition at line 1352 of file bmesh_uvselect.cc.
References bm, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ELEM_SELECT_UV, BM_FACE_FIRST_LOOP, BM_FACES_OF_MESH, BM_ITER_MESH, BM_loop_edge_uvselect_set_noflush(), BM_loop_vert_uvselect_set_noflush(), and BMLoop::next.
Referenced by BM_mesh_uvselect_mode_flush_ex().
| void BM_mesh_uvselect_flush_from_faces_only_deselect | ( | BMesh * | bm | ) |
Definition at line 1192 of file bmesh_uvselect.cc.
References bm, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ELEM_SELECT_UV, BM_FACE_FIRST_LOOP, BM_FACES_OF_MESH, BM_ITER_MESH, BM_loop_edge_uvselect_set_noflush(), BM_loop_vert_uvselect_set_noflush(), and BMLoop::next.
Referenced by uv_select_linked_multi().
| void BM_mesh_uvselect_flush_from_faces_only_select | ( | BMesh * | bm | ) |
Definition at line 1171 of file bmesh_uvselect.cc.
References bm, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ELEM_SELECT_UV, BM_FACE_FIRST_LOOP, BM_FACES_OF_MESH, BM_ITER_MESH, BM_loop_edge_uvselect_set_noflush(), BM_loop_vert_uvselect_set_noflush(), and BMLoop::next.
Referenced by uv_select_linked_multi().
| void BM_mesh_uvselect_flush_from_loop_edges | ( | BMesh * | bm, |
| bool | flush_down ) |
Mode independent UV selection/de-selection flush from UV edges.
Flush from loop edges up to faces and optionally down to vertices (when flush_down is true).
Definition at line 1305 of file bmesh_uvselect.cc.
References bm, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ELEM_SELECT_UV_EDGE, BM_FACE_FIRST_LOOP, BM_face_uvselect_set_noflush(), BM_FACES_OF_MESH, BM_ITER_MESH, BM_loop_vert_uvselect_set_noflush(), and BMLoop::next.
Referenced by BM_mesh_uvselect_mode_flush_ex(), BM_mesh_uvselect_mode_flush_update(), and uv_select_flush_from_loop_edge_flag().
| void BM_mesh_uvselect_flush_from_loop_edges_only_deselect | ( | BMesh * | bm | ) |
Definition at line 1139 of file bmesh_uvselect.cc.
References bm, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ELEM_SELECT_UV_EDGE, BM_FACE_FIRST_LOOP, BM_face_uvselect_set_noflush(), BM_FACES_OF_MESH, BM_ITER_MESH, BM_loop_edge_uvselect_set_noflush(), BM_loop_vert_uvselect_set_noflush(), BMLoop::next, and BMLoop::prev.
| void BM_mesh_uvselect_flush_from_loop_edges_only_select | ( | BMesh * | bm | ) |
Definition at line 1113 of file bmesh_uvselect.cc.
References bm, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ELEM_SELECT_UV_EDGE, BM_FACE_FIRST_LOOP, BM_face_uvselect_set_noflush(), BM_FACES_OF_MESH, BM_ITER_MESH, BM_loop_edge_uvselect_set(), and BMLoop::next.
Referenced by BM_mesh_uvselect_mode_flush_only_select().
| void BM_mesh_uvselect_flush_from_loop_verts | ( | BMesh * | bm | ) |
Mode independent UV selection/de-selection flush from UV vertices.
| select | When true, flush the selection state to de-selected elements, otherwise perform the opposite, flushing de-selection. |
Definition at line 1281 of file bmesh_uvselect.cc.
References bm, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ELEM_SELECT_UV, BM_FACE_FIRST_LOOP, BM_face_uvselect_set_noflush(), BM_FACES_OF_MESH, BM_ITER_MESH, BM_loop_edge_uvselect_set_noflush(), BMLoop::next, and select.
Referenced by BM_mesh_uvselect_mode_flush_ex(), BM_mesh_uvselect_mode_flush_update(), and uv_rip_object().
| void BM_mesh_uvselect_flush_from_loop_verts_only_deselect | ( | BMesh * | bm | ) |
Definition at line 1084 of file bmesh_uvselect.cc.
References bm, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ELEM_SELECT_UV, BM_FACE_FIRST_LOOP, BM_face_uvselect_set_noflush(), BM_FACES_OF_MESH, BM_ITER_MESH, BM_loop_edge_uvselect_set_noflush(), and BMLoop::next.
Referenced by BM_mesh_uvselect_flush_from_verts(), and uv_select_more_less().
| void BM_mesh_uvselect_flush_from_loop_verts_only_select | ( | BMesh * | bm | ) |
Definition at line 1056 of file bmesh_uvselect.cc.
References bm, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ELEM_SELECT_UV, BM_FACE_FIRST_LOOP, BM_face_uvselect_set_noflush(), BM_FACES_OF_MESH, BM_ITER_MESH, BM_loop_edge_uvselect_set_noflush(), and BMLoop::next.
Referenced by BM_mesh_uvselect_flush_from_verts(), BM_mesh_uvselect_mode_flush_only_select(), uv_select_more_less(), uv_select_similar_edge_exec(), uv_select_similar_face_exec(), uv_select_similar_island_exec(), and uv_select_similar_vert_exec().
| void BM_mesh_uvselect_flush_from_verts | ( | BMesh * | bm, |
| bool | select ) |
Mode independent UV selection/de-selection flush from UV vertices.
Use this when it's know geometry was only selected/de-selected.
Definition at line 1375 of file bmesh_uvselect.cc.
References bm, BM_mesh_uvselect_flush_from_loop_verts_only_deselect(), BM_mesh_uvselect_flush_from_loop_verts_only_select(), and select.
Referenced by bpy_bmesh_uv_select_flush().
| void BM_mesh_uvselect_flush_post_subdivide | ( | BMesh * | bm, |
| int | cd_loop_uv_offset ) |
A specialized flushing that fills in selection information after subdividing.
It's important this runs:
Definition at line 1515 of file bmesh_uvselect.cc.
References bm, BM_edge_is_any_face_flag_test(), BM_EDGES_OF_MESH, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ELEM_SELECT, BM_ELEM_SELECT_UV, BM_ELEM_SELECT_UV_EDGE, BM_FACE_FIRST_LOOP, BM_face_uvselect_set(), BM_FACES_OF_MESH, BM_ITER_MESH, BM_loop_edge_uvselect_check_other_loop_edge(), BM_loop_edge_uvselect_set(), BM_loop_vert_uvselect_check_other_loop_vert(), BM_loop_vert_uvselect_set_noflush(), BM_mesh_uvselect_mode_flush_only_select(), e, BMLoop::next, BMLoop::radial_next, SCE_SELECT_EDGE, and SCE_SELECT_VERTEX.
Referenced by BM_mesh_esubdivide().
| void BM_mesh_uvselect_flush_shared_only_deselect | ( | BMesh * | bm, |
| int | cd_loop_uv_offset ) |
Definition at line 1244 of file bmesh_uvselect.cc.
References BLI_assert, bm, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ELEM_SELECT_UV, BM_ELEM_SELECT_UV_EDGE, BM_FACE_FIRST_LOOP, BM_FACES_OF_MESH, BM_ITER_MESH, BM_loop_edge_uvselect_check_other_loop_edge(), BM_loop_edge_uvselect_set_noflush(), BM_loop_vert_uvselect_check_other_loop_vert(), BM_loop_vert_uvselect_set_noflush(), and BMLoop::next.
Referenced by bpy_bmesh_uv_select_flush_shared().
| void BM_mesh_uvselect_flush_shared_only_select | ( | BMesh * | bm, |
| int | cd_loop_uv_offset ) |
A useful utility so simple selection operations can be performed on edges/faces, afterwards this can be used to select UV's that are connected. This avoids having to use more involved UV connectivity aware logic inline.
Definition at line 1213 of file bmesh_uvselect.cc.
References BLI_assert, bm, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ELEM_SELECT_UV, BM_ELEM_SELECT_UV_EDGE, BM_FACE_FIRST_LOOP, BM_FACES_OF_MESH, BM_ITER_MESH, BM_loop_edge_uvselect_check_other_loop_edge(), BM_loop_edge_uvselect_set_noflush(), BM_loop_vert_uvselect_check_other_loop_vert(), BM_loop_vert_uvselect_set_noflush(), and BMLoop::next.
Referenced by bpy_bmesh_uv_select_flush_shared(), ED_uvedit_select_sync_flush(), and uv_select_invert().
| bool BM_mesh_uvselect_is_valid | ( | BMesh * | bm, |
| int | cd_loop_uv_offset, | ||
| bool | check_sync, | ||
| bool | check_flush, | ||
| bool | check_contiguous, | ||
| UVSelectValidateInfo * | info ) |
Check the UV selection is valid, mainly for debugging & testing purposes.
The primary check which should remain valid is: check_sync, if there is ever a selected vertex without any selected UV's or a selected UV without it's vertex being selected (and similar kinds of issues), then the selection is out-of-sync, which Blender should never allow.
While an invalid selection should not crash, tools that operate on selection may behave unpredictably.
The other checks may be desired or not although this depends more on the situation.
| cd_loop_uv_offset | The UV custom-data layer to check. Ignored when -1 (UV checks wont be used). |
| check_sync | When true, check the selection is synchronized between the UV and mesh selection. This should practically always be true, as it doesn't make sense to check the UV selection if valid otherwise, unless the UV selection is being set and has not yet been synchronized. |
| check_flush | When true, check the selection is flushed based on BMesh::selectmode. |
| check_contiguous | When true, check that UV selection is contiguous. Note that this is not considered an error since users may cause this to happen and tools are expected to work properly, however some operations are expected to maintain a contiguous selection. This check is included to ensure those operations are working. |
Definition at line 2463 of file bmesh_uvselect.cc.
References BLI_assert, bm, bm_mesh_uvselect_check_contiguous(), bm_mesh_uvselect_check_flush(), bm_mesh_uvselect_check_flush_and_contiguous(), bm_mesh_uvselect_check_viewport_sync(), UVSelectValidateInfo::contiguous, UVSelectValidateInfo::flush, UVSelectValidateInfo::flush_contiguous, and UVSelectValidateInfo::sync.
Referenced by bpy_bm_utils_uv_select_check(), and undomesh_from_editmesh().
| void BM_mesh_uvselect_mode_flush | ( | BMesh * | bm | ) |
Definition at line 1404 of file bmesh_uvselect.cc.
References bm, and BM_mesh_uvselect_mode_flush_ex().
Referenced by ED_uvedit_select_sync_flush(), EDBM_mesh_reveal(), uv_mouse_select_multi(), and uv_select_invert().
| void BM_mesh_uvselect_mode_flush_ex | ( | BMesh * | bm, |
| const short | selectmode, | ||
| bool | flush_down ) |
| flush_down | See BMSelectFlushFlag::Down for notes on flushing down. |
Definition at line 1391 of file bmesh_uvselect.cc.
References bm, BM_mesh_uvselect_flush_from_faces(), BM_mesh_uvselect_flush_from_loop_edges(), BM_mesh_uvselect_flush_from_loop_verts(), SCE_SELECT_EDGE, and SCE_SELECT_VERTEX.
Referenced by BM_mesh_uvselect_mode_flush(), and bpy_bmesh_uv_select_flush_mode().
| void BM_mesh_uvselect_mode_flush_only_select | ( | BMesh * | bm | ) |
Select elements based on the selection mode. (flushes the selection up based on the mode).
Definition at line 1409 of file bmesh_uvselect.cc.
References bm, BM_mesh_uvselect_flush_from_loop_edges_only_select(), BM_mesh_uvselect_flush_from_loop_verts_only_select(), SCE_SELECT_EDGE, and SCE_SELECT_VERTEX.
Referenced by BM_mesh_uvselect_flush_post_subdivide().
| void BM_mesh_uvselect_mode_flush_update | ( | BMesh * | bm, |
| short | selectmode_old, | ||
| short | selectmode_new, | ||
| int | cd_loop_uv_offset ) |
When the select mode changes, update to ensure the selection is valid. So single vertices aren't selected in edge-select mode for example.
The mesh selection flushing must have already run.
Definition at line 1422 of file bmesh_uvselect.cc.
References bm, BM_elem_flag_disable, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ELEM_SELECT, BM_ELEM_SELECT_UV, BM_ELEM_SELECT_UV_EDGE, BM_FACE_FIRST_LOOP, BM_FACES_OF_MESH, BM_ITER_MESH, BM_mesh_uvselect_flush_from_loop_edges(), BM_mesh_uvselect_flush_from_loop_verts(), bm_mesh_uvselect_mode_flush_down_deselect_only(), BMLoop::e, highest_order_bit_s(), BMLoop::next, SCE_SELECT_EDGE, SCE_SELECT_VERTEX, shared, and BMLoop::v.
Referenced by EDBM_selectmode_set(), and uv_select_sync_update().
| void BM_mesh_uvselect_set_elem_from_mesh | ( | BMesh * | bm, |
| bool | select, | ||
| const BMUVSelectPickParams & | params, | ||
| blender::Span< BMVert * > | verts, | ||
| blender::Span< BMEdge * > | edges, | ||
| blender::Span< BMFace * > | faces ) |
Select/deselect elements in the viewport, then integrate the selection with the UV selection, without clearing an re-initializing the synchronized state. (likely to re-select islands bounds from a user-perspective).
Definition at line 1026 of file bmesh_uvselect.cc.
References bm, BM_edge_uvselect_set_pick(), BM_face_uvselect_set_pick(), bm_mesh_uvselect_mode_flush_down_deselect_only(), BM_vert_uvselect_set_pick(), e, faces, blender::Span< T >::is_empty(), params, select, v, and verts.
| void BM_mesh_uvselect_set_elem_from_mesh | ( | BMesh * | bm, |
| bool | select, | ||
| const BMUVSelectPickParams & | params, | ||
| const blender::VectorList< BMVert * > & | verts, | ||
| const blender::VectorList< BMEdge * > & | edges, | ||
| const blender::VectorList< BMFace * > & | faces ) |
Definition at line 999 of file bmesh_uvselect.cc.
References bm, bm_edge_uvselect_set_pick(), bm_face_uvselect_set_pick(), bm_mesh_uvselect_mode_flush_down_deselect_only(), bm_vert_uvselect_set_pick(), e, faces, blender::VectorList< T, CapacityStart, CapacityMax >::is_empty(), params, select, v, and verts.
Referenced by blender::ed::uv::UVSyncSelectFromMesh::apply(), and bpy_bmesh_uv_select_foreach_set_from_mesh().
| void BM_mesh_uvselect_set_elem_shared | ( | BMesh * | bm, |
| bool | select, | ||
| int | cd_loop_uv_offset, | ||
| blender::Span< BMLoop * > | loop_verts, | ||
| blender::Span< BMLoop * > | loop_edges, | ||
| blender::Span< BMFace * > | faces ) |
| void BM_mesh_uvselect_sync_from_mesh_sticky_disabled | ( | BMesh * | bm | ) |
Definition at line 1793 of file bmesh_uvselect.cc.
References BLI_assert, bm, and bm_mesh_uvselect_flush_from_mesh_sticky_vert_for_vert_mode().
Referenced by bpy_bmesh_uv_select_sync_from_mesh(), and uvedit_sync_uvselect_flush_from_v3d().
| void BM_mesh_uvselect_sync_from_mesh_sticky_location | ( | BMesh * | bm, |
| int | cd_loop_uv_offset ) |
Definition at line 1778 of file bmesh_uvselect.cc.
References BLI_assert, bm, bm_mesh_uvselect_flush_from_mesh_sticky_location_for_edge_mode(), bm_mesh_uvselect_flush_from_mesh_sticky_location_for_face_mode(), bm_mesh_uvselect_flush_from_mesh_sticky_location_for_vert_mode(), SCE_SELECT_EDGE, and SCE_SELECT_VERTEX.
Referenced by bpy_bmesh_uv_select_sync_from_mesh(), and uvedit_sync_uvselect_flush_from_v3d().
| void BM_mesh_uvselect_sync_from_mesh_sticky_vert | ( | BMesh * | bm | ) |
Definition at line 1801 of file bmesh_uvselect.cc.
References BLI_assert, bm, bm_mesh_uvselect_flush_from_mesh_sticky_vert_for_edge_mode(), bm_mesh_uvselect_flush_from_mesh_sticky_vert_for_face_mode(), bm_mesh_uvselect_flush_from_mesh_sticky_vert_for_vert_mode(), SCE_SELECT_EDGE, and SCE_SELECT_VERTEX.
Referenced by bpy_bmesh_uv_select_sync_from_mesh(), and uvedit_sync_uvselect_flush_from_v3d().
| void BM_mesh_uvselect_sync_to_mesh | ( | BMesh * | bm | ) |
Synchronize selection: from the UV selection to the 3D viewport.
Definition at line 1815 of file bmesh_uvselect.cc.
References BLI_assert, bm, BM_EDGE, BM_edge_select_set(), BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ELEM_SELECT, BM_ELEM_SELECT_UV, BM_ELEM_SELECT_UV_EDGE, BM_FACE, BM_FACE_FIRST_LOOP, BM_face_select_set(), BM_face_select_set_noflush(), BM_FACES_OF_MESH, BM_ITER_MESH, BM_mesh_elem_hflag_disable_all(), BM_mesh_select_flush_from_verts(), BM_SELECT_HISTORY_BACKUP, BM_SELECT_HISTORY_RESTORE, BM_select_history_validate(), BM_VERT, BM_vert_select_set(), BMLoop::e, BMLoop::next, SCE_SELECT_EDGE, SCE_SELECT_VERTEX, and BMLoop::v.
Referenced by bpy_bmesh_uv_select_sync_to_mesh(), ED_uvedit_select_sync_flush(), uv_mouse_select_multi(), uv_select_invert(), uv_select_linked_multi(), uv_select_more_less(), uv_select_similar_edge_exec(), uv_select_similar_face_exec(), uv_select_similar_island_exec(), and uv_select_similar_vert_exec().
| void BM_vert_uvselect_set_pick | ( | BMesh * | bm, |
| BMVert * | v, | ||
| bool | select, | ||
| const BMUVSelectPickParams & | params ) |
Definition at line 856 of file bmesh_uvselect.cc.
References bm, bm_vert_uvselect_set_pick(), params, select, and v.
Referenced by BM_mesh_uvselect_set_elem_from_mesh(), and EDBM_select_pick().