Blender V5.3
bmesh_uvselect.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2025 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
7#include "bmesh_class.hh"
8
9#include "BLI_vector_list.hh"
10
11namespace blender {
12
146
147/* -------------------------------------------------------------------- */
154
155bool BM_face_uvselect_test(const BMFace *f);
158
160
161/* -------------------------------------------------------------------- */
172
173bool BM_loop_vert_uvselect_check_other_loop_vert(BMLoop *l, char hflag, int cd_loop_uv_offset);
174bool BM_loop_vert_uvselect_check_other_loop_edge(BMLoop *l, char hflag, int cd_loop_uv_offset);
175bool BM_loop_vert_uvselect_check_other_edge(BMLoop *l, char hflag, int cd_loop_uv_offset);
176bool BM_loop_vert_uvselect_check_other_face(BMLoop *l, char hflag, int cd_loop_uv_offset);
177bool BM_loop_edge_uvselect_check_other_loop_edge(BMLoop *l, char hflag, int cd_loop_uv_offset);
178bool BM_loop_edge_uvselect_check_other_face(BMLoop *l, char hflag, int cd_loop_uv_offset);
179
181
183
184/* -------------------------------------------------------------------- */
187
191void BM_face_uvselect_set(BMesh *bm, BMFace *f, bool select);
192
202
239
241
242/* -------------------------------------------------------------------- */
245
246void BM_loop_vert_uvselect_set_shared(BMesh *bm, BMLoop *l, bool select, int cd_loop_uv_offset);
247void BM_loop_edge_uvselect_set_shared(BMesh *bm, BMLoop *l, bool select, int cd_loop_uv_offset);
248void BM_face_uvselect_set_shared(BMesh *bm, BMFace *f, bool select, int cd_loop_uv_offset);
249
251 bool select,
252 int cd_loop_uv_offset,
253 Span<BMLoop *> loop_verts,
254 Span<BMLoop *> loop_edges,
255 Span<BMFace *> faces);
256
258
259/* -------------------------------------------------------------------- */
262
280 bool shared = true;
281};
282
284 BMVert *v,
285 bool select,
286 const BMUVSelectPickParams &params);
288 BMEdge *e,
289 bool select,
290 const BMUVSelectPickParams &params);
292 BMFace *f,
293 bool select,
294 const BMUVSelectPickParams &params);
295
303 bool select,
304 const BMUVSelectPickParams &params,
305 Span<BMVert *> verts,
306 Span<BMEdge *> edges,
307 Span<BMFace *> faces);
310 bool select,
311 const BMUVSelectPickParams &params,
312 const VectorList<BMVert *> &verts,
313 const VectorList<BMEdge *> &edges,
314 const VectorList<BMFace *> &faces);
315
317
318/* -------------------------------------------------------------------- */
330
337
343void BM_mesh_uvselect_flush_shared_only_select(BMesh *bm, int cd_loop_uv_offset);
344void BM_mesh_uvselect_flush_shared_only_deselect(BMesh *bm, int cd_loop_uv_offset);
345
347
348/* -------------------------------------------------------------------- */
360
374void BM_mesh_uvselect_flush_from_loop_edges(BMesh *bm, bool flush_down);
382void BM_mesh_uvselect_flush_from_faces(BMesh *bm, bool flush_down);
383
392
394
395/* -------------------------------------------------------------------- */
398
402void BM_mesh_uvselect_mode_flush_ex(BMesh *bm, const short selectmode, bool flush_down);
404
416
424 short selectmode_old,
425 short selectmode_new,
426 int cd_loop_uv_offset);
427
438void BM_mesh_uvselect_flush_post_subdivide(BMesh *bm, int cd_loop_uv_offset);
439
441
442/* -------------------------------------------------------------------- */
445
446/* From 3D viewport to UV selection.
447 *
448 * These functions correspond to #ToolSettings::uv_sticky options. */
449
450void BM_mesh_uvselect_sync_from_mesh_sticky_location(BMesh *bm, int cd_loop_uv_offset);
453
460
462
463/* -------------------------------------------------------------------- */
466
487
509
523
537
545
573 int cd_loop_uv_offset,
574 bool check_sync,
575 bool check_flush,
576 bool check_contiguous,
578
580
581} // namespace blender
BMesh Iterators.
bool BM_loop_edge_uvselect_test(const BMLoop *l)
bool BM_loop_vert_uvselect_check_other_edge(BMLoop *l, const char hflag, const int cd_loop_uv_offset)
void BM_edge_uvselect_set_pick(BMesh *bm, BMEdge *e, bool select, const BMUVSelectPickParams &params)
void BM_mesh_uvselect_mode_flush_ex(BMesh *bm, const short selectmode, const bool flush_down)
void BM_loop_edge_uvselect_set_shared(BMesh *bm, BMLoop *l, bool select, const int cd_loop_uv_offset)
bool BM_face_uvselect_test(const BMFace *f)
bool BM_loop_vert_uvselect_check_other_loop_vert(BMLoop *l, const char hflag, const int cd_loop_uv_offset)
bool BM_mesh_uvselect_clear(BMesh *bm)
void BM_loop_edge_uvselect_set_noflush(BMesh *bm, BMLoop *l, bool select)
bool BM_mesh_uvselect_is_valid(BMesh *bm, const int cd_loop_uv_offset, const bool check_sync, const bool check_flush, const bool check_contiguous, UVSelectValidateInfo *info_p)
ATTR_WARN_UNUSED_RESULT const BMLoop * l
void BM_mesh_uvselect_mode_flush_only_select(BMesh *bm)
void BM_mesh_uvselect_flush_from_loop_verts(BMesh *bm)
bool BM_loop_edge_uvselect_check_other_face(BMLoop *l, const char hflag, const int cd_loop_uv_offset)
ATTR_WARN_UNUSED_RESULT const BMVert * v
void BM_mesh_uvselect_set_elem_shared(BMesh *bm, bool select, const int cd_loop_uv_offset, const Span< BMLoop * > loop_verts, const Span< BMLoop * > loop_edges, const Span< BMFace * > faces)
void BM_mesh_uvselect_flush_from_faces_only_deselect(BMesh *bm)
void BM_face_uvselect_set_shared(BMesh *bm, BMFace *f, bool select, const int cd_loop_uv_offset)
void BM_mesh_uvselect_flush_from_faces(BMesh *bm, bool flush_down)
void BM_vert_uvselect_set_pick(BMesh *bm, BMVert *v, bool select, const BMUVSelectPickParams &params)
void BM_mesh_uvselect_flush_from_loop_verts_only_deselect(BMesh *bm)
bool BM_loop_vert_uvselect_check_other_face(BMLoop *l, const char hflag, const int cd_loop_uv_offset)
void BM_mesh_uvselect_mode_flush_update(BMesh *bm, const short selectmode_old, const short selectmode_new, const int cd_loop_uv_offset)
void BM_mesh_uvselect_flush_from_loop_edges_only_select(BMesh *bm)
bool BM_loop_vert_uvselect_check_other_loop_edge(BMLoop *l, const char hflag, const int cd_loop_uv_offset)
void BM_mesh_uvselect_sync_from_mesh_sticky_disabled(BMesh *bm)
void BM_loop_vert_uvselect_set_noflush(BMesh *bm, BMLoop *l, bool select)
void BM_mesh_uvselect_sync_from_mesh_sticky_location(BMesh *bm, const int cd_loop_uv_offset)
void BM_mesh_uvselect_flush_from_faces_only_select(BMesh *bm)
void BM_mesh_uvselect_flush_from_loop_edges(BMesh *bm, bool flush_down)
void BM_mesh_uvselect_flush_from_loop_verts_only_select(BMesh *bm)
void BM_face_uvselect_set_noflush(BMesh *bm, BMFace *f, bool select)
void BM_mesh_uvselect_flush_post_subdivide(BMesh *bm, const int cd_loop_uv_offset)
void BM_loop_vert_uvselect_set_shared(BMesh *bm, BMLoop *l, bool select, const int cd_loop_uv_offset)
void BM_face_uvselect_set_pick(BMesh *bm, BMFace *f, bool select, const BMUVSelectPickParams &params)
bool BM_loop_edge_uvselect_check_other_loop_edge(BMLoop *l, const char hflag, const int cd_loop_uv_offset)
bool BM_face_uvselect_check_edges_all(BMFace *f)
void BM_mesh_uvselect_mode_flush(BMesh *bm)
bool BM_loop_vert_uvselect_test(const BMLoop *l)
void BM_mesh_uvselect_flush_from_verts(BMesh *bm, const bool select)
void BM_mesh_uvselect_sync_from_mesh_sticky_vert(BMesh *bm)
void BM_mesh_uvselect_flush_from_loop_edges_only_deselect(BMesh *bm)
void BM_mesh_uvselect_set_elem_from_mesh(BMesh *bm, const bool select, const BMUVSelectPickParams &params, const VectorList< BMVert * > &verts, const VectorList< BMEdge * > &edges, const VectorList< BMFace * > &faces)
void BM_face_uvselect_set(BMesh *bm, BMFace *f, bool select)
void BM_loop_edge_uvselect_set(BMesh *bm, BMLoop *l, bool select)
void BM_mesh_uvselect_flush_shared_only_select(BMesh *bm, const int cd_loop_uv_offset)
void BM_mesh_uvselect_flush_shared_only_deselect(BMesh *bm, const int cd_loop_uv_offset)
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
void BM_mesh_uvselect_sync_to_mesh(BMesh *bm)
UVSelectValidateInfo_Contiguous contiguous
UVSelectValidateInfo_Sync sync
UVSelectValidateInfo_Flush flush
UVSelectValidateInfo_FlushAndContiguous flush_contiguous