Blender V4.3
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 Scene *scene, BMLoop *l, BMUVOffsets offsets)
 
bool uvedit_vert_is_face_select_any_other (const Scene *scene, BMLoop *l, BMUVOffsets offsets)
 
bool uvedit_vert_is_all_other_faces_selected (const Scene *scene, BMLoop *l, BMUVOffsets offsets)
 
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 (wmOperatorType *ot)
 
void UV_OT_paste (wmOperatorType *ot)
 
void UV_OT_shortest_path_pick (wmOperatorType *ot)
 
void UV_OT_shortest_path_select (wmOperatorType *ot)
 
bool uvedit_select_is_any_selected (const Scene *scene, Object *obedit)
 
bool uvedit_select_is_any_selected_multi (const Scene *scene, blender::Span< Object * > objects)
 
const floatuvedit_first_selected_uv_from_vertex (Scene *scene, BMVert *eve, 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_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 946 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 903 of file uvedit_select.cc.

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_PROP_FLOAT2, CustomData_get_offset(), BMesh::ldata, len_squared_v2(), mul_v2_v2(), 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 )

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

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

◆ UV_OT_copy()

◆ UV_OT_cube_project()

◆ UV_OT_cylinder_project()

◆ UV_OT_minimize_stretch()

◆ UV_OT_pack_islands()

◆ UV_OT_paste()

◆ UV_OT_project_from_view()

◆ UV_OT_reset()

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

◆ UV_OT_select_linked()

◆ UV_OT_select_linked_pick()

◆ UV_OT_select_loop()

◆ UV_OT_select_mode()

◆ UV_OT_select_more()

◆ UV_OT_select_overlap()

◆ UV_OT_select_pinned()

◆ UV_OT_select_similar()

◆ UV_OT_select_split()

◆ UV_OT_shortest_path_pick()

◆ UV_OT_shortest_path_select()

◆ UV_OT_smart_project()

◆ UV_OT_sphere_project()

◆ UV_OT_stitch()

◆ UV_OT_unwrap()

◆ uvedit_first_selected_uv_from_vertex()

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

Definition at line 2015 of file uvedit_select.cc.

References BM_ELEM_CD_GET_FLOAT_P, BM_ITER_ELEM, BM_LOOPS_OF_VERT, BMLoop::f, 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_vert_is_all_other_faces_selected()

bool uvedit_vert_is_all_other_faces_selected ( const Scene * scene,
BMLoop * l,
BMUVOffsets offsets )

◆ uvedit_vert_is_edge_select_any_other()

◆ uvedit_vert_is_face_select_any_other()