Blender  V3.3
Classes | Macros | Enumerations
uvedit_select.c File Reference
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "DNA_image_types.h"
#include "DNA_material_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_node_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_space_types.h"
#include "BLI_alloca.h"
#include "BLI_blenlib.h"
#include "BLI_hash.h"
#include "BLI_kdopbvh.h"
#include "BLI_kdtree.h"
#include "BLI_lasso_2d.h"
#include "BLI_math.h"
#include "BLI_polyfill_2d.h"
#include "BLI_utildefines.h"
#include "BKE_context.h"
#include "BKE_customdata.h"
#include "BKE_editmesh.h"
#include "BKE_layer.h"
#include "BKE_material.h"
#include "BKE_mesh.h"
#include "BKE_mesh_mapping.h"
#include "BKE_report.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_query.h"
#include "ED_image.h"
#include "ED_mesh.h"
#include "ED_screen.h"
#include "ED_select_utils.h"
#include "ED_uvedit.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_enum_types.h"
#include "WM_api.h"
#include "WM_types.h"
#include "UI_view2d.h"
#include "uvedit_intern.h"

Go to the source code of this file.

Classes

struct  UVOverlapData
 

Macros

#define SET_SELECTION(value)
 
#define NEIGHBORING_FACE_IS_SEL   1
 
#define CURR_FACE_IS_UNSEL   2
 

Enumerations

enum  eUVSelectSimilar {
  UV_SSIM_AREA_UV = 1000 , UV_SSIM_AREA_3D , UV_SSIM_LENGTH_UV , UV_SSIM_LENGTH_3D ,
  UV_SSIM_SIDES , UV_SSIM_PIN , UV_SSIM_MATERIAL
}
 

Functions

(De)Select All Operator
static void uv_select_all_perform (const Scene *scene, Object *obedit, int action)
 
static void uv_select_all_perform_multi_ex (const Scene *scene, Object **objects, const uint objects_len, int action, const Object *ob_exclude)
 
static void uv_select_all_perform_multi (const Scene *scene, Object **objects, const uint objects_len, int action)
 
bool uvedit_select_is_any_selected (const Scene *scene, Object *obedit)
 
bool uvedit_select_is_any_selected_multi (const Scene *scene, Object **objects, const uint objects_len)
 
static void uv_select_all (const Scene *scene, BMEditMesh *em, bool select_all)
 
static void uv_select_invert (const Scene *scene, BMEditMesh *em)
 
static int uv_select_all_exec (bContext *C, wmOperator *op)
 
void UV_OT_select_all (wmOperatorType *ot)
 
Select/Tag Flushing Utils

Utility functions to flush the uv-selection from tags.

static void uv_select_flush_from_tag_face (const Scene *scene, Object *obedit, const bool select)
 
static void uv_select_flush_from_tag_loop (const Scene *scene, Object *obedit, const bool select)
 
static void uv_select_flush_from_loop_edge_flag (const Scene *scene, BMEditMesh *em)
 
static void uv_select_flush_from_tag_sticky_loc_internal (const Scene *scene, BMEditMesh *em, UvVertMap *vmap, const uint efa_index, BMLoop *l, const bool select, const int cd_loop_uv_offset)
 
Select Split Operator
static void uv_select_tag_update_for_object (Depsgraph *depsgraph, const ToolSettings *ts, Object *obedit)
 
static int uv_select_split_exec (bContext *C, wmOperator *op)
 
void UV_OT_select_split (wmOperatorType *ot)
 
Active Selection Tracking

Currently we don't store loops in the selection history, store face/edge/vert combinations (needed for UV path selection).

void ED_uvedit_active_vert_loop_set (BMesh *bm, BMLoop *l)
 
BMLoopED_uvedit_active_vert_loop_get (BMesh *bm)
 
void ED_uvedit_active_edge_loop_set (BMesh *bm, BMLoop *l)
 
BMLoopED_uvedit_active_edge_loop_get (BMesh *bm)
 
Visibility and Selection Utilities
char ED_uvedit_select_mode_get (const Scene *scene)
 
void ED_uvedit_select_sync_flush (const ToolSettings *ts, BMEditMesh *em, const bool select)
 
static void uvedit_vertex_select_tagged (BMEditMesh *em, Scene *scene, bool select, int cd_loop_uv_offset)
 
bool uvedit_face_visible_test_ex (const ToolSettings *ts, BMFace *efa)
 
bool uvedit_face_visible_test (const Scene *scene, BMFace *efa)
 
bool uvedit_face_select_test_ex (const ToolSettings *ts, BMFace *efa, const int cd_loop_uv_offset)
 
bool uvedit_face_select_test (const Scene *scene, BMFace *efa, const int cd_loop_uv_offset)
 
void uvedit_face_select_set_with_sticky (const Scene *scene, BMEditMesh *em, BMFace *efa, const bool select, const bool do_history, const int cd_loop_uv_offset)
 
void uvedit_face_select_shared_vert (const Scene *scene, BMEditMesh *em, BMFace *efa, const bool select, const bool do_history, const int cd_loop_uv_offset)
 
void uvedit_face_select_set (const Scene *scene, BMEditMesh *em, BMFace *efa, const bool select, const bool do_history, const int cd_loop_uv_offset)
 
void uvedit_face_select_enable (const Scene *scene, BMEditMesh *em, BMFace *efa, const bool do_history, const int cd_loop_uv_offset)
 
void uvedit_face_select_disable (const Scene *scene, BMEditMesh *em, BMFace *efa, const int cd_loop_uv_offset)
 
bool uvedit_edge_select_test_ex (const ToolSettings *ts, BMLoop *l, const int cd_loop_uv_offset)
 
bool uvedit_edge_select_test (const Scene *scene, BMLoop *l, const int cd_loop_uv_offset)
 
void uvedit_edge_select_set_with_sticky (const Scene *scene, BMEditMesh *em, BMLoop *l, const bool select, const bool do_history, const uint cd_loop_uv_offset)
 
void uvedit_edge_select_shared_vert (const Scene *scene, BMEditMesh *em, BMLoop *l, const bool select, const int sticky_flag, const bool do_history, const int cd_loop_uv_offset)
 
void uvedit_edge_select_set_noflush (const Scene *scene, BMLoop *l, const bool select, const int sticky_flag, const int cd_loop_uv_offset)
 
void uvedit_edge_select_set (const Scene *scene, BMEditMesh *em, BMLoop *l, const bool select, const bool do_history, const int cd_loop_uv_offset)
 
void uvedit_edge_select_enable (const Scene *scene, BMEditMesh *em, BMLoop *l, const bool do_history, const int cd_loop_uv_offset)
 
void uvedit_edge_select_disable (const Scene *scene, BMEditMesh *em, BMLoop *l, const int cd_loop_uv_offset)
 
bool uvedit_uv_select_test_ex (const ToolSettings *ts, BMLoop *l, const int cd_loop_uv_offset)
 
bool uvedit_uv_select_test (const Scene *scene, BMLoop *l, const int cd_loop_uv_offset)
 
void uvedit_uv_select_set_with_sticky (const Scene *scene, BMEditMesh *em, BMLoop *l, const bool select, const bool do_history, const uint cd_loop_uv_offset)
 
void uvedit_uv_select_shared_vert (const Scene *scene, BMEditMesh *em, BMLoop *l, const bool select, const int sticky_flag, const bool do_history, const int cd_loop_uv_offset)
 
void uvedit_uv_select_set (const Scene *scene, BMEditMesh *em, BMLoop *l, const bool select, const bool do_history, const int cd_loop_uv_offset)
 
void uvedit_uv_select_enable (const Scene *scene, BMEditMesh *em, BMLoop *l, const bool do_history, const int cd_loop_uv_offset)
 
void uvedit_uv_select_disable (const Scene *scene, BMEditMesh *em, BMLoop *l, const int cd_loop_uv_offset)
 
static BMLoopuvedit_loop_find_other_radial_loop_with_visible_face (const Scene *scene, BMLoop *l_src, const int cd_loop_uv_offset)
 
static BMLoopuvedit_loop_find_other_boundary_loop_with_visible_face (const Scene *scene, BMLoop *l_edge, BMVert *v_pivot, const int cd_loop_uv_offset)
 
Find Nearest Elements
bool uv_find_nearest_edge (Scene *scene, Object *obedit, const float co[2], const float penalty, UvNearestHit *hit)
 
bool uv_find_nearest_edge_multi (Scene *scene, Object **objects, const uint objects_len, const float co[2], const float penalty, UvNearestHit *hit)
 
bool uv_find_nearest_face_ex (Scene *scene, Object *obedit, const float co[2], UvNearestHit *hit, const bool only_in_face)
 
bool uv_find_nearest_face (Scene *scene, Object *obedit, const float co[2], UvNearestHit *hit)
 
bool uv_find_nearest_face_multi_ex (Scene *scene, Object **objects, const uint objects_len, const float co[2], UvNearestHit *hit, const bool only_in_face)
 
bool uv_find_nearest_face_multi (Scene *scene, Object **objects, const uint objects_len, const float co[2], UvNearestHit *hit)
 
static bool uv_nearest_between (const BMLoop *l, const float co[2], const int cd_loop_uv_offset)
 
bool uv_find_nearest_vert (Scene *scene, Object *obedit, float const co[2], const float penalty_dist, UvNearestHit *hit)
 
bool uv_find_nearest_vert_multi (Scene *scene, Object **objects, const uint objects_len, float const co[2], const float penalty_dist, UvNearestHit *hit)
 
static bool uvedit_nearest_uv (const Scene *scene, Object *obedit, const float co[2], const float scale[2], const bool ignore_selected, float *dist_sq, float r_uv[2])
 
bool ED_uvedit_nearest_uv_multi (const View2D *v2d, const Scene *scene, Object **objects, const uint objects_len, const int mval[2], const bool ignore_selected, float *dist_sq, float r_uv[2])
 
Find Nearest to Element

These functions are quite specialized, useful when sync select is enabled and we want to pick an active UV vertex/edge from the active element which may have multiple UV's split out.

BMLoopuv_find_nearest_loop_from_vert (struct Scene *scene, struct Object *obedit, struct BMVert *v, const float co[2])
 
BMLoopuv_find_nearest_loop_from_edge (struct Scene *scene, struct Object *obedit, struct BMEdge *e, const float co[2])
 
Helper functions for UV selection.
bool uvedit_vert_is_edge_select_any_other (const Scene *scene, BMLoop *l, const int cd_loop_uv_offset)
 
bool uvedit_vert_is_face_select_any_other (const Scene *scene, BMLoop *l, const int cd_loop_uv_offset)
 
bool uvedit_vert_is_all_other_faces_selected (const Scene *scene, BMLoop *l, const int cd_loop_uv_offset)
 
static void bm_uv_flag_clear (const Scene *scene, BMesh *bm, const int flag, const int cd_loop_uv_offset)
 
UV Select-Mode Flushing
void ED_uvedit_selectmode_flush (const Scene *scene, BMEditMesh *em)
 
UV Flush selection (up/down)
void uvedit_select_flush (const Scene *scene, BMEditMesh *em)
 
void uvedit_deselect_flush (const Scene *scene, BMEditMesh *em)
 
Face Loop Select
static int uv_select_faceloop (Scene *scene, Object *obedit, UvNearestHit *hit, const bool extend)
 
Edge Ring Select
static int uv_select_edgering (Scene *scene, Object *obedit, UvNearestHit *hit, const bool extend)
 
Select Linked
static void uv_select_linked_multi (Scene *scene, Object **objects, const uint objects_len, UvNearestHit *hit, const bool extend, bool deselect, const bool toggle, const bool select_faces)
 
const floatuvedit_first_selected_uv_from_vertex (Scene *scene, BMVert *eve, const int cd_loop_uv_offset)
 
Select More/Less Operator
static int uv_select_more_less (bContext *C, const bool select)
 
static int uv_select_more_exec (bContext *C, wmOperator *UNUSED(op))
 
void UV_OT_select_more (wmOperatorType *ot)
 
static int uv_select_less_exec (bContext *C, wmOperator *UNUSED(op))
 
void UV_OT_select_less (wmOperatorType *ot)
 
Mouse Select Operator
static bool uv_mouse_select_multi (bContext *C, Object **objects, uint objects_len, const float co[2], const struct SelectPick_Params *params)
 
static bool uv_mouse_select (bContext *C, const float co[2], const struct SelectPick_Params *params)
 
static int uv_select_exec (bContext *C, wmOperator *op)
 
static int uv_select_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
void UV_OT_select (wmOperatorType *ot)
 
Edge Loop Select Operator
static int uv_select_loop_exec (bContext *C, wmOperator *op)
 
static int uv_select_loop_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
void UV_OT_select_loop (wmOperatorType *ot)
 
Edge Ring Select Operator
static int uv_select_edge_ring_exec (bContext *C, wmOperator *op)
 
static int uv_select_edge_ring_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
void UV_OT_select_edge_ring (wmOperatorType *ot)
 
Select Linked Operator
static int uv_select_linked_internal (bContext *C, wmOperator *op, const wmEvent *event, bool pick)
 
static int uv_select_linked_exec (bContext *C, wmOperator *op)
 
void UV_OT_select_linked (wmOperatorType *ot)
 
Select Linked (Cursor Pick) Operator
static int uv_select_linked_pick_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
static int uv_select_linked_pick_exec (bContext *C, wmOperator *op)
 
void UV_OT_select_linked_pick (wmOperatorType *ot)
 
Box Select Operator
static int uv_box_select_exec (bContext *C, wmOperator *op)
 
void UV_OT_select_box (wmOperatorType *ot)
 
Circle Select Operator
static int uv_circle_select_is_point_inside (const float uv[2], const float offset[2], const float ellipse[2])
 
static int uv_circle_select_is_edge_inside (const float uv_a[2], const float uv_b[2], const float offset[2], const float ellipse[2])
 
static int uv_circle_select_exec (bContext *C, wmOperator *op)
 
void UV_OT_select_circle (wmOperatorType *ot)
 
Lasso Select Operator
static bool do_lasso_select_mesh_uv_is_point_inside (const ARegion *region, const rcti *clip_rect, const int mcoords[][2], const int mcoords_len, const float co_test[2])
 
static bool do_lasso_select_mesh_uv_is_edge_inside (const ARegion *region, const rcti *clip_rect, const int mcoords[][2], const int mcoords_len, const float co_test_a[2], const float co_test_b[2])
 
static bool do_lasso_select_mesh_uv (bContext *C, const int mcoords[][2], const int mcoords_len, const eSelectOp sel_op)
 
static int uv_lasso_select_exec (bContext *C, wmOperator *op)
 
void UV_OT_select_lasso (wmOperatorType *ot)
 
Select Pinned UV's Operator
static int uv_select_pinned_exec (bContext *C, wmOperator *op)
 
void UV_OT_select_pinned (wmOperatorType *ot)
 
Select Overlap Operator
BLI_INLINE uint overlap_hash (const void *overlap_v)
 
BLI_INLINE bool overlap_cmp (const void *a_v, const void *b_v)
 
static bool overlap_tri_tri_uv_test (const float t1[3][2], const float t2[3][2], const float endpoint_bias)
 
static int uv_select_overlap (bContext *C, const bool extend)
 
static int uv_select_overlap_exec (bContext *C, wmOperator *op)
 
void UV_OT_select_overlap (wmOperatorType *ot)
 
Selected Elements as Arrays (Vertex, Edge & Faces)

These functions return single elements per connected vertex/edge. So an edge that has two connected edge loops only assigns one loop in the array.

BMFace ** ED_uvedit_selected_faces (const Scene *scene, BMesh *bm, int len_max, int *r_faces_len)
 
BMLoop ** ED_uvedit_selected_edges (const Scene *scene, BMesh *bm, int len_max, int *r_edges_len)
 
BMLoop ** ED_uvedit_selected_verts (const Scene *scene, BMesh *bm, int len_max, int *r_verts_len)
 
Select Mode UV Vert/Edge/Face/Island Operator
static void uv_isolate_selected_islands (const Scene *scene, BMEditMesh *em, const int cd_loop_uv_offset)
 
void ED_uvedit_selectmode_clean (const Scene *scene, Object *obedit)
 
void ED_uvedit_selectmode_clean_multi (bContext *C)
 
static int uv_select_mode_exec (bContext *C, wmOperator *op)
 
static int uv_select_mode_invoke (bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
 
void UV_OT_select_mode (wmOperatorType *ot)
 

Edge Loop Select

enum  eUVEdgeLoopBoundaryMode { UV_EDGE_LOOP_BOUNDARY_LOOP = 1 , UV_EDGE_LOOP_BOUNDARY_ALL = 2 }
 
static BMLoopbm_select_edgeloop_double_side_next (const Scene *scene, BMLoop *l_step, BMVert *v_from, const int cd_loop_uv_offset)
 
static BMLoopbm_select_edgeloop_single_side_next (const Scene *scene, BMLoop *l_step, BMVert *v_from, const int cd_loop_uv_offset)
 
static void bm_loop_tags_clear (BMesh *bm)
 
static void uv_select_edgeloop_double_side_tag (const Scene *scene, BMEditMesh *em, BMLoop *l_init_pair[2], const int cd_loop_uv_offset)
 
static void uv_select_edgeloop_single_side_tag (const Scene *scene, BMEditMesh *em, BMLoop *l_init, const int cd_loop_uv_offset, enum eUVEdgeLoopBoundaryMode boundary_mode, int r_count_by_select[2])
 
static int uv_select_edgeloop (Scene *scene, Object *obedit, UvNearestHit *hit, const bool extend)
 

Shared Edge Loop/Ring Select Operator Functions

enum  eUVLoopGenericType { UV_LOOP_SELECT = 1 , UV_RING_SELECT = 2 }
 
static int uv_mouse_select_loop_generic_multi (bContext *C, Object **objects, uint objects_len, const float co[2], const bool extend, enum eUVLoopGenericType loop_type)
 
static int uv_mouse_select_loop_generic (bContext *C, const float co[2], const bool extend, enum eUVLoopGenericType loop_type)
 

Select Similar Operator

static EnumPropertyItem prop_vert_similar_types [] = {{UV_SSIM_PIN, "PIN", 0, "Pinned", ""}, {0}}
 
static EnumPropertyItem prop_edge_similar_types []
 
static EnumPropertyItem prop_face_similar_types []
 
static EnumPropertyItem prop_similar_compare_types []
 
static float get_uv_vert_needle (const eUVSelectSimilar type, BMVert *vert, const float ob_m3[3][3], MLoopUV *luv, const int cd_loop_uv_offset)
 
static float get_uv_edge_needle (const eUVSelectSimilar type, BMEdge *edge, const float ob_m3[3][3], MLoopUV *luv_a, MLoopUV *luv_b, const int cd_loop_uv_offset)
 
static float get_uv_face_needle (const eUVSelectSimilar type, BMFace *face, const float ob_m3[3][3], const int cd_loop_uv_offset)
 
static int uv_select_similar_vert_exec (bContext *C, wmOperator *op)
 
static int uv_select_similar_edge_exec (bContext *C, wmOperator *op)
 
static int uv_select_similar_face_exec (bContext *C, wmOperator *op)
 
static int uv_select_similar_exec (bContext *C, wmOperator *op)
 
static const EnumPropertyItemuv_select_similar_type_itemf (bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *UNUSED(r_free))
 
void UV_OT_select_similar (wmOperatorType *ot)
 

Macro Definition Documentation

◆ CURR_FACE_IS_UNSEL

#define CURR_FACE_IS_UNSEL   2

◆ NEIGHBORING_FACE_IS_SEL

#define NEIGHBORING_FACE_IS_SEL   1

◆ SET_SELECTION

#define SET_SELECTION (   value)
Value:
if (select_faces) { \
BM_face_select_set(em->bm, efa, value); \
} \
else { \
uvedit_face_select_set(scene, em, efa, value, false, cd_loop_uv_offset); \
} \
(void)0
Scene scene
SyclQueue void void size_t num_bytes void

Enumeration Type Documentation

◆ eUVEdgeLoopBoundaryMode

Mode for selecting edge loops at boundaries.

Enumerator
UV_EDGE_LOOP_BOUNDARY_LOOP 

Delimit at face corners (don't walk over multiple edges in the same face).

UV_EDGE_LOOP_BOUNDARY_ALL 

Don't delimit, walk over the all connected boundary loops.

Definition at line 1390 of file uvedit_select.c.

◆ eUVLoopGenericType

Enumerator
UV_LOOP_SELECT 
UV_RING_SELECT 

Definition at line 2750 of file uvedit_select.c.

◆ eUVSelectSimilar

Enumerator
UV_SSIM_AREA_UV 
UV_SSIM_AREA_3D 
UV_SSIM_LENGTH_UV 
UV_SSIM_LENGTH_3D 
UV_SSIM_SIDES 
UV_SSIM_PIN 
UV_SSIM_MATERIAL 

Definition at line 81 of file uvedit_select.c.

Function Documentation

◆ bm_loop_tags_clear()

static void bm_loop_tags_clear ( BMesh bm)
static

◆ bm_select_edgeloop_double_side_next()

static BMLoop* bm_select_edgeloop_double_side_next ( const Scene scene,
BMLoop l_step,
BMVert v_from,
const int  cd_loop_uv_offset 
)
static

◆ bm_select_edgeloop_single_side_next()

static BMLoop* bm_select_edgeloop_single_side_next ( const Scene scene,
BMLoop l_step,
BMVert v_from,
const int  cd_loop_uv_offset 
)
static

◆ bm_uv_flag_clear()

static void bm_uv_flag_clear ( const Scene scene,
BMesh bm,
const int  flag,
const int  cd_loop_uv_offset 
)
static

Clear specified UV flag (vert/edge/pinned).

Definition at line 1260 of file uvedit_select.c.

References bm, BM_ELEM_CD_GET_VOID_P, BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOPS_OF_FACE, MLoopUV::flag, l, scene, and uvedit_face_visible_test().

Referenced by uv_select_flush_from_loop_edge_flag().

◆ do_lasso_select_mesh_uv()

static bool do_lasso_select_mesh_uv ( bContext C,
const int  mcoords[][2],
const int  mcoords_len,
const eSelectOp  sel_op 
)
static

◆ do_lasso_select_mesh_uv_is_edge_inside()

static bool do_lasso_select_mesh_uv_is_edge_inside ( const ARegion region,
const rcti clip_rect,
const int  mcoords[][2],
const int  mcoords_len,
const float  co_test_a[2],
const float  co_test_b[2] 
)
static

◆ do_lasso_select_mesh_uv_is_point_inside()

static bool do_lasso_select_mesh_uv_is_point_inside ( const ARegion region,
const rcti clip_rect,
const int  mcoords[][2],
const int  mcoords_len,
const float  co_test[2] 
)
static

◆ ED_uvedit_active_edge_loop_get()

BMLoop* ED_uvedit_active_edge_loop_get ( BMesh bm)

◆ ED_uvedit_active_edge_loop_set()

void ED_uvedit_active_edge_loop_set ( BMesh bm,
BMLoop l 
)

◆ ED_uvedit_active_vert_loop_get()

BMLoop* ED_uvedit_active_vert_loop_get ( BMesh bm)

◆ ED_uvedit_active_vert_loop_set()

void ED_uvedit_active_vert_loop_set ( BMesh bm,
BMLoop l 
)

◆ ED_uvedit_nearest_uv_multi()

bool ED_uvedit_nearest_uv_multi ( const View2D v2d,
const Scene scene,
Object **  objects,
const uint  objects_len,
const int  mval[2],
const bool  ignore_selected,
float dist_sq,
float  r_uv[2] 
)

◆ ED_uvedit_select_mode_get()

char ED_uvedit_select_mode_get ( const Scene scene)

◆ ED_uvedit_select_sync_flush()

void ED_uvedit_select_sync_flush ( const ToolSettings ts,
BMEditMesh em,
const bool  select 
)

◆ ED_uvedit_selected_edges()

BMLoop** ED_uvedit_selected_edges ( const Scene scene,
BMesh bm,
int  len_max,
int *  r_edges_len 
)

◆ ED_uvedit_selected_faces()

BMFace** ED_uvedit_selected_faces ( const Scene scene,
BMesh bm,
int  len_max,
int *  r_faces_len 
)

◆ ED_uvedit_selected_verts()

BMLoop** ED_uvedit_selected_verts ( const Scene scene,
BMesh bm,
int  len_max,
int *  r_verts_len 
)

◆ ED_uvedit_selectmode_clean()

void ED_uvedit_selectmode_clean ( const Scene scene,
Object obedit 
)

◆ ED_uvedit_selectmode_clean_multi()

void ED_uvedit_selectmode_clean_multi ( bContext C)

◆ ED_uvedit_selectmode_flush()

void ED_uvedit_selectmode_flush ( const Scene scene,
BMEditMesh em 
)

◆ get_uv_edge_needle()

static float get_uv_edge_needle ( const eUVSelectSimilar  type,
BMEdge edge,
const float  ob_m3[3][3],
MLoopUV luv_a,
MLoopUV luv_b,
const int  cd_loop_uv_offset 
)
static

◆ get_uv_face_needle()

static float get_uv_face_needle ( const eUVSelectSimilar  type,
BMFace face,
const float  ob_m3[3][3],
const int  cd_loop_uv_offset 
)
static

◆ get_uv_vert_needle()

static float get_uv_vert_needle ( const eUVSelectSimilar  type,
BMVert vert,
const float  ob_m3[3][3],
MLoopUV luv,
const int  cd_loop_uv_offset 
)
static

◆ overlap_cmp()

BLI_INLINE bool overlap_cmp ( const void a_v,
const void b_v 
)

Definition at line 4266 of file uvedit_select.c.

References Freestyle::a, and usdtokens::b().

Referenced by uv_select_overlap().

◆ overlap_hash()

BLI_INLINE uint overlap_hash ( const void overlap_v)

Definition at line 4253 of file uvedit_select.c.

References BLI_hash_int_2d(), BVHTreeOverlap::indexA, BVHTreeOverlap::indexB, SWAP, x, and y.

Referenced by uv_select_overlap().

◆ overlap_tri_tri_uv_test()

static bool overlap_tri_tri_uv_test ( const float  t1[3][2],
const float  t2[3][2],
const float  endpoint_bias 
)
static

Specialized 2D triangle intersection for detecting UV overlap:

Returns
  • false when single corners or edges touch (common for UV coordinates).
  • true when all corners touch (an exactly overlapping triangle).

Definition at line 4287 of file uvedit_select.c.

References isect_point_tri_v2(), isect_seg_seg_v2_point_ex(), mid_v2_v2v2v2(), and UNPACK3.

Referenced by uv_select_overlap().

◆ uv_box_select_exec()

static int uv_box_select_exec ( bContext C,
wmOperator op 
)
static

Definition at line 3510 of file uvedit_select.c.

References BKE_editmesh_from_object(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs, BLI_rctf_isect_pt_v(), BLI_rctf_isect_segment(), BMEditMesh::bm, BM_ELEM_CD_GET_VOID_P, BM_elem_flag_disable, BM_elem_flag_enable, BM_ELEM_TAG, BM_FACE_FIRST_LOOP, BM_face_uv_calc_center_median(), BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOPS_OF_FACE, BM_mesh_elem_hflag_disable_all(), BM_VERT, C, CD_MLOOPUV, CTX_data_ensure_evaluated_depsgraph(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_region(), CustomData_get_offset(), depsgraph, ED_uvedit_select_sync_flush(), ED_uvedit_selectmode_flush(), MLoopUV::flag, l, BMesh::ldata, MEM_freeN, MLOOPUV_PINNED, NULL, UvNearestHit::ob, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), RNA_enum_get(), SCE_SELECT_EDGE, SCE_SELECT_FACE, scene, SEL_DESELECT, SEL_OP_SUB, SEL_OP_USE_PRE_DESELECT, select(), ToolSettings::selectmode, SI_STICKY_VERTEX, Scene::toolsettings, UI_view2d_region_to_view_rctf(), MLoopUV::uv, ToolSettings::uv_flag, uv_select_all_perform_multi(), UV_SELECT_EDGE, UV_SELECT_FACE, uv_select_flush_from_tag_face(), UV_SELECT_ISLAND, uv_select_linked_multi(), uv_select_tag_update_for_object(), ToolSettings::uv_selectmode, ToolSettings::uv_sticky, UV_SYNC_SELECTION, uvedit_edge_select_set_with_sticky(), uvedit_face_visible_test(), uvedit_uv_select_set(), uvedit_uv_select_test(), uvedit_vertex_select_tagged(), BMLoop::v, ARegion::v2d, and WM_operator_properties_border_to_rctf().

Referenced by UV_OT_select_box().

◆ uv_circle_select_exec()

static int uv_circle_select_exec ( bContext C,
wmOperator op 
)
static

Definition at line 3749 of file uvedit_select.c.

References BKE_editmesh_from_object(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs, BMEditMesh::bm, BM_ELEM_CD_GET_VOID_P, BM_elem_flag_disable, BM_elem_flag_enable, BM_ELEM_TAG, BM_FACE_FIRST_LOOP, BM_face_uv_calc_center_median(), BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOPS_OF_FACE, BM_mesh_elem_hflag_disable_all(), BM_VERT, C, CD_MLOOPUV, CTX_data_ensure_evaluated_depsgraph(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_region(), CTX_wm_space_image(), wmOperator::customdata, CustomData_get_offset(), depsgraph, ED_select_op_modal(), ED_space_image_get_size(), ED_space_image_get_zoom(), ED_uvedit_select_sync_flush(), ED_uvedit_selectmode_flush(), height, l, BMesh::ldata, MEM_freeN, NULL, UvNearestHit::ob, offset, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), RNA_int_get(), SCE_SELECT_EDGE, SCE_SELECT_FACE, scene, SEL_DESELECT, SEL_OP_SUB, SEL_OP_USE_PRE_DESELECT, select(), ToolSettings::selectmode, SI_STICKY_VERTEX, Scene::toolsettings, UI_view2d_region_to_view(), MLoopUV::uv, uv_circle_select_is_edge_inside(), uv_circle_select_is_point_inside(), ToolSettings::uv_flag, uv_select_all_perform_multi(), UV_SELECT_EDGE, UV_SELECT_FACE, uv_select_flush_from_tag_face(), UV_SELECT_ISLAND, uv_select_linked_multi(), uv_select_tag_update_for_object(), ToolSettings::uv_selectmode, ToolSettings::uv_sticky, UV_SYNC_SELECTION, uvedit_edge_select_set_with_sticky(), uvedit_face_select_test(), uvedit_face_visible_test(), uvedit_uv_select_set(), uvedit_uv_select_test(), uvedit_vertex_select_tagged(), BMLoop::v, ARegion::v2d, width, WM_gesture_is_modal_first(), x, and y.

Referenced by UV_OT_select_circle().

◆ uv_circle_select_is_edge_inside()

static int uv_circle_select_is_edge_inside ( const float  uv_a[2],
const float  uv_b[2],
const float  offset[2],
const float  ellipse[2] 
)
static

Definition at line 3732 of file uvedit_select.c.

References dist_squared_to_line_segment_v2(), and offset.

Referenced by uv_circle_select_exec().

◆ uv_circle_select_is_point_inside()

static int uv_circle_select_is_point_inside ( const float  uv[2],
const float  offset[2],
const float  ellipse[2] 
)
static

Definition at line 3720 of file uvedit_select.c.

References len_squared_v2(), and offset.

Referenced by uv_circle_select_exec().

◆ uv_find_nearest_edge()

bool uv_find_nearest_edge ( Scene scene,
Object obedit,
const float  co[2],
const float  penalty,
UvNearestHit hit 
)

◆ uv_find_nearest_edge_multi()

bool uv_find_nearest_edge_multi ( Scene scene,
Object **  objects,
const uint  objects_len,
const float  co[2],
const float  penalty,
UvNearestHit hit 
)

◆ uv_find_nearest_face()

bool uv_find_nearest_face ( Scene scene,
Object obedit,
const float  co[2],
UvNearestHit hit 
)

Definition at line 942 of file uvedit_select.c.

References scene, and uv_find_nearest_face_ex().

Referenced by uv_shortest_path_pick_invoke().

◆ uv_find_nearest_face_ex()

bool uv_find_nearest_face_ex ( struct Scene scene,
struct Object obedit,
const float  co[2],
struct UvNearestHit hit,
bool  only_in_face 
)
Parameters
only_in_facewhen true, only hit faces which co is inside. This gives users a result they might expect, especially when zoomed in.
Note
Concave faces can cause odd behavior, although in practice this isn't often an issue. The center can be outside the face, in this case the distance to the center could cause the face to be considered too far away. If this becomes an issue we could track the distance to the faces closest edge.

Definition at line 899 of file uvedit_select.c.

References BKE_editmesh_from_object(), BLI_assert, BMEditMesh::bm, BM_face_uv_calc_center_median(), BM_face_uv_point_inside_test(), BM_FACES_OF_MESH, BM_ITER_MESH, CD_MLOOPUV, CustomData_get_offset(), UvNearestHit::dist_sq, UvNearestHit::efa, BMesh::ldata, len_squared_v2(), mul_v2_v2(), UvNearestHit::ob, UvNearestHit::scale, scene, sub_v2_v2v2(), and uvedit_face_visible_test().

Referenced by uv_find_nearest_face(), and uv_find_nearest_face_multi_ex().

◆ uv_find_nearest_face_multi()

bool uv_find_nearest_face_multi ( Scene scene,
Object **  objects,
const uint  objects_len,
const float  co[2],
UvNearestHit hit 
)

Definition at line 964 of file uvedit_select.c.

References scene, and uv_find_nearest_face_multi_ex().

Referenced by uv_mouse_select_multi().

◆ uv_find_nearest_face_multi_ex()

bool uv_find_nearest_face_multi_ex ( Scene scene,
Object **  objects,
const uint  objects_len,
const float  co[2],
UvNearestHit hit,
const bool  only_in_face 
)

Definition at line 947 of file uvedit_select.c.

References scene, and uv_find_nearest_face_ex().

Referenced by uv_find_nearest_face_multi(), and uv_mouse_select_multi().

◆ uv_find_nearest_loop_from_edge()

BMLoop* uv_find_nearest_loop_from_edge ( struct Scene scene,
struct Object obedit,
struct BMEdge e,
const float  co[2] 
)

◆ uv_find_nearest_loop_from_vert()

BMLoop* uv_find_nearest_loop_from_vert ( struct Scene scene,
struct Object obedit,
struct BMVert v,
const float  co[2] 
)

◆ uv_find_nearest_vert()

bool uv_find_nearest_vert ( Scene scene,
Object obedit,
float const  co[2],
const float  penalty_dist,
UvNearestHit hit 
)

◆ uv_find_nearest_vert_multi()

bool uv_find_nearest_vert_multi ( Scene scene,
Object **  objects,
const uint  objects_len,
float const  co[2],
const float  penalty_dist,
UvNearestHit hit 
)

Definition at line 1038 of file uvedit_select.c.

References scene, and uv_find_nearest_vert().

Referenced by stitch_select(), and uv_mouse_select_multi().

◆ uv_isolate_selected_islands()

static void uv_isolate_selected_islands ( const Scene scene,
BMEditMesh em,
const int  cd_loop_uv_offset 
)
static

◆ uv_lasso_select_exec()

static int uv_lasso_select_exec ( bContext C,
wmOperator op 
)
static

◆ uv_mouse_select()

static bool uv_mouse_select ( bContext C,
const float  co[2],
const struct SelectPick_Params params 
)
static

◆ uv_mouse_select_loop_generic()

static int uv_mouse_select_loop_generic ( bContext C,
const float  co[2],
const bool  extend,
enum eUVLoopGenericType  loop_type 
)
static

◆ uv_mouse_select_loop_generic_multi()

static int uv_mouse_select_loop_generic_multi ( bContext C,
Object **  objects,
uint  objects_len,
const float  co[2],
const bool  extend,
enum eUVLoopGenericType  loop_type 
)
static

◆ uv_mouse_select_multi()

static bool uv_mouse_select_multi ( bContext C,
Object **  objects,
uint  objects_len,
const float  co[2],
const struct SelectPick_Params params 
)
static

◆ uv_nearest_between()

static bool uv_nearest_between ( const BMLoop l,
const float  co[2],
const int  cd_loop_uv_offset 
)
static

Definition at line 970 of file uvedit_select.c.

References BM_ELEM_CD_GET_VOID_P, l, line_point_side_v2(), BMLoop::next, and BMLoop::prev.

Referenced by uv_find_nearest_vert().

◆ UV_OT_select()

void UV_OT_select ( wmOperatorType ot)

◆ UV_OT_select_all()

void UV_OT_select_all ( wmOperatorType ot)

◆ UV_OT_select_box()

void UV_OT_select_box ( wmOperatorType ot)

◆ UV_OT_select_circle()

void UV_OT_select_circle ( wmOperatorType ot)

◆ UV_OT_select_edge_ring()

void UV_OT_select_edge_ring ( wmOperatorType ot)

◆ UV_OT_select_lasso()

void UV_OT_select_lasso ( wmOperatorType ot)

◆ UV_OT_select_less()

void UV_OT_select_less ( wmOperatorType ot)

◆ UV_OT_select_linked()

void UV_OT_select_linked ( wmOperatorType ot)

◆ UV_OT_select_linked_pick()

void UV_OT_select_linked_pick ( wmOperatorType ot)

◆ UV_OT_select_loop()

void UV_OT_select_loop ( wmOperatorType ot)

◆ UV_OT_select_mode()

void UV_OT_select_mode ( wmOperatorType ot)

◆ UV_OT_select_more()

void UV_OT_select_more ( wmOperatorType ot)

◆ UV_OT_select_overlap()

void UV_OT_select_overlap ( wmOperatorType ot)

◆ UV_OT_select_pinned()

void UV_OT_select_pinned ( wmOperatorType ot)

◆ UV_OT_select_similar()

void UV_OT_select_similar ( wmOperatorType ot)

◆ UV_OT_select_split()

void UV_OT_select_split ( wmOperatorType ot)

◆ uv_select_all()

static void uv_select_all ( const Scene scene,
BMEditMesh em,
bool  select_all 
)
static

◆ uv_select_all_exec()

static int uv_select_all_exec ( bContext C,
wmOperator op 
)
static

◆ uv_select_all_perform()

static void uv_select_all_perform ( const Scene scene,
Object obedit,
int  action 
)
static

◆ uv_select_all_perform_multi()

static void uv_select_all_perform_multi ( const Scene scene,
Object **  objects,
const uint  objects_len,
int  action 
)
static

◆ uv_select_all_perform_multi_ex()

static void uv_select_all_perform_multi_ex ( const Scene scene,
Object **  objects,
const uint  objects_len,
int  action,
const Object ob_exclude 
)
static

◆ uv_select_edge_ring_exec()

static int uv_select_edge_ring_exec ( bContext C,
wmOperator op 
)
static

◆ uv_select_edge_ring_invoke()

static int uv_select_edge_ring_invoke ( bContext C,
wmOperator op,
const wmEvent event 
)
static

◆ uv_select_edgeloop()

static int uv_select_edgeloop ( Scene scene,
Object obedit,
UvNearestHit hit,
const bool  extend 
)
static

◆ uv_select_edgeloop_double_side_tag()

static void uv_select_edgeloop_double_side_tag ( const Scene scene,
BMEditMesh em,
BMLoop l_init_pair[2],
const int  cd_loop_uv_offset 
)
static

◆ uv_select_edgeloop_single_side_tag()

static void uv_select_edgeloop_single_side_tag ( const Scene scene,
BMEditMesh em,
BMLoop l_init,
const int  cd_loop_uv_offset,
enum eUVEdgeLoopBoundaryMode  boundary_mode,
int  r_count_by_select[2] 
)
static

Tag all loops which should be selected, the caller must select.

Parameters
r_count_by_selectCount the number of unselected and selected loops, this is needed to implement cycling between eUVEdgeLoopBoundaryMode.

Definition at line 1490 of file uvedit_select.c.

References BMEditMesh::bm, BM_edge_other_vert(), BM_elem_flag_disable, BM_elem_flag_enable, BM_elem_flag_test, BM_ELEM_TAG, bm_loop_tags_clear(), bm_select_edgeloop_single_side_next(), BMLoop::e, BMLoop::f, NULL, scene, UV_EDGE_LOOP_BOUNDARY_LOOP, uvedit_edge_select_test(), uvedit_face_visible_test(), uvedit_loop_find_other_radial_loop_with_visible_face(), BMEdge::v1, and BMEdge::v2.

Referenced by uv_select_edgeloop().

◆ uv_select_edgering()

static int uv_select_edgering ( Scene scene,
Object obedit,
UvNearestHit hit,
const bool  extend 
)
static

◆ uv_select_exec()

static int uv_select_exec ( bContext C,
wmOperator op 
)
static

◆ uv_select_faceloop()

static int uv_select_faceloop ( Scene scene,
Object obedit,
UvNearestHit hit,
const bool  extend 
)
static

◆ uv_select_flush_from_loop_edge_flag()

static void uv_select_flush_from_loop_edge_flag ( const Scene scene,
BMEditMesh em 
)
static

Flush the selection from UV edge flags based on sticky modes.

Useful when performing edge selections in different sticky modes, since setting the required edge flags (MLOOPUV_EDGESEL) is done manually or using uvedit_edge_select_set_noflush, but dealing with sticky modes for vertex selections is best done in a separate function.

Note
Current behavior is selecting only; deselecting can be added but the behavior isn't required anywhere.

Definition at line 3442 of file uvedit_select.c.

References BMEditMesh::bm, BM_ELEM_CD_GET_VOID_P, BM_FACE, BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_ITER_MESH_INDEX, BM_LOOPS_OF_FACE, BM_mesh_elem_table_ensure(), bm_uv_flag_clear(), BM_uv_vert_map_create(), BM_uv_vert_map_free(), CD_MLOOPUV, CustomData_get_offset(), ELEM, MLoopUV::flag, l, BMesh::ldata, MLOOPUV_EDGESEL, MLOOPUV_VERTSEL, BMLoop::next, NULL, BMLoop::prev, scene, SI_STICKY_LOC, SI_STICKY_VERTEX, Scene::toolsettings, ToolSettings::uv_flag, uv_select_flush_from_tag_sticky_loc_internal(), ToolSettings::uv_sticky, UV_SYNC_SELECTION, and uvedit_face_visible_test().

Referenced by ED_uvedit_selectmode_clean(), and uv_select_invert().

◆ uv_select_flush_from_tag_face()

static void uv_select_flush_from_tag_face ( const Scene scene,
Object obedit,
const bool  select 
)
static

Flush the selection from face tags based on sticky and selection modes.

needed because setting the selection of a face is done in a number of places but it also needs to respect the sticky modes for the UV verts, so dealing with the sticky modes is best done in a separate function.

Note
This function is very similar to uv_select_flush_from_tag_loop, be sure to update both upon changing.

Definition at line 3296 of file uvedit_select.c.

References BKE_editmesh_from_object(), BMEditMesh::bm, BM_ELEM_CD_GET_VOID_P, BM_elem_flag_test, BM_ELEM_TAG, BM_FACE, BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_ITER_MESH_INDEX, BM_LOOPS_OF_FACE, BM_mesh_elem_table_ensure(), BM_uv_vert_map_create(), BM_uv_vert_map_free(), CD_MLOOPUV, CustomData_get_offset(), ELEM, MLoopUV::flag, l, BMesh::ldata, MLOOPUV_EDGESEL, NULL, scene, select(), SI_STICKY_LOC, SI_STICKY_VERTEX, Scene::toolsettings, ToolSettings::uv_flag, uv_select_flush_from_tag_sticky_loc_internal(), ToolSettings::uv_sticky, UV_SYNC_SELECTION, uvedit_face_select_set(), and uvedit_vert_is_face_select_any_other().

Referenced by do_lasso_select_mesh_uv(), ED_uvedit_selectmode_clean(), uv_box_select_exec(), uv_circle_select_exec(), and uv_select_more_less().

◆ uv_select_flush_from_tag_loop()

static void uv_select_flush_from_tag_loop ( const Scene scene,
Object obedit,
const bool  select 
)
static

Flush the selection from loop tags based on sticky and selection modes.

needed because setting the selection of a face is done in a number of places but it also needs to respect the sticky modes for the UV verts, so dealing with the sticky modes is best done in a separate function.

Note
This function is very similar to uv_select_flush_from_tag_face, be sure to update both upon changing.

Definition at line 3363 of file uvedit_select.c.

References BKE_editmesh_from_object(), BMEditMesh::bm, BM_elem_flag_enable, BM_elem_flag_test, BM_ELEM_TAG, BM_FACE, BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_ITER_MESH_INDEX, BM_LOOPS_OF_FACE, BM_mesh_elem_hflag_disable_all(), BM_mesh_elem_table_ensure(), BM_uv_vert_map_create(), BM_uv_vert_map_free(), BM_VERT, CD_MLOOPUV, CustomData_get_offset(), l, BMesh::ldata, NULL, scene, select(), SI_STICKY_LOC, SI_STICKY_VERTEX, Scene::toolsettings, ToolSettings::uv_flag, uv_select_flush_from_tag_sticky_loc_internal(), ToolSettings::uv_sticky, UV_SYNC_SELECTION, uvedit_uv_select_set(), and BMLoop::v.

Referenced by ED_uvedit_selectmode_clean(), and uv_select_more_less().

◆ uv_select_flush_from_tag_sticky_loc_internal()

static void uv_select_flush_from_tag_sticky_loc_internal ( const Scene scene,
BMEditMesh em,
UvVertMap vmap,
const uint  efa_index,
BMLoop l,
const bool  select,
const int  cd_loop_uv_offset 
)
static

◆ uv_select_invert()

static void uv_select_invert ( const Scene scene,
BMEditMesh em 
)
static

◆ uv_select_invoke()

static int uv_select_invoke ( bContext C,
wmOperator op,
const wmEvent event 
)
static

◆ uv_select_less_exec()

static int uv_select_less_exec ( bContext C,
wmOperator UNUSEDop 
)
static

Definition at line 2205 of file uvedit_select.c.

References C, and uv_select_more_less().

Referenced by UV_OT_select_less().

◆ uv_select_linked_exec()

static int uv_select_linked_exec ( bContext C,
wmOperator op 
)
static

Definition at line 3030 of file uvedit_select.c.

References C, NULL, and uv_select_linked_internal().

Referenced by UV_OT_select_linked().

◆ uv_select_linked_internal()

static int uv_select_linked_internal ( bContext C,
wmOperator op,
const wmEvent event,
bool  pick 
)
static

◆ uv_select_linked_multi()

static void uv_select_linked_multi ( Scene scene,
Object **  objects,
const uint  objects_len,
UvNearestHit hit,
const bool  extend,
bool  deselect,
const bool  toggle,
const bool  select_faces 
)
static

◆ uv_select_linked_pick_exec()

static int uv_select_linked_pick_exec ( bContext C,
wmOperator op 
)
static

Definition at line 3061 of file uvedit_select.c.

References C, NULL, and uv_select_linked_internal().

Referenced by UV_OT_select_linked_pick().

◆ uv_select_linked_pick_invoke()

static int uv_select_linked_pick_invoke ( bContext C,
wmOperator op,
const wmEvent event 
)
static

Definition at line 3056 of file uvedit_select.c.

References C, and uv_select_linked_internal().

Referenced by UV_OT_select_linked_pick().

◆ uv_select_loop_exec()

static int uv_select_loop_exec ( bContext C,
wmOperator op 
)
static

◆ uv_select_loop_invoke()

static int uv_select_loop_invoke ( bContext C,
wmOperator op,
const wmEvent event 
)
static

◆ uv_select_mode_exec()

static int uv_select_mode_exec ( bContext C,
wmOperator op 
)
static

◆ uv_select_mode_invoke()

static int uv_select_mode_invoke ( bContext C,
wmOperator op,
const wmEvent UNUSEDevent 
)
static

◆ uv_select_more_exec()

static int uv_select_more_exec ( bContext C,
wmOperator UNUSEDop 
)
static

Definition at line 2187 of file uvedit_select.c.

References C, and uv_select_more_less().

Referenced by UV_OT_select_more().

◆ uv_select_more_less()

static int uv_select_more_less ( bContext C,
const bool  select 
)
static

◆ uv_select_overlap()

static int uv_select_overlap ( bContext C,
const bool  extend 
)
static

◆ uv_select_overlap_exec()

static int uv_select_overlap_exec ( bContext C,
wmOperator op 
)
static

Definition at line 4490 of file uvedit_select.c.

References C, wmOperator::ptr, RNA_boolean_get(), and uv_select_overlap().

Referenced by UV_OT_select_overlap().

◆ uv_select_pinned_exec()

static int uv_select_pinned_exec ( bContext C,
wmOperator op 
)
static

◆ uv_select_similar_edge_exec()

static int uv_select_similar_edge_exec ( bContext C,
wmOperator op 
)
static

◆ uv_select_similar_exec()

static int uv_select_similar_exec ( bContext C,
wmOperator op 
)
static

◆ uv_select_similar_face_exec()

static int uv_select_similar_face_exec ( bContext C,
wmOperator op 
)
static

◆ uv_select_similar_type_itemf()

static const EnumPropertyItem* uv_select_similar_type_itemf ( bContext C,
PointerRNA UNUSEDptr,
PropertyRNA UNUSEDprop,
bool UNUSEDr_free 
)
static

◆ uv_select_similar_vert_exec()

static int uv_select_similar_vert_exec ( bContext C,
wmOperator op 
)
static

◆ uv_select_split_exec()

static int uv_select_split_exec ( bContext C,
wmOperator op 
)
static

◆ uv_select_tag_update_for_object()

static void uv_select_tag_update_for_object ( Depsgraph depsgraph,
const ToolSettings ts,
Object obedit 
)
static

◆ uvedit_deselect_flush()

void uvedit_deselect_flush ( const Scene scene,
BMEditMesh em 
)

◆ uvedit_edge_select_disable()

void uvedit_edge_select_disable ( const Scene scene,
BMEditMesh em,
BMLoop l,
const int  cd_loop_uv_offset 
)

◆ uvedit_edge_select_enable()

void uvedit_edge_select_enable ( const Scene scene,
BMEditMesh em,
BMLoop l,
const bool  do_history,
const int  cd_loop_uv_offset 
)

◆ uvedit_edge_select_set()

void uvedit_edge_select_set ( const Scene scene,
BMEditMesh em,
BMLoop l,
const bool  select,
const bool  do_history,
const int  cd_loop_uv_offset 
)

◆ uvedit_edge_select_set_noflush()

void uvedit_edge_select_set_noflush ( const Scene scene,
BMLoop l,
const bool  select,
const int  sticky_flag,
const int  cd_loop_uv_offset 
)

◆ uvedit_edge_select_set_with_sticky()

void uvedit_edge_select_set_with_sticky ( const Scene scene,
BMEditMesh em,
BMLoop l,
const bool  select,
const bool  do_history,
const uint  cd_loop_uv_offset 
)

◆ uvedit_edge_select_shared_vert()

void uvedit_edge_select_shared_vert ( const Scene scene,
BMEditMesh em,
BMLoop l,
const bool  select,
const int  sticky_flag,
const bool  do_history,
const int  cd_loop_uv_offset 
)

Selects UV edges and shared vertices according to sticky_flag.

Parameters
sticky_flag
  • SI_STICKY_LOC: selects all UV edges that share the same mesh vertices and UV coordinates.
  • SI_STICKY_VERTEX: selects all UV edges sharing the same mesh vertices.

Definition at line 446 of file uvedit_select.c.

References BLI_assert, BM_ELEM_CD_GET_VOID_P, do_history(), ELEM, MLoopUV::flag, l, MLOOPUV_EDGESEL, BMLoop::next, BMLoop::radial_next, scene, select(), SI_STICKY_LOC, SI_STICKY_VERTEX, uvedit_edge_select_set_noflush(), uvedit_uv_select_shared_vert(), and uvedit_vert_is_edge_select_any_other().

Referenced by uvedit_edge_select_set_with_sticky().

◆ uvedit_edge_select_test()

bool uvedit_edge_select_test ( const Scene scene,
BMLoop l,
const int  cd_loop_uv_offset 
)

◆ uvedit_edge_select_test_ex()

bool uvedit_edge_select_test_ex ( const ToolSettings ts,
BMLoop l,
const int  cd_loop_uv_offset 
)

◆ uvedit_face_select_disable()

void uvedit_face_select_disable ( const Scene scene,
BMEditMesh em,
BMFace efa,
const int  cd_loop_uv_offset 
)

◆ uvedit_face_select_enable()

void uvedit_face_select_enable ( const Scene scene,
BMEditMesh em,
BMFace efa,
const bool  do_history,
const int  cd_loop_uv_offset 
)

◆ uvedit_face_select_set()

void uvedit_face_select_set ( const Scene scene,
BMEditMesh em,
BMFace efa,
const bool  select,
const bool  do_history,
const int  cd_loop_uv_offset 
)

◆ uvedit_face_select_set_with_sticky()

void uvedit_face_select_set_with_sticky ( const Scene scene,
BMEditMesh em,
BMFace efa,
const bool  select,
const bool  do_history,
const int  cd_loop_uv_offset 
)

◆ uvedit_face_select_shared_vert()

void uvedit_face_select_shared_vert ( const Scene scene,
BMEditMesh em,
BMFace efa,
const bool  select,
const bool  do_history,
const int  cd_loop_uv_offset 
)

◆ uvedit_face_select_test()

bool uvedit_face_select_test ( const Scene scene,
BMFace efa,
const int  cd_loop_uv_offset 
)

◆ uvedit_face_select_test_ex()

bool uvedit_face_select_test_ex ( const ToolSettings ts,
BMFace efa,
const int  cd_loop_uv_offset 
)

◆ uvedit_face_visible_test()

bool uvedit_face_visible_test ( const Scene scene,
BMFace efa 
)

◆ uvedit_face_visible_test_ex()

bool uvedit_face_visible_test_ex ( const ToolSettings ts,
BMFace efa 
)

◆ uvedit_first_selected_uv_from_vertex()

const float* uvedit_first_selected_uv_from_vertex ( struct Scene scene,
struct BMVert eve,
int  cd_loop_uv_offset 
)
Warning
This returns first selected UV, not ideal in many cases since there could be multiple.

Definition at line 2016 of file uvedit_select.c.

References BM_ELEM_CD_GET_VOID_P, BM_ITER_ELEM, BM_LOOPS_OF_VERT, BMLoop::f, l, NULL, scene, MLoopUV::uv, uvedit_face_visible_test(), and uvedit_uv_select_test().

◆ uvedit_loop_find_other_boundary_loop_with_visible_face()

static BMLoop* uvedit_loop_find_other_boundary_loop_with_visible_face ( const Scene scene,
BMLoop l_edge,
BMVert v_pivot,
const int  cd_loop_uv_offset 
)
static

◆ uvedit_loop_find_other_radial_loop_with_visible_face()

static BMLoop* uvedit_loop_find_other_radial_loop_with_visible_face ( const Scene scene,
BMLoop l_src,
const int  cd_loop_uv_offset 
)
static

◆ uvedit_nearest_uv()

static bool uvedit_nearest_uv ( const Scene scene,
Object obedit,
const float  co[2],
const float  scale[2],
const bool  ignore_selected,
float dist_sq,
float  r_uv[2] 
)
static

◆ uvedit_select_flush()

void uvedit_select_flush ( const Scene scene,
BMEditMesh em 
)

◆ uvedit_select_is_any_selected()

bool uvedit_select_is_any_selected ( const Scene scene,
Object obedit 
)

◆ uvedit_select_is_any_selected_multi()

bool uvedit_select_is_any_selected_multi ( const Scene scene,
Object **  objects,
const uint  objects_len 
)

Definition at line 2257 of file uvedit_select.c.

References scene, and uvedit_select_is_any_selected().

Referenced by uv_select_all_perform_multi_ex().

◆ uvedit_uv_select_disable()

void uvedit_uv_select_disable ( const Scene scene,
BMEditMesh em,
BMLoop l,
const int  cd_loop_uv_offset 
)

◆ uvedit_uv_select_enable()

void uvedit_uv_select_enable ( const Scene scene,
BMEditMesh em,
BMLoop l,
const bool  do_history,
const int  cd_loop_uv_offset 
)

◆ uvedit_uv_select_set()

void uvedit_uv_select_set ( const Scene scene,
BMEditMesh em,
BMLoop l,
const bool  select,
const bool  do_history,
const int  cd_loop_uv_offset 
)

◆ uvedit_uv_select_set_with_sticky()

void uvedit_uv_select_set_with_sticky ( const Scene scene,
BMEditMesh em,
BMLoop l,
const bool  select,
const bool  do_history,
const uint  cd_loop_uv_offset 
)

◆ uvedit_uv_select_shared_vert()

void uvedit_uv_select_shared_vert ( const Scene scene,
BMEditMesh em,
BMLoop l,
const bool  select,
const int  sticky_flag,
const bool  do_history,
const int  cd_loop_uv_offset 
)

Selects shared UVs based on #sticky_flag.

Parameters
sticky_flagType of sticky selection :
  • SI_STICKY_LOC: selects all UVs sharing same mesh vertex and UV coordinates.
  • SI_STICKY_VERTEX: selects all UVs sharing same mesh vertex.

Definition at line 668 of file uvedit_select.c.

References BLI_assert, BM_DISK_EDGE_NEXT, BM_loop_uv_share_vert_check(), do_history(), BMLoop::e, ELEM, BMLoop::f, BMEdge::l, l, BMLoop::radial_next, scene, select(), SI_STICKY_LOC, SI_STICKY_VERTEX, uvedit_face_visible_test(), uvedit_uv_select_set(), and BMLoop::v.

Referenced by uvedit_edge_select_shared_vert(), uvedit_face_select_shared_vert(), and uvedit_uv_select_set_with_sticky().

◆ uvedit_uv_select_test()

bool uvedit_uv_select_test ( const Scene scene,
BMLoop l,
const int  cd_loop_uv_offset 
)

◆ uvedit_uv_select_test_ex()

bool uvedit_uv_select_test_ex ( const ToolSettings ts,
BMLoop l,
const int  cd_loop_uv_offset 
)

◆ uvedit_vert_is_all_other_faces_selected()

bool uvedit_vert_is_all_other_faces_selected ( const Scene scene,
BMLoop l,
const int  cd_loop_uv_offset 
)

◆ uvedit_vert_is_edge_select_any_other()

bool uvedit_vert_is_edge_select_any_other ( const Scene scene,
BMLoop l,
const int  cd_loop_uv_offset 
)

◆ uvedit_vert_is_face_select_any_other()

bool uvedit_vert_is_face_select_any_other ( const Scene scene,
BMLoop l,
const int  cd_loop_uv_offset 
)

◆ uvedit_vertex_select_tagged()

static void uvedit_vertex_select_tagged ( BMEditMesh em,
Scene scene,
bool  select,
int  cd_loop_uv_offset 
)
static

Variable Documentation

◆ prop_edge_similar_types

EnumPropertyItem prop_edge_similar_types[]
static
Initial value:
= {
{UV_SSIM_LENGTH_UV, "LENGTH", 0, "Length", ""},
{UV_SSIM_LENGTH_3D, "LENGTH_3D", 0, "Length 3D", ""},
{UV_SSIM_PIN, "PIN", 0, "Pinned", ""},
{0}}
@ UV_SSIM_LENGTH_UV
Definition: uvedit_select.c:84
@ UV_SSIM_PIN
Definition: uvedit_select.c:87
@ UV_SSIM_LENGTH_3D
Definition: uvedit_select.c:85

Definition at line 5001 of file uvedit_select.c.

Referenced by uv_select_similar_type_itemf().

◆ prop_face_similar_types

EnumPropertyItem prop_face_similar_types[]
static
Initial value:
= {
{UV_SSIM_AREA_UV, "AREA", 0, "Area", ""},
{UV_SSIM_AREA_3D, "AREA_3D", 0, "Area 3D", ""},
{UV_SSIM_SIDES, "SIDES", 0, "Polygon Sides", ""},
{UV_SSIM_MATERIAL, "MATERIAL", 0, "Material", ""},
{0}}
@ UV_SSIM_AREA_UV
Definition: uvedit_select.c:82
@ UV_SSIM_MATERIAL
Definition: uvedit_select.c:88
@ UV_SSIM_AREA_3D
Definition: uvedit_select.c:83
@ UV_SSIM_SIDES
Definition: uvedit_select.c:86

Definition at line 5007 of file uvedit_select.c.

Referenced by uv_select_similar_type_itemf().

◆ prop_similar_compare_types

EnumPropertyItem prop_similar_compare_types[]
static
Initial value:
= {{SIM_CMP_EQ, "EQUAL", 0, "Equal", ""},
{SIM_CMP_GT, "GREATER", 0, "Greater", ""},
{SIM_CMP_LT, "LESS", 0, "Less", ""},
{0}}
@ SIM_CMP_LT
@ SIM_CMP_GT
@ SIM_CMP_EQ

Definition at line 5014 of file uvedit_select.c.

Referenced by UV_OT_select_similar().

◆ prop_vert_similar_types

EnumPropertyItem prop_vert_similar_types[] = {{UV_SSIM_PIN, "PIN", 0, "Pinned", ""}, {0}}
static

Definition at line 4999 of file uvedit_select.c.

Referenced by UV_OT_select_similar(), and uv_select_similar_type_itemf().