Blender V5.0
uvedit_intern.hh File Reference
#include "BKE_customdata.hh"

Go to the source code of this file.

Classes

struct  UvNearestHit

Functions

UvNearestHit uv_nearest_hit_init_dist_px (const View2D *v2d, float dist_px)
UvNearestHit uv_nearest_hit_init_max (const View2D *v2d)
UvNearestHit uv_nearest_hit_init_max_default ()
bool uv_find_nearest_vert (Scene *scene, Object *obedit, const float co[2], float penalty_dist, UvNearestHit *hit)
bool uv_find_nearest_vert_multi (Scene *scene, blender::Span< Object * > objects, const float co[2], float penalty_dist, UvNearestHit *hit)
bool uv_find_nearest_edge (Scene *scene, Object *obedit, const float co[2], float penalty, UvNearestHit *hit)
bool uv_find_nearest_edge_multi (Scene *scene, blender::Span< Object * > objects, const float co[2], float penalty, UvNearestHit *hit)
bool uv_find_nearest_face_ex (Scene *scene, Object *obedit, const float co[2], UvNearestHit *hit, 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, blender::Span< Object * > objects, const float co[2], UvNearestHit *hit, bool only_in_face)
bool uv_find_nearest_face_multi (Scene *scene, blender::Span< Object * > objects, const float co[2], UvNearestHit *hit)
BMLoopuv_find_nearest_loop_from_vert (Scene *scene, Object *obedit, BMVert *v, const float co[2])
BMLoopuv_find_nearest_loop_from_edge (Scene *scene, Object *obedit, BMEdge *e, const float co[2])
bool uvedit_vert_is_edge_select_any_other (const ToolSettings *ts, const BMesh *bm, const BMLoop *l, const BMUVOffsets &offsets)
bool uvedit_vert_is_face_select_any_other (const ToolSettings *ts, const BMesh *bm, const BMLoop *l, const BMUVOffsets &offsets)
bool uvedit_edge_is_face_select_any_other (const ToolSettings *ts, const BMesh *bm, const BMLoop *l, const BMUVOffsets &offsets)
bool uvedit_vert_is_all_other_faces_selected (const ToolSettings *ts, const BMesh *bm, const BMLoop *l, const BMUVOffsets &offsets)
bool uvedit_vert_select_get_no_sync (const ToolSettings *ts, const BMesh *bm, const BMLoop *l)
bool uvedit_edge_select_get_no_sync (const ToolSettings *ts, const BMesh *bm, const BMLoop *l)
bool uvedit_face_select_get_no_sync (const ToolSettings *ts, const BMesh *bm, const BMFace *f)
void uvedit_vert_select_set_no_sync (const ToolSettings *ts, const BMesh *bm, BMLoop *l, bool select)
void uvedit_edge_select_set_no_sync (const ToolSettings *ts, const BMesh *bm, BMLoop *l, bool select)
void uvedit_face_select_set_no_sync (const ToolSettings *ts, const BMesh *bm, BMFace *f, bool select)
void uvedit_live_unwrap_update (SpaceImage *sima, Scene *scene, Object *obedit)
void UV_OT_average_islands_scale (wmOperatorType *ot)
void UV_OT_cube_project (wmOperatorType *ot)
void UV_OT_cylinder_project (wmOperatorType *ot)
void UV_OT_project_from_view (wmOperatorType *ot)
void UV_OT_minimize_stretch (wmOperatorType *ot)
void UV_OT_pack_islands (wmOperatorType *ot)
void UV_OT_reset (wmOperatorType *ot)
void UV_OT_sphere_project (wmOperatorType *ot)
void UV_OT_unwrap (wmOperatorType *ot)
void UV_OT_rip (wmOperatorType *ot)
void UV_OT_stitch (wmOperatorType *ot)
void UV_OT_smart_project (wmOperatorType *ot)
void UV_OT_copy_mirrored_faces (wmOperatorType *ot)
void UV_OT_copy (wmOperatorType *ot)
void UV_OT_paste (wmOperatorType *ot)
void UV_OT_shortest_path_pick (wmOperatorType *ot)
void UV_OT_shortest_path_select (wmOperatorType *ot)
void uvedit_select_prepare_custom_data (const Scene *scene, BMesh *bm)
void uvedit_select_prepare_sync_select (const Scene *scene, BMesh *bm)
void uvedit_select_prepare_UNUSED (const Scene *scene, BMesh *bm)
bool uvedit_select_is_any_selected (const Scene *scene, BMesh *bm)
bool uvedit_select_is_any_selected_multi (const Scene *scene, blender::Span< Object * > objects)
const floatuvedit_first_selected_uv_from_vertex (Scene *scene, const BMesh *bm, BMVert *eve, const BMUVOffsets &offsets)
void UV_OT_select_all (wmOperatorType *ot)
void UV_OT_select (wmOperatorType *ot)
void UV_OT_select_loop (wmOperatorType *ot)
void UV_OT_select_edge_ring (wmOperatorType *ot)
void UV_OT_select_linked (wmOperatorType *ot)
void UV_OT_select_linked_pick (wmOperatorType *ot)
void UV_OT_select_split (wmOperatorType *ot)
void UV_OT_select_pinned (wmOperatorType *ot)
void UV_OT_select_box (wmOperatorType *ot)
void UV_OT_select_lasso (wmOperatorType *ot)
void UV_OT_select_circle (wmOperatorType *ot)
void UV_OT_select_more (wmOperatorType *ot)
void UV_OT_select_less (wmOperatorType *ot)
void UV_OT_select_overlap (wmOperatorType *ot)
void UV_OT_select_similar (wmOperatorType *ot)
void UV_OT_custom_region_set (wmOperatorType *ot)
void UV_OT_select_mode (wmOperatorType *ot)

Function Documentation

◆ uv_find_nearest_edge()

◆ uv_find_nearest_edge_multi()

bool uv_find_nearest_edge_multi ( Scene * scene,
blender::Span< Object * > objects,
const float co[2],
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 1346 of file uvedit_select.cc.

References uv_find_nearest_face_ex().

◆ uv_find_nearest_face_ex()

bool uv_find_nearest_face_ex ( Scene * scene,
Object * obedit,
const float co[2],
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 1303 of file uvedit_select.cc.

References BKE_editmesh_from_object(), BLI_assert, bm, BMEditMesh::bm, BM_face_uv_calc_center_median(), BM_face_uv_point_inside_test(), BM_FACES_OF_MESH, BM_ITER_MESH, CD_PROP_FLOAT2, CustomData_get_offset(), UvNearestHit::dist_sq, UvNearestHit::efa, len_squared_v2(), mul_v2_v2(), UvNearestHit::ob, UvNearestHit::scale, 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,
blender::Span< Object * > objects,
const float co[2],
UvNearestHit * hit )

References bm, e, l, ot, select, and v.

Referenced by uv_mouse_select_multi(), and uv_shortest_path_pick_invoke().

◆ uv_find_nearest_face_multi_ex()

bool uv_find_nearest_face_multi_ex ( Scene * scene,
blender::Span< Object * > objects,
const float co[2],
UvNearestHit * hit,
bool only_in_face )

Referenced by uv_mouse_select_multi().

◆ uv_find_nearest_loop_from_edge()

◆ uv_find_nearest_loop_from_vert()

◆ uv_find_nearest_vert()

◆ uv_find_nearest_vert_multi()

bool uv_find_nearest_vert_multi ( Scene * scene,
blender::Span< Object * > objects,
const float co[2],
float penalty_dist,
UvNearestHit * hit )

◆ uv_nearest_hit_init_dist_px()

UvNearestHit uv_nearest_hit_init_dist_px ( const View2D * v2d,
float dist_px )

◆ uv_nearest_hit_init_max()

◆ uv_nearest_hit_init_max_default()

UvNearestHit uv_nearest_hit_init_max_default ( )

◆ UV_OT_average_islands_scale()

void UV_OT_average_islands_scale ( wmOperatorType * ot)

◆ UV_OT_copy()

void UV_OT_copy ( wmOperatorType * ot)

◆ UV_OT_copy_mirrored_faces()

void UV_OT_copy_mirrored_faces ( wmOperatorType * ot)

◆ UV_OT_cube_project()

◆ UV_OT_custom_region_set()

◆ UV_OT_cylinder_project()

◆ UV_OT_minimize_stretch()

◆ UV_OT_pack_islands()

◆ UV_OT_paste()

void UV_OT_paste ( wmOperatorType * ot)

◆ UV_OT_project_from_view()

◆ UV_OT_reset()

void UV_OT_reset ( wmOperatorType * ot)

Definition at line 3680 of file uvedit_unwrap_ops.cc.

References ED_operator_uvmap(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and reset_exec().

Referenced by ED_operatortypes_uvedit().

◆ UV_OT_rip()

◆ UV_OT_select()

◆ UV_OT_select_all()

◆ UV_OT_select_box()

◆ UV_OT_select_circle()

◆ UV_OT_select_edge_ring()

◆ UV_OT_select_lasso()

◆ 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()

◆ UV_OT_select_loop()

◆ UV_OT_select_mode()

◆ 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()

◆ UV_OT_select_split()

void UV_OT_select_split ( wmOperatorType * ot)

◆ UV_OT_shortest_path_pick()

◆ UV_OT_shortest_path_select()

void UV_OT_shortest_path_select ( wmOperatorType * ot)

◆ UV_OT_smart_project()

◆ UV_OT_sphere_project()

◆ UV_OT_stitch()

◆ UV_OT_unwrap()

◆ uvedit_edge_is_face_select_any_other()

bool uvedit_edge_is_face_select_any_other ( const ToolSettings * ts,
const BMesh * bm,
const BMLoop * l,
const BMUVOffsets & offsets )

◆ uvedit_edge_select_get_no_sync()

◆ uvedit_edge_select_set_no_sync()

◆ uvedit_face_select_get_no_sync()

bool uvedit_face_select_get_no_sync ( const ToolSettings * ts,
const BMesh * bm,
const BMFace * f )
nodiscard

◆ uvedit_face_select_set_no_sync()

◆ uvedit_first_selected_uv_from_vertex()

const float * uvedit_first_selected_uv_from_vertex ( Scene * scene,
const BMesh * bm,
BMVert * eve,
const BMUVOffsets & offsets )
Warning
This returns first selected UV, not ideal in many cases since there could be multiple.

Definition at line 2783 of file uvedit_select.cc.

References bm, BM_ELEM_CD_GET_FLOAT_P, BM_ITER_ELEM, BM_LOOPS_OF_VERT, l, BMUVOffsets::uv, uvedit_face_visible_test(), and uvedit_uv_select_test().

◆ uvedit_live_unwrap_update()

◆ uvedit_select_is_any_selected()

◆ uvedit_select_is_any_selected_multi()

bool uvedit_select_is_any_selected_multi ( const Scene * scene,
blender::Span< Object * > objects )

◆ uvedit_select_prepare_custom_data()

◆ uvedit_select_prepare_sync_select()

◆ uvedit_select_prepare_UNUSED()

void uvedit_select_prepare_UNUSED ( const Scene * scene,
BMesh * bm )

◆ uvedit_vert_is_all_other_faces_selected()

bool uvedit_vert_is_all_other_faces_selected ( const ToolSettings * ts,
const BMesh * bm,
const BMLoop * l,
const BMUVOffsets & offsets )

◆ uvedit_vert_is_edge_select_any_other()

◆ uvedit_vert_is_face_select_any_other()

◆ uvedit_vert_select_get_no_sync()

◆ uvedit_vert_select_set_no_sync()