Blender V5.0
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
144
145/* -------------------------------------------------------------------- */
152
153bool BM_face_uvselect_test(const BMFace *f);
156
158
159/* -------------------------------------------------------------------- */
170
171bool BM_loop_vert_uvselect_check_other_loop_vert(BMLoop *l, char hflag, int cd_loop_uv_offset);
172bool BM_loop_vert_uvselect_check_other_loop_edge(BMLoop *l, char hflag, int cd_loop_uv_offset);
173bool BM_loop_vert_uvselect_check_other_edge(BMLoop *l, char hflag, int cd_loop_uv_offset);
174bool BM_loop_vert_uvselect_check_other_face(BMLoop *l, char hflag, int cd_loop_uv_offset);
175bool BM_loop_edge_uvselect_check_other_loop_edge(BMLoop *l, char hflag, int cd_loop_uv_offset);
176bool BM_loop_edge_uvselect_check_other_face(BMLoop *l, char hflag, int cd_loop_uv_offset);
177
179
181
182/* -------------------------------------------------------------------- */
185
189void BM_face_uvselect_set(BMesh *bm, BMFace *f, bool select);
190
200
237
239
240/* -------------------------------------------------------------------- */
243
244void BM_loop_vert_uvselect_set_shared(BMesh *bm, BMLoop *l, bool select, int cd_loop_uv_offset);
245void BM_loop_edge_uvselect_set_shared(BMesh *bm, BMLoop *l, bool select, int cd_loop_uv_offset);
246void BM_face_uvselect_set_shared(BMesh *bm, BMFace *f, bool select, int cd_loop_uv_offset);
247
249 bool select,
250 int cd_loop_uv_offset,
251 blender::Span<BMLoop *> loop_verts,
252 blender::Span<BMLoop *> loop_edges,
254
256
257/* -------------------------------------------------------------------- */
260
278 bool shared = true;
279};
280
282 BMVert *v,
283 bool select,
286 BMEdge *e,
287 bool select,
290 BMFace *f,
291 bool select,
293
301 bool select,
308 bool select,
313
315
316/* -------------------------------------------------------------------- */
328
335
341void BM_mesh_uvselect_flush_shared_only_select(BMesh *bm, int cd_loop_uv_offset);
342void BM_mesh_uvselect_flush_shared_only_deselect(BMesh *bm, int cd_loop_uv_offset);
343
345
346/* -------------------------------------------------------------------- */
358
375void BM_mesh_uvselect_flush_from_loop_edges(BMesh *bm, bool flush_down);
383void BM_mesh_uvselect_flush_from_faces(BMesh *bm, bool flush_down);
384
393
395
396/* -------------------------------------------------------------------- */
399
403void BM_mesh_uvselect_mode_flush_ex(BMesh *bm, const short selectmode, bool flush_down);
405
417
425 short selectmode_old,
426 short selectmode_new,
427 int cd_loop_uv_offset);
428
439void BM_mesh_uvselect_flush_post_subdivide(BMesh *bm, int cd_loop_uv_offset);
440
442
443/* -------------------------------------------------------------------- */
446
447/* From 3D viewport to UV selection.
448 *
449 * These functions correspond to #ToolSettings::uv_sticky options. */
450
451void BM_mesh_uvselect_sync_from_mesh_sticky_location(BMesh *bm, int cd_loop_uv_offset);
454
461
463
464/* -------------------------------------------------------------------- */
467
488
510
524
538
546
574 int cd_loop_uv_offset,
575 bool check_sync,
576 bool check_flush,
577 bool check_contiguous,
579
BMesh * bm
ATTR_WARN_UNUSED_RESULT const BMLoop * l
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
ATTR_WARN_UNUSED_RESULT const BMVert * v
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_flush_from_faces_only_select(BMesh *bm)
void BM_mesh_uvselect_flush_shared_only_select(BMesh *bm, int cd_loop_uv_offset)
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)
bool BM_loop_vert_uvselect_check_other_loop_edge(BMLoop *l, char hflag, int cd_loop_uv_offset)
void BM_face_uvselect_set_pick(BMesh *bm, BMFace *f, bool select, const BMUVSelectPickParams &params)
bool BM_face_uvselect_check_edges_all(BMFace *f)
void BM_mesh_uvselect_mode_flush_ex(BMesh *bm, const short selectmode, bool flush_down)
void BM_mesh_uvselect_sync_from_mesh_sticky_vert(BMesh *bm)
bool BM_loop_vert_uvselect_check_other_loop_vert(BMLoop *l, char hflag, int cd_loop_uv_offset)
void BM_mesh_uvselect_flush_from_loop_edges_only_select(BMesh *bm)
void BM_mesh_uvselect_mode_flush(BMesh *bm)
bool BM_loop_edge_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)
void BM_face_uvselect_set_noflush(BMesh *bm, BMFace *f, bool select)
void BM_loop_vert_uvselect_set_shared(BMesh *bm, BMLoop *l, bool select, int cd_loop_uv_offset)
void BM_mesh_uvselect_flush_from_verts(BMesh *bm, bool select)
void BM_face_uvselect_set(BMesh *bm, BMFace *f, bool select)
void BM_face_uvselect_set_shared(BMesh *bm, BMFace *f, bool select, int cd_loop_uv_offset)
bool BM_loop_edge_uvselect_check_other_face(BMLoop *l, char hflag, int cd_loop_uv_offset)
void BM_mesh_uvselect_sync_from_mesh_sticky_disabled(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_sync_to_mesh(BMesh *bm)
void BM_mesh_uvselect_flush_post_subdivide(BMesh *bm, int cd_loop_uv_offset)
bool BM_loop_edge_uvselect_test(const BMLoop *l)
void BM_mesh_uvselect_flush_shared_only_deselect(BMesh *bm, int cd_loop_uv_offset)
void BM_mesh_uvselect_sync_from_mesh_sticky_location(BMesh *bm, int cd_loop_uv_offset)
void BM_loop_edge_uvselect_set_noflush(BMesh *bm, BMLoop *l, bool select)
bool BM_mesh_uvselect_is_valid(BMesh *bm, int cd_loop_uv_offset, bool check_sync, bool check_flush, bool check_contiguous, UVSelectValidateInfo *info)
bool BM_loop_vert_uvselect_check_other_face(BMLoop *l, char hflag, int cd_loop_uv_offset)
bool BM_face_uvselect_test(const BMFace *f)
void BM_mesh_uvselect_flush_from_faces_only_deselect(BMesh *bm)
void BM_mesh_uvselect_flush_from_loop_verts_only_select(BMesh *bm)
bool BM_mesh_uvselect_clear(BMesh *bm)
void BM_mesh_uvselect_flush_from_loop_edges_only_deselect(BMesh *bm)
void BM_mesh_uvselect_flush_from_loop_verts(BMesh *bm)
void BM_mesh_uvselect_flush_from_loop_verts_only_deselect(BMesh *bm)
bool BM_loop_vert_uvselect_test(const BMLoop *l)
void BM_loop_edge_uvselect_set(BMesh *bm, BMLoop *l, bool select)
void BM_mesh_uvselect_flush_from_loop_edges(BMesh *bm, bool flush_down)
void BM_loop_edge_uvselect_set_shared(BMesh *bm, BMLoop *l, bool select, int cd_loop_uv_offset)
void BM_edge_uvselect_set_pick(BMesh *bm, BMEdge *e, bool select, const BMUVSelectPickParams &params)
void BM_loop_vert_uvselect_set_noflush(BMesh *bm, BMLoop *l, bool select)
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_mode_flush_only_select(BMesh *bm)
static float verts[][3]
#define select(A, B, C)
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]
static char faces[256]
UVSelectValidateInfo_Flush flush
UVSelectValidateInfo_FlushAndContiguous flush_contiguous
UVSelectValidateInfo_Sync sync
UVSelectValidateInfo_Contiguous contiguous