Blender
V3.3
|
#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_mesh_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_array.h"
#include "BLI_kdtree.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BLT_translation.h"
#include "BKE_context.h"
#include "BKE_customdata.h"
#include "BKE_editmesh.h"
#include "BKE_layer.h"
#include "BKE_main.h"
#include "BKE_material.h"
#include "BKE_mesh_mapping.h"
#include "BKE_node.h"
#include "DEG_depsgraph.h"
#include "ED_image.h"
#include "ED_mesh.h"
#include "ED_node.h"
#include "ED_screen.h"
#include "ED_uvedit.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "WM_api.h"
#include "WM_message.h"
#include "WM_types.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "UI_view2d.h"
#include "uvedit_intern.h"
Go to the source code of this file.
Hide Operator | |
#define | UV_VERT_SEL_TEST(luv, bool_test) ((((luv)->flag & MLOOPUV_VERTSEL) == MLOOPUV_VERTSEL) == bool_test) |
#define | UV_EDGE_SEL_TEST(luv, bool_test) ((((luv)->flag & MLOOPUV_EDGESEL) == MLOOPUV_EDGESEL) == bool_test) |
static bool | bm_face_is_all_uv_sel (BMFace *f, bool select_test, const int cd_loop_uv_offset) |
static int | uv_hide_exec (bContext *C, wmOperator *op) |
static void | UV_OT_hide (wmOperatorType *ot) |
#define UV_EDGE_SEL_TEST | ( | luv, | |
bool_test | |||
) | ((((luv)->flag & MLOOPUV_EDGESEL) == MLOOPUV_EDGESEL) == bool_test) |
Definition at line 1435 of file uvedit_ops.c.
#define UV_VERT_SEL_TEST | ( | luv, | |
bool_test | |||
) | ((((luv)->flag & MLOOPUV_VERTSEL) == MLOOPUV_VERTSEL) == bool_test) |
Definition at line 1432 of file uvedit_ops.c.
typedef enum eUVEndPointPrecedence eUVEndPointPrecedence |
Bitwise-or together, then choose MLoopUV with highest value.
typedef enum eUVWeldAlign eUVWeldAlign |
Bitwise-or together, then choose MLoopUV with highest value.
Enumerator | |
---|---|
UVEP_INVALID | |
UVEP_SELECTED | |
UVEP_PINNED |
Definition at line 415 of file uvedit_ops.c.
enum eUVWeldAlign |
Enumerator | |
---|---|
UV_STRAIGHTEN | |
UV_STRAIGHTEN_X | |
UV_STRAIGHTEN_Y | |
UV_ALIGN_AUTO | |
UV_ALIGN_X | |
UV_ALIGN_Y | |
UV_WELD |
Definition at line 365 of file uvedit_ops.c.
|
static |
Definition at line 1439 of file uvedit_ops.c.
References BM_ELEM_CD_GET_VOID_P, BM_FACE_FIRST_LOOP, BMLoop::next, and UV_EDGE_SEL_TEST.
Referenced by uv_hide_exec().
void ED_keymap_uvedit | ( | 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().
Definition at line 160 of file uvedit_ops.c.
References BKE_object_material_get(), ED_node_tree_propagate_change(), Image::id, is_image_texture_node(), node, nodeGetActiveTexture(), Material::nodetree, NULL, and Material::use_nodes.
bool ED_object_get_active_image | ( | Object * | ob, |
int | mat_nr, | ||
Image ** | r_ima, | ||
ImageUser ** | r_iuser, | ||
bNode ** | r_node, | ||
bNodeTree ** | r_ntree | ||
) |
Definition at line 109 of file uvedit_ops.c.
References BKE_object_material_get(), is_image_texture_node(), node, nodeGetActiveTexture(), Material::nodetree, ntree, NULL, SH_NODE_TEX_ENVIRONMENT, SH_NODE_TEX_IMAGE, and Material::use_nodes.
Referenced by bake_object_check(), bake_object_image_get(), bake_targets_init_image_textures(), ED_space_image_auto_set(), ED_uvedit_get_aspect_from_material(), and workbench_material_get_image().
|
static |
Definition at line 83 of file uvedit_ops.c.
References C, CD_MLOOPUV, CTX_data_active_object(), CustomData_get_layer(), Object::data, Mesh::ldata, NULL, OB_MESH, and Object::type.
Definition at line 2108 of file uvedit_ops.c.
References OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorTypeMacro::ptr, RNA_boolean_set(), WM_operatortype_append_macro(), and WM_operatortype_macro_define().
Referenced by ED_spacemacros_init().
Definition at line 2055 of file uvedit_ops.c.
References UV_OT_align(), UV_OT_average_islands_scale(), UV_OT_cube_project(), UV_OT_cursor_set(), UV_OT_cylinder_project(), UV_OT_hide(), UV_OT_mark_seam(), UV_OT_minimize_stretch(), UV_OT_pack_islands(), UV_OT_pin(), UV_OT_project_from_view(), UV_OT_remove_doubles(), UV_OT_reset(), UV_OT_reveal(), UV_OT_rip(), UV_OT_seams_from_islands(), 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_snap_cursor(), UV_OT_snap_selected(), UV_OT_sphere_project(), UV_OT_stitch(), UV_OT_unwrap(), UV_OT_weld(), and WM_operatortype_append().
Referenced by ED_spacetypes_init().
bool ED_uvedit_center_from_pivot | ( | SpaceImage * | sima, |
Scene * | scene, | ||
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.
bool ED_uvedit_center_from_pivot_ex | ( | SpaceImage * | sima, |
Scene * | scene, | ||
ViewLayer * | view_layer, | ||
float | r_center[2], | ||
char | mode, | ||
bool * | r_has_select | ||
) |
Definition at line 317 of file uvedit_ops.c.
References BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs, copy_v2_v2(), SpaceImage::cursor, ED_uvedit_center_multi(), MEM_freeN, NULL, scene, uvedit_select_is_any_selected_multi(), and V3D_AROUND_CURSOR.
Referenced by ED_uvedit_center_from_pivot(), and gizmo2d_calc_transform_pivot().
bool ED_uvedit_center_multi | ( | const Scene * | scene, |
Object ** | objects_edit, | ||
uint | objects_len, | ||
float | cent[2], | ||
char | mode | ||
) |
Definition at line 296 of file uvedit_ops.c.
References ED_uvedit_median_multi(), ED_uvedit_minmax_multi(), max, mid_v2_v2v2(), min, scene, and V3D_AROUND_CENTER_BOUNDS.
Referenced by ED_uvedit_center_from_pivot_ex(), uv_snap_cursor_to_selection(), uv_snap_selection_exec(), and uv_weld_align().
|
static |
Definition at line 257 of file uvedit_ops.c.
References add_v2_v2(), BKE_editmesh_from_object(), BMEditMesh::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(), l, BMesh::ldata, mul_v2_fl(), scene, MLoopUV::uv, uvedit_face_visible_test(), uvedit_uv_select_test(), and zero_v2().
Referenced by ED_uvedit_center_multi().
Definition at line 235 of file uvedit_ops.c.
References ED_uvedit_minmax_multi(), and scene.
bool ED_uvedit_minmax_multi | ( | const Scene * | scene, |
Object ** | objects_edit, | ||
uint | objects_len, | ||
float | r_min[2], | ||
float | r_max[2] | ||
) |
Definition at line 201 of file uvedit_ops.c.
References BKE_editmesh_from_object(), BMEditMesh::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(), INIT_MINMAX2, l, BMesh::ldata, minmax_v2v2_v2(), scene, MLoopUV::uv, uvedit_face_visible_test(), and uvedit_uv_select_test().
Referenced by ED_uvedit_center_multi(), and ED_uvedit_minmax().
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().
Definition at line 64 of file uvedit_ops.c.
References BKE_editmesh_from_object(), EDBM_uv_check(), OB_MESH, ret, and Object::type.
Referenced by ED_uvedit_ensure_uvs(), ED_uvedit_live_unwrap_begin(), and image_panel_uv_poll().
Definition at line 104 of file uvedit_ops.c.
References ELEM, node, SH_NODE_TEX_ENVIRONMENT, and SH_NODE_TEX_IMAGE.
Referenced by ED_object_assign_active_image(), and ED_object_get_active_image().
|
static |
Definition at line 642 of file uvedit_ops.c.
References C, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), and uv_weld_align().
Referenced by UV_OT_align().
|
static |
Definition at line 1455 of file uvedit_ops.c.
References BKE_editmesh_from_object(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs, BMEditMesh::bm, BM_edge_select_set(), BM_ELEM_CD_GET_VOID_P, bm_face_is_all_uv_sel(), BM_face_select_set(), BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOPS_OF_FACE, BM_mesh_select_mode_flush(), BM_select_history_validate(), BM_vert_select_set(), C, CD_MLOOPUV, CTX_data_scene(), CTX_data_view_layer(), CustomData_get_offset(), Object::data, DEG_id_tag_update(), BMLoop::e, EDBM_mesh_hide(), EDBM_update(), ID_RECALC_SELECT, l, BMesh::ldata, MEM_freeN, NC_GEOM, ND_SELECT, BMLoop::next, NULL, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), SCE_SELECT_EDGE, SCE_SELECT_FACE, SCE_SELECT_VERTEX, scene, BMEditMesh::selectmode, swap(), Scene::toolsettings, UV_EDGE_SEL_TEST, ToolSettings::uv_flag, UV_SELECT_EDGE, UV_SELECT_FACE, UV_SELECT_ISLAND, UV_SELECT_VERTEX, ToolSettings::uv_selectmode, UV_SYNC_SELECTION, UV_VERT_SEL_TEST, uvedit_face_select_disable(), uvedit_face_visible_test(), BMLoop::v, and WM_event_add_notifier().
Referenced by UV_OT_hide().
|
static |
Definition at line 1943 of file uvedit_ops.c.
References BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs, bm, BM_elem_flag_set, BM_ELEM_SEAM, BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOPS_OF_FACE, C, CD_MLOOPUV, CTX_data_scene(), CTX_data_view_layer(), CustomData_get_offset(), Object::data, DEG_id_tag_update(), BMLoop::e, ED_uvedit_live_unwrap(), Mesh::edit_mesh, Mesh::id, if(), BMesh::ldata, MEM_freeN, NC_GEOM, ND_DATA, NULL, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), scene, Scene::toolsettings, BMesh::totedgesel, ToolSettings::uv_flag, UV_SYNC_SELECTION, uvedit_edge_select_test(), uvedit_face_visible_test(), and WM_event_add_notifier().
Referenced by uv_mark_seam_invoke(), and UV_OT_mark_seam().
|
static |
Definition at line 2000 of file uvedit_ops.c.
References BLT_I18NCONTEXT_OPERATOR_DEFAULT, C, CTX_IFACE_, wmOperatorType::idname, IFACE_, OPERATOR_INTERFACE, wmOperator::ptr, RNA_struct_property_is_set(), wmOperator::type, UI_popup_menu_begin(), UI_popup_menu_end(), UI_popup_menu_layout(), uiItemBooleanO(), uiLayoutSetOperatorContext(), uv_mark_seam_exec(), and WM_OP_EXEC_DEFAULT.
Referenced by UV_OT_mark_seam().
|
static |
Definition at line 649 of file uvedit_ops.c.
References wmOperatorType::description, ED_operator_uvedit(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, NULL, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_enum(), wmOperatorType::srna, UV_ALIGN_AUTO, uv_align_exec(), UV_ALIGN_X, UV_ALIGN_Y, UV_STRAIGHTEN, UV_STRAIGHTEN_X, and UV_STRAIGHTEN_Y.
Referenced by ED_operatortypes_uvedit().
|
static |
Definition at line 1812 of file uvedit_ops.c.
References wmOperatorType::description, ED_space_image_cursor_poll(), wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, NULL, ot, wmOperatorType::poll, RNA_def_float_vector(), wmOperatorType::srna, uv_set_2d_cursor_exec(), and uv_set_2d_cursor_invoke().
Referenced by ED_operatortypes_uvedit().
|
static |
Definition at line 1604 of file uvedit_ops.c.
References wmOperatorType::description, ED_operator_uvedit(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), wmOperatorType::srna, and uv_hide_exec().
Referenced by ED_operatortypes_uvedit().
|
static |
Definition at line 2031 of file uvedit_ops.c.
References wmOperatorType::description, ED_operator_uvedit(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), wmOperatorType::srna, uv_mark_seam_exec(), and uv_mark_seam_invoke().
Referenced by ED_operatortypes_uvedit().
|
static |
Definition at line 1406 of file uvedit_ops.c.
References wmOperatorType::description, ED_operator_uvedit(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), wmOperatorType::srna, and uv_pin_exec().
Referenced by ED_operatortypes_uvedit().
|
static |
Definition at line 959 of file uvedit_ops.c.
References wmOperatorType::description, ED_operator_uvedit(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), RNA_def_float(), wmOperatorType::srna, and uv_remove_doubles_exec().
Referenced by ED_operatortypes_uvedit().
|
static |
Definition at line 1750 of file uvedit_ops.c.
References wmOperatorType::description, ED_operator_uvedit(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), wmOperatorType::srna, and uv_reveal_exec().
Referenced by ED_operatortypes_uvedit().
|
static |
Definition at line 1919 of file uvedit_ops.c.
References wmOperatorType::description, ED_operator_uvedit(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), wmOperatorType::srna, and uv_seams_from_islands_exec().
Referenced by ED_operatortypes_uvedit().
|
static |
Definition at line 1082 of file uvedit_ops.c.
References wmOperatorType::description, ED_operator_uvedit_space_image(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, NULL, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_enum(), wmOperatorType::srna, and uv_snap_cursor_exec().
Referenced by ED_operatortypes_uvedit().
|
static |
Definition at line 1318 of file uvedit_ops.c.
References wmOperatorType::description, ED_operator_uvedit_space_image(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, NULL, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_enum(), wmOperatorType::srna, and uv_snap_selection_exec().
Referenced by ED_operatortypes_uvedit().
|
static |
Definition at line 998 of file uvedit_ops.c.
References wmOperatorType::description, ED_operator_uvedit(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, and uv_weld_exec().
Referenced by ED_operatortypes_uvedit().
|
static |
Definition at line 1349 of file uvedit_ops.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_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOPS_OF_FACE, C, CD_MLOOPUV, clear(), CTX_data_scene(), CTX_data_view_layer(), CustomData_get_offset(), Object::data, DEG_id_tag_update(), MLoopUV::flag, ID_RECALC_COPY_ON_WRITE, l, BMesh::ldata, MEM_freeN, MLOOPUV_PINNED, NC_GEOM, ND_DATA, NULL, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), scene, Scene::toolsettings, BMesh::totvertsel, ToolSettings::uv_flag, UV_SYNC_SELECTION, uvedit_face_visible_test(), uvedit_uv_select_test(), and WM_event_add_notifier().
Referenced by UV_OT_pin().
Definition at line 192 of file uvedit_ops.c.
References len.
|
static |
Definition at line 951 of file uvedit_ops.c.
References C, wmOperator::ptr, RNA_boolean_get(), uv_remove_doubles_to_selected(), and uv_remove_doubles_to_unselected().
Referenced by UV_OT_remove_doubles().
|
static |
Definition at line 698 of file uvedit_ops.c.
References add_v2_v2(), BKE_editmesh_from_object(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs, BLI_array_append, BLI_array_declare, BLI_array_free, BMEditMesh::bm, BM_ELEM_CD_GET_VOID_P, BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOPS_OF_FACE, C, CD_MLOOPUV, copy_v2_v2(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_space_image(), CustomData_get_offset(), Object::data, DEG_id_tag_update(), l, BMesh::ldata, MEM_callocN, MEM_freeN, mul_v2_fl(), NC_GEOM, ND_DATA, NULL, OPERATOR_FINISHED, wmOperator::ptr, RNA_float_get(), scene, threshold, Scene::toolsettings, BMesh::totloop, BMesh::totvertsel, tree, MLoopUV::uv, ToolSettings::uv_flag, UV_SYNC_SELECTION, uvedit_face_visible_test(), uvedit_live_unwrap_update(), uvedit_uv_select_test(), and WM_event_add_notifier().
Referenced by uv_remove_doubles_exec().
|
static |
Definition at line 842 of file uvedit_ops.c.
References BKE_editmesh_from_object(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs, BLI_array_append, BLI_array_declare, BLI_array_free, BMEditMesh::bm, BM_ELEM_CD_GET_VOID_P, BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOPS_OF_FACE, C, CD_MLOOPUV, copy_v2_v2(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_space_image(), CustomData_get_offset(), Object::data, DEG_id_tag_update(), l, BMesh::ldata, MEM_freeN, NC_GEOM, ND_DATA, NULL, OPERATOR_FINISHED, wmOperator::ptr, RNA_float_get(), scene, threshold, Scene::toolsettings, BMesh::totloop, BMesh::totvert, BMesh::totvertsel, tree, MLoopUV::uv, ToolSettings::uv_flag, UV_SYNC_SELECTION, uvedit_face_visible_test(), uvedit_live_unwrap_update(), uvedit_uv_select_test(), and WM_event_add_notifier().
Referenced by uv_remove_doubles_exec().
|
static |
Definition at line 1626 of file uvedit_ops.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_flag_test, BM_ELEM_HIDDEN, BM_ELEM_SELECT, BM_ELEM_TAG, BM_FACE, BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOPS_OF_FACE, BM_mesh_elem_hflag_enable_test(), C, CD_MLOOPUV, CTX_data_scene(), CTX_data_view_layer(), CustomData_get_offset(), Object::data, DEG_id_tag_update(), BMLoop::e, EDBM_mesh_reveal(), EDBM_update(), MLoopUV::flag, ID_RECALC_SELECT, l, BMesh::ldata, MEM_freeN, MLOOPUV_EDGESEL, MLOOPUV_VERTSEL, NC_GEOM, ND_SELECT, NULL, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), SCE_SELECT_EDGE, SCE_SELECT_FACE, SCE_SELECT_VERTEX, scene, select(), BMEditMesh::selectmode, SET_FLAG_FROM_TEST, Scene::toolsettings, ToolSettings::uv_flag, UV_SELECT_FACE, ToolSettings::uv_selectmode, UV_SYNC_SELECTION, BMLoop::v, and WM_event_add_notifier().
Referenced by UV_OT_reveal().
|
static |
Definition at line 1843 of file uvedit_ops.c.
References BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs, bm, BM_elem_flag_disable, BM_elem_flag_enable, BM_ELEM_SEAM, BM_ELEM_SMOOTH, BM_FACE_FIRST_LOOP, BM_FACES_OF_MESH, BM_ITER_MESH, BM_loop_uv_share_edge_check(), C, CD_MLOOPUV, CTX_data_scene(), CTX_data_view_layer(), CustomData_get_offset(), Object::data, DEG_id_tag_update(), BMLoop::e, EDBM_uv_check(), Mesh::edit_mesh, Mesh::id, if(), BMesh::ldata, MEM_freeN, NC_GEOM, ND_DATA, BMLoop::next, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, BMLoop::radial_next, RNA_boolean_get(), scene, uvedit_edge_select_test(), uvedit_face_visible_test(), and WM_event_add_notifier().
Referenced by UV_OT_seams_from_islands().
|
static |
Definition at line 1771 of file uvedit_ops.c.
References C, CTX_wm_message_bus(), CTX_wm_screen(), CTX_wm_space_image(), SpaceImage::cursor, bScreen::id, NC_SPACE, ND_SPACE_IMAGE, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, wmOperator::ptr, RNA_float_get_array(), WM_event_add_notifier(), and WM_msg_publish_rna_prop.
Referenced by UV_OT_cursor_set(), and uv_set_2d_cursor_invoke().
|
static |
Definition at line 1793 of file uvedit_ops.c.
References C, CTX_wm_region(), CTX_wm_space_image(), ED_space_image_show_cache_and_mval_over(), wmEvent::mval, OPERATOR_PASS_THROUGH, wmOperator::ptr, ARegion::regiontype, RGN_TYPE_WINDOW, RNA_float_set_array(), UI_view2d_region_to_view(), uv_set_2d_cursor_exec(), and ARegion::v2d.
Referenced by UV_OT_cursor_set().
|
static |
Definition at line 1045 of file uvedit_ops.c.
References BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs, C, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_space_image(), SpaceImage::cursor, MEM_freeN, NC_SPACE, ND_SPACE_IMAGE, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), scene, uv_snap_cursor_to_origin(), uv_snap_cursor_to_pixels(), uv_snap_cursor_to_selection(), and WM_event_add_notifier().
Referenced by UV_OT_snap_cursor().
Definition at line 1039 of file uvedit_ops.c.
Referenced by uv_snap_cursor_exec().
|
static |
Definition at line 1023 of file uvedit_ops.c.
References SpaceImage::cursor, ED_space_image_get_size(), height, uv_snap_to_pixel(), and width.
Referenced by uv_snap_cursor_exec().
|
static |
Definition at line 1031 of file uvedit_ops.c.
References SpaceImage::around, SpaceImage::cursor, ED_uvedit_center_multi(), and scene.
Referenced by uv_snap_cursor_exec().
|
static |
Definition at line 1258 of file uvedit_ops.c.
References SpaceImage::around, BKE_editmesh_from_object(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs, BMEditMesh::bm, C, center, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_space_image(), SpaceImage::cursor, Object::data, DEG_id_tag_update(), ED_uvedit_center_multi(), MEM_freeN, NC_GEOM, ND_DATA, NULL, offset, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), scene, sub_v2_v2v2(), Scene::toolsettings, BMesh::totvertsel, ToolSettings::uv_flag, uv_snap_uvs_offset(), uv_snap_uvs_to_adjacent_unselected(), uv_snap_uvs_to_cursor(), uv_snap_uvs_to_pixels(), UV_SYNC_SELECTION, uvedit_live_unwrap_update(), and WM_event_add_notifier().
Referenced by UV_OT_snap_selected().
Definition at line 1017 of file uvedit_ops.c.
References w().
Referenced by uv_snap_cursor_to_pixels(), and uv_snap_uvs_to_pixels().
Definition at line 1140 of file uvedit_ops.c.
References add_v2_v2(), BKE_editmesh_from_object(), BMEditMesh::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(), l, BMesh::ldata, offset, scene, MLoopUV::uv, uvedit_face_visible_test(), and uvedit_uv_select_test().
Referenced by uv_snap_selection_exec().
Definition at line 1168 of file uvedit_ops.c.
References add_v2_v2(), BKE_editmesh_from_object(), BMEditMesh::bm, bm, BM_ELEM_CD_GET_VOID_P, BM_elem_flag_disable, BM_elem_flag_enable, BM_elem_flag_set, BM_elem_flag_test, BM_ELEM_TAG, BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOPS_OF_FACE, BM_LOOPS_OF_VERT, CD_MLOOPUV, CustomData_get_offset(), BMLoop::f, l, BMesh::ldata, mul_v2_v2fl(), scene, MLoopUV::uv, uvedit_face_visible_test(), uvedit_uv_select_test(), and BMLoop::v.
Referenced by uv_snap_selection_exec().
Definition at line 1112 of file uvedit_ops.c.
References BKE_editmesh_from_object(), BMEditMesh::bm, BM_ELEM_CD_GET_VOID_P, BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOPS_OF_FACE, CD_MLOOPUV, copy_v2_v2(), CustomData_get_offset(), l, BMesh::ldata, scene, MLoopUV::uv, uvedit_face_visible_test(), and uvedit_uv_select_test().
Referenced by uv_snap_selection_exec().
|
static |
Definition at line 1223 of file uvedit_ops.c.
References BKE_editmesh_from_object(), BMEditMesh::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(), ED_space_image_get_size(), float(), height, l, BMesh::ldata, scene, MLoopUV::uv, uv_snap_to_pixel(), uvedit_face_visible_test(), uvedit_uv_select_test(), w(), and width.
Referenced by uv_snap_selection_exec().
|
static |
Definition at line 567 of file uvedit_ops.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_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOPS_OF_FACE, C, CD_MLOOPUV, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_space_image(), CustomData_get_offset(), Object::data, DEG_id_tag_update(), ED_uvedit_center_multi(), ELEM, INIT_MINMAX2, l, BMesh::ldata, max, MEM_freeN, min, minmax_v2v2_v2(), NC_GEOM, ND_DATA, NULL, scene, Scene::toolsettings, BMesh::totvertsel, MLoopUV::uv, UV_ALIGN_AUTO, UV_ALIGN_X, UV_ALIGN_Y, ToolSettings::uv_flag, UV_STRAIGHTEN, UV_STRAIGHTEN_X, UV_STRAIGHTEN_Y, UV_SYNC_SELECTION, UV_WELD, uvedit_face_visible_test(), uvedit_live_unwrap_update(), uvedit_uv_align_weld(), uvedit_uv_select_test(), uvedit_uv_straighten(), and WM_event_add_notifier().
Referenced by uv_align_exec(), and uv_weld_exec().
|
static |
Definition at line 991 of file uvedit_ops.c.
References C, OPERATOR_FINISHED, UV_WELD, and uv_weld_align().
Referenced by UV_OT_weld().
|
static |
Helper to find two endpoints (a
and b
) which have higher precedence, and are far apart. Note that is only a heuristic and won't always find the best two endpoints.
Definition at line 434 of file uvedit_ops.c.
References copy_v2_v2(), len_squared_v2v2(), MLoopUV::uv, and uvedit_line_update_get_precedence().
Referenced by uvedit_uv_straighten_elements().
|
static |
Definition at line 421 of file uvedit_ops.c.
References MLoopUV::flag, MLOOPUV_PINNED, UVEP_PINNED, and UVEP_SELECTED.
Referenced by uvedit_line_update_endpoint().
void uvedit_live_unwrap_update | ( | SpaceImage * | sima, |
Scene * | scene, | ||
Object * | obedit | ||
) |
Definition at line 177 of file uvedit_ops.c.
References ED_uvedit_live_unwrap_begin(), ED_uvedit_live_unwrap_end(), ED_uvedit_live_unwrap_re_solve(), SpaceImage::flag, scene, and SI_LIVE_UNWRAP.
Referenced by stitch_exit(), uv_remove_doubles_to_selected(), uv_remove_doubles_to_unselected(), uv_rip_exec(), uv_snap_selection_exec(), and uv_weld_align().
|
static |
Definition at line 375 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(), ELEM, l, BMesh::ldata, scene, MLoopUV::uv, UV_ALIGN_X, UV_ALIGN_Y, UV_WELD, uvedit_face_visible_test(), and uvedit_uv_select_test().
Referenced by uv_weld_align().
|
static |
Group selected UVs into islands, then apply uvedit_uv_straighten_elements to each island.
Definition at line 540 of file uvedit_ops.c.
References bm, BM_uv_element_map_create(), BM_uv_element_map_free(), UvElementMap::buf, CD_MLOOPUV, CustomData_get_offset(), UvElementMap::islandIndices, BMesh::ldata, NULL, scene, UvElementMap::totalIslands, UvElementMap::totalUVs, and uvedit_uv_straighten_elements().
Referenced by uv_weld_align().
|
static |
Find two end extreme points to specify a line, then straighten len
elements by moving UVs on the X-axis, Y-axis, or the closest point on the line segment.
Definition at line 468 of file uvedit_ops.c.
References Freestyle::a, BM_ELEM_CD_GET_VOID_P, closest_to_line_segment_v2(), element, l, len, update(), MLoopUV::uv, UV_STRAIGHTEN, UV_STRAIGHTEN_X, UV_STRAIGHTEN_Y, uvedit_line_update_endpoint(), and UVEP_INVALID.
Referenced by uvedit_uv_straighten().