Blender  V3.3
Classes | Functions
ED_uvedit.h File Reference

Go to the source code of this file.

Classes

struct  UVMapUDIM_Params
 
struct  UVPackIsland_Params
 

Functions

void ED_operatortypes_uvedit (void)
 
void ED_operatormacros_uvedit (void)
 
void ED_keymap_uvedit (struct wmKeyConfig *keyconf)
 
bool ED_uvedit_minmax (const struct Scene *scene, struct Object *obedit, float min[2], float max[2])
 
void ED_uvedit_select_all (struct BMesh *bm)
 
bool ED_uvedit_minmax_multi (const struct Scene *scene, struct Object **objects_edit, uint objects_len, float r_min[2], float r_max[2])
 
bool ED_uvedit_center_multi (const struct Scene *scene, struct Object **objects_edit, uint objects_len, float r_cent[2], char mode)
 
bool ED_uvedit_center_from_pivot_ex (struct SpaceImage *sima, struct Scene *scene, struct ViewLayer *view_layer, float r_center[2], char mode, bool *r_has_select)
 
bool ED_uvedit_center_from_pivot (struct SpaceImage *sima, struct Scene *scene, struct ViewLayer *view_layer, float r_center[2], char mode)
 
bool ED_object_get_active_image (struct Object *ob, int mat_nr, struct Image **r_ima, struct ImageUser **r_iuser, struct bNode **r_node, struct bNodeTree **r_ntree)
 
void ED_object_assign_active_image (struct Main *bmain, struct Object *ob, int mat_nr, struct Image *ima)
 
bool ED_uvedit_test (struct Object *obedit)
 
bool uvedit_face_visible_test_ex (const struct ToolSettings *ts, struct BMFace *efa)
 
bool uvedit_face_select_test_ex (const struct ToolSettings *ts, struct BMFace *efa, int cd_loop_uv_offset)
 
bool uvedit_edge_select_test_ex (const struct ToolSettings *ts, struct BMLoop *l, int cd_loop_uv_offset)
 
bool uvedit_uv_select_test_ex (const struct ToolSettings *ts, struct BMLoop *l, int cd_loop_uv_offset)
 
bool uvedit_face_visible_test (const struct Scene *scene, struct BMFace *efa)
 
bool uvedit_face_select_test (const struct Scene *scene, struct BMFace *efa, int cd_loop_uv_offset)
 
bool uvedit_edge_select_test (const struct Scene *scene, struct BMLoop *l, int cd_loop_uv_offset)
 
bool uvedit_uv_select_test (const struct Scene *scene, struct BMLoop *l, int cd_loop_uv_offset)
 
void uvedit_face_select_set (const struct Scene *scene, struct BMEditMesh *em, struct BMFace *efa, bool select, bool do_history, int cd_loop_uv_offset)
 Select UV Face. More...
 
void uvedit_edge_select_set (const struct Scene *scene, struct BMEditMesh *em, struct BMLoop *l, bool select, bool do_history, int cd_loop_uv_offset)
 Select UV Edge. More...
 
void uvedit_uv_select_set (const struct Scene *scene, struct BMEditMesh *em, struct BMLoop *l, bool select, bool do_history, int cd_loop_uv_offset)
 Select UV Vertex. More...
 
void uvedit_face_select_enable (const struct Scene *scene, struct BMEditMesh *em, struct BMFace *efa, bool do_history, int cd_loop_uv_offset)
 
void uvedit_face_select_disable (const struct Scene *scene, struct BMEditMesh *em, struct BMFace *efa, int cd_loop_uv_offset)
 
void uvedit_edge_select_enable (const struct Scene *scene, struct BMEditMesh *em, struct BMLoop *l, bool do_history, int cd_loop_uv_offset)
 
void uvedit_edge_select_disable (const struct Scene *scene, struct BMEditMesh *em, struct BMLoop *l, int cd_loop_uv_offset)
 
void uvedit_uv_select_enable (const struct Scene *scene, struct BMEditMesh *em, struct BMLoop *l, bool do_history, int cd_loop_uv_offset)
 
void uvedit_uv_select_disable (const struct Scene *scene, struct BMEditMesh *em, struct BMLoop *l, int cd_loop_uv_offset)
 
void uvedit_face_select_set_with_sticky (const struct Scene *scene, struct BMEditMesh *em, struct BMFace *efa, bool select, bool do_history, int cd_loop_uv_offset)
 
void uvedit_edge_select_set_with_sticky (const struct Scene *scene, struct BMEditMesh *em, struct BMLoop *l, bool select, bool do_history, uint cd_loop_uv_offset)
 
void uvedit_uv_select_set_with_sticky (const struct Scene *scene, struct BMEditMesh *em, struct BMLoop *l, bool select, bool do_history, uint cd_loop_uv_offset)
 
void uvedit_face_select_shared_vert (const struct Scene *scene, struct BMEditMesh *em, struct BMFace *efa, const bool select, const bool do_history, const int cd_loop_uv_offset)
 
void uvedit_edge_select_shared_vert (const struct Scene *scene, struct BMEditMesh *em, struct BMLoop *l, const bool select, const int sticky_flag, const bool do_history, const int cd_loop_uv_offset)
 
void uvedit_uv_select_shared_vert (const struct Scene *scene, struct BMEditMesh *em, struct 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 struct Scene *scene, struct BMLoop *l, const bool select, const int sticky_flag, const int cd_loop_uv_offset)
 
void ED_uvedit_selectmode_clean (const struct Scene *scene, struct Object *obedit)
 UV Select Mode set. More...
 
void ED_uvedit_selectmode_clean_multi (struct bContext *C)
 
void ED_uvedit_selectmode_flush (const struct Scene *scene, struct BMEditMesh *em)
 UV Select Mode Flush. More...
 
void uvedit_deselect_flush (const struct Scene *scene, struct BMEditMesh *em)
 
void uvedit_select_flush (const struct Scene *scene, struct BMEditMesh *em)
 
bool ED_uvedit_nearest_uv_multi (const struct View2D *v2d, const struct Scene *scene, struct Object **objects, uint objects_len, const int mval[2], const bool ignore_selected, float *dist_sq, float r_uv[2])
 
struct BMFace ** ED_uvedit_selected_faces (const struct Scene *scene, struct BMesh *bm, int len_max, int *r_faces_len)
 
struct BMLoop ** ED_uvedit_selected_edges (const struct Scene *scene, struct BMesh *bm, int len_max, int *r_edges_len)
 
struct BMLoop ** ED_uvedit_selected_verts (const struct Scene *scene, struct BMesh *bm, int len_max, int *r_verts_len)
 
void ED_uvedit_get_aspect (struct Object *obedit, float *r_aspx, float *r_aspy)
 
void ED_uvedit_get_aspect_from_material (Object *ob, const int material_index, float *r_aspx, float *r_aspy)
 
void ED_uvedit_active_vert_loop_set (struct BMesh *bm, struct BMLoop *l)
 
struct BMLoopED_uvedit_active_vert_loop_get (struct BMesh *bm)
 
void ED_uvedit_active_edge_loop_set (struct BMesh *bm, struct BMLoop *l)
 
struct BMLoopED_uvedit_active_edge_loop_get (struct BMesh *bm)
 
char ED_uvedit_select_mode_get (const struct Scene *scene)
 
void ED_uvedit_select_sync_flush (const struct ToolSettings *ts, struct BMEditMesh *em, bool select)
 
void ED_uvedit_live_unwrap_begin (struct Scene *scene, struct Object *obedit)
 
void ED_uvedit_live_unwrap_re_solve (void)
 
void ED_uvedit_live_unwrap_end (short cancel)
 
void ED_uvedit_live_unwrap (const struct Scene *scene, struct Object **objects, int objects_len)
 
void ED_uvedit_add_simple_uvs (struct Main *bmain, const struct Scene *scene, struct Object *ob)
 
void ED_image_draw_cursor (struct ARegion *region, const float cursor[2])
 
void ED_uvedit_buttons_register (struct ARegionType *art)
 
bool ED_uvedit_udim_params_from_image_space (const struct SpaceImage *sima, bool use_active, struct UVMapUDIM_Params *udim_params)
 
bool uv_coords_isect_udim (const struct Image *image, const int udim_grid[2], const float coords[2])
 
void ED_uvedit_pack_islands_multi (const struct Scene *scene, Object **objects, uint objects_len, const struct UVMapUDIM_Params *udim_params, const struct UVPackIsland_Params *params)
 

Function Documentation

◆ ED_image_draw_cursor()

void ED_image_draw_cursor ( struct ARegion region,
const float  cursor[2] 
)

◆ ED_keymap_uvedit()

void ED_keymap_uvedit ( struct wmKeyConfig keyconf)

Definition at line 2123 of file uvedit_ops.c.

References ED_operator_uvedit(), wmKeyMap::poll, and WM_keymap_ensure().

Referenced by ED_spacetypes_keymap().

◆ ED_object_assign_active_image()

void ED_object_assign_active_image ( struct Main bmain,
struct Object ob,
int  mat_nr,
struct Image ima 
)

◆ ED_object_get_active_image()

bool ED_object_get_active_image ( struct Object ob,
int  mat_nr,
struct Image **  r_ima,
struct ImageUser **  r_iuser,
struct bNode **  r_node,
struct bNodeTree **  r_ntree 
)

◆ ED_operatormacros_uvedit()

void ED_operatormacros_uvedit ( void  )

◆ ED_operatortypes_uvedit()

void ED_operatortypes_uvedit ( void  )

◆ ED_uvedit_active_edge_loop_get()

struct BMLoop* ED_uvedit_active_edge_loop_get ( struct BMesh bm)

◆ ED_uvedit_active_edge_loop_set()

void ED_uvedit_active_edge_loop_set ( struct BMesh bm,
struct BMLoop l 
)

◆ ED_uvedit_active_vert_loop_get()

struct BMLoop* ED_uvedit_active_vert_loop_get ( struct BMesh bm)

◆ ED_uvedit_active_vert_loop_set()

void ED_uvedit_active_vert_loop_set ( struct BMesh bm,
struct BMLoop l 
)

◆ ED_uvedit_add_simple_uvs()

void ED_uvedit_add_simple_uvs ( struct Main bmain,
const struct Scene scene,
struct Object ob 
)

Referenced by add_simple_uvs_exec().

◆ ED_uvedit_buttons_register()

void ED_uvedit_buttons_register ( struct ARegionType art)

◆ ED_uvedit_center_from_pivot()

bool ED_uvedit_center_from_pivot ( struct SpaceImage sima,
struct Scene scene,
struct ViewLayer view_layer,
float  r_center[2],
char  mode 
)

Definition at line 353 of file uvedit_ops.c.

References ED_uvedit_center_from_pivot_ex(), NULL, and scene.

◆ ED_uvedit_center_from_pivot_ex()

bool ED_uvedit_center_from_pivot_ex ( struct SpaceImage sima,
struct Scene scene,
struct ViewLayer view_layer,
float  r_center[2],
char  mode,
bool r_has_select 
)

◆ ED_uvedit_center_multi()

bool ED_uvedit_center_multi ( const struct Scene scene,
struct Object **  objects_edit,
uint  objects_len,
float  r_cent[2],
char  mode 
)

◆ ED_uvedit_get_aspect()

void ED_uvedit_get_aspect ( struct Object obedit,
float r_aspx,
float r_aspy 
)

◆ ED_uvedit_get_aspect_from_material()

void ED_uvedit_get_aspect_from_material ( Object ob,
const int  material_index,
float r_aspx,
float r_aspy 
)

◆ ED_uvedit_live_unwrap()

void ED_uvedit_live_unwrap ( const struct Scene scene,
struct Object **  objects,
int  objects_len 
)

◆ ED_uvedit_live_unwrap_begin()

void ED_uvedit_live_unwrap_begin ( struct Scene scene,
struct Object obedit 
)

◆ ED_uvedit_live_unwrap_end()

void ED_uvedit_live_unwrap_end ( short  cancel)

◆ ED_uvedit_live_unwrap_re_solve()

void ED_uvedit_live_unwrap_re_solve ( void  )

◆ ED_uvedit_minmax()

bool ED_uvedit_minmax ( const struct Scene scene,
struct Object obedit,
float  min[2],
float  max[2] 
)

◆ ED_uvedit_minmax_multi()

bool ED_uvedit_minmax_multi ( const struct Scene scene,
struct Object **  objects_edit,
uint  objects_len,
float  r_min[2],
float  r_max[2] 
)

◆ ED_uvedit_nearest_uv_multi()

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

Referenced by snap_calc_uv_fn().

◆ ED_uvedit_pack_islands_multi()

void ED_uvedit_pack_islands_multi ( const struct Scene scene,
Object **  objects,
uint  objects_len,
const struct UVMapUDIM_Params udim_params,
const struct UVPackIsland_Params params 
)

◆ ED_uvedit_select_all()

void ED_uvedit_select_all ( struct BMesh bm)

Be careful when using this, it bypasses all synchronization options.

Definition at line 240 of file uvedit_ops.c.

References bm, BM_ELEM_CD_GET_VOID_P, BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOPS_OF_FACE, CD_MLOOPUV, CustomData_get_offset(), MLoopUV::flag, l, BMesh::ldata, MLOOPUV_EDGESEL, and MLOOPUV_VERTSEL.

Referenced by ED_uvedit_add_simple_uvs().

◆ ED_uvedit_select_mode_get()

char ED_uvedit_select_mode_get ( const struct Scene scene)

Intentionally don't return UV_SELECT_ISLAND as it's not an element type. In this case return UV_SELECT_VERTEX as a fallback.

Referenced by uv_shortest_path_pick_ex(), uv_shortest_path_pick_exec(), uv_shortest_path_pick_invoke(), and uv_shortest_path_select_exec().

◆ ED_uvedit_select_sync_flush()

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

◆ ED_uvedit_selected_edges()

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

◆ ED_uvedit_selected_faces()

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

◆ ED_uvedit_selected_verts()

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

◆ ED_uvedit_selectmode_clean()

void ED_uvedit_selectmode_clean ( const struct Scene scene,
struct Object obedit 
)

UV Select Mode set.

Updates selection state for UVs based on the select mode and sticky mode. Similar to EDBM_selectmode_set.

◆ ED_uvedit_selectmode_clean_multi()

void ED_uvedit_selectmode_clean_multi ( struct bContext C)

◆ ED_uvedit_selectmode_flush()

void ED_uvedit_selectmode_flush ( const struct Scene scene,
struct BMEditMesh em 
)

UV Select Mode Flush.

Flushes selections upwards as dictated by the UV select mode.

Referenced by uv_shortest_path_pick_ex().

◆ ED_uvedit_test()

bool ED_uvedit_test ( struct Object obedit)

◆ ED_uvedit_udim_params_from_image_space()

bool ED_uvedit_udim_params_from_image_space ( const struct SpaceImage sima,
bool  use_active,
struct UVMapUDIM_Params udim_params 
)

◆ uv_coords_isect_udim()

bool uv_coords_isect_udim ( const struct Image image,
const int  udim_grid[2],
const float  coords[2] 
)

Returns true if UV coordinates lie on a valid tile in UDIM grid or tiled image.

Referenced by ED_uvedit_udim_params_from_image_space().

◆ uvedit_deselect_flush()

void uvedit_deselect_flush ( const struct Scene scene,
struct BMEditMesh em 
)

Mode independent UV de-selection flush.

Referenced by uv_rip_object().

◆ uvedit_edge_select_disable()

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

◆ uvedit_edge_select_enable()

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

◆ uvedit_edge_select_set()

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

Select UV Edge.

Changes selection state of a single UV Edge.

◆ uvedit_edge_select_set_noflush()

void uvedit_edge_select_set_noflush ( const struct Scene scene,
struct 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 struct Scene scene,
struct BMEditMesh em,
struct BMLoop l,
bool  select,
bool  do_history,
uint  cd_loop_uv_offset 
)

Referenced by edgetag_set_cb().

◆ uvedit_edge_select_shared_vert()

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

◆ uvedit_edge_select_test()

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

◆ uvedit_edge_select_test_ex()

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

◆ uvedit_face_select_disable()

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

Referenced by uv_hide_exec().

◆ uvedit_face_select_enable()

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

◆ uvedit_face_select_set()

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

Select UV Face.

Changes selection state of a single UV Face.

◆ uvedit_face_select_set_with_sticky()

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

Referenced by facetag_set_cb().

◆ uvedit_face_select_shared_vert()

void uvedit_face_select_shared_vert ( const struct Scene scene,
struct BMEditMesh em,
struct 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 struct Scene scene,
struct BMFace efa,
int  cd_loop_uv_offset 
)

Referenced by bm_mesh_calc_uv_islands().

◆ uvedit_face_select_test_ex()

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

◆ uvedit_face_visible_test()

bool uvedit_face_visible_test ( const struct Scene scene,
struct BMFace efa 
)

◆ uvedit_face_visible_test_ex()

bool uvedit_face_visible_test_ex ( const struct ToolSettings ts,
struct BMFace efa 
)

◆ uvedit_select_flush()

void uvedit_select_flush ( const struct Scene scene,
struct BMEditMesh em 
)

Mode independent UV selection flush.

◆ uvedit_uv_select_disable()

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

Referenced by uv_rip_object().

◆ uvedit_uv_select_enable()

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

◆ uvedit_uv_select_set()

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

Select UV Vertex.

Changes selection state of a single UV vertex.

Referenced by verttag_set_cb().

◆ uvedit_uv_select_set_with_sticky()

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

◆ uvedit_uv_select_shared_vert()

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

◆ uvedit_uv_select_test()

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

◆ uvedit_uv_select_test_ex()

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