|
Blender V5.0
|
#include <cmath>#include <cstdlib>#include <cstring>#include "MEM_guardedalloc.h"#include "DNA_image_types.h"#include "DNA_material_types.h"#include "DNA_mesh_types.h"#include "DNA_node_types.h"#include "DNA_object_types.h"#include "DNA_scene_types.h"#include "DNA_space_types.h"#include "BLI_bounds.hh"#include "BLI_kdtree.h"#include "BLI_math_base.hh"#include "BLI_math_geom.h"#include "BLI_math_vector.h"#include "BLI_math_vector.hh"#include "BLI_utildefines.h"#include "BLT_translation.hh"#include "BKE_context.hh"#include "BKE_customdata.hh"#include "BKE_editmesh.hh"#include "BKE_layer.hh"#include "BKE_main_invariants.hh"#include "BKE_material.hh"#include "BKE_mesh_mapping.hh"#include "BKE_mesh_types.hh"#include "BKE_node.hh"#include "BKE_node_legacy_types.hh"#include "DEG_depsgraph.hh"#include "DEG_depsgraph_query.hh"#include "ED_image.hh"#include "ED_mesh.hh"#include "ED_node.hh"#include "ED_screen.hh"#include "ED_uvedit.hh"#include "RNA_access.hh"#include "RNA_define.hh"#include "WM_api.hh"#include "WM_message.hh"#include "WM_types.hh"#include "UI_interface.hh"#include "UI_interface_layout.hh"#include "UI_resources.hh"#include "UI_view2d.hh"#include "uvedit_intern.hh"Go to the source code of this file.
Classes | |
| struct | UVAlignIslandBounds |
Hide Operator | |
| #define | UV_VERT_SEL_TEST(ts, bm, l, bool_test) |
| #define | UV_EDGE_SEL_TEST(ts, bm, l, bool_test) |
| static bool | bm_face_is_all_uv_sel (const ToolSettings *ts, const BMesh *bm, BMFace *f, bool select_test) |
| static bool | uv_mesh_hide_sync_select (const ToolSettings *ts, Object *ob, BMEditMesh *em, bool swap) |
| static wmOperatorStatus | uv_hide_exec (bContext *C, wmOperator *op) |
| static void | UV_OT_hide (wmOperatorType *ot) |
Geometric Utilities | |
| enum class | UVMoveType { Dynamic = 0 , Pixel = 1 , Udim = 2 } |
| enum class | UVMoveDirection { X = 0 , Y = 1 } |
| void | ED_uvedit_foreach_uv (const Scene *scene, BMesh *bm, const bool skip_invisible, const bool selected, FunctionRef< void(float[2])> user_fn) |
| void | ED_uvedit_foreach_uv_multi (const Scene *scene, const Span< Object * > objects_edit, const bool skip_invisible, const bool skip_nonselected, FunctionRef< void(float[2])> user_fn) |
| bool | ED_uvedit_minmax_multi (const Scene *scene, const Span< Object * > objects_edit, float r_min[2], float r_max[2]) |
| void | ED_uvedit_select_all (const ToolSettings *ts, BMesh *bm) |
| static bool | uvedit_median_multi (const Scene *scene, const Span< Object * > objects_edit, float co[2]) |
| bool | ED_uvedit_center_multi (const Scene *scene, Span< Object * > objects_edit, float cent[2], char mode) |
| bool | ED_uvedit_center_from_pivot_ex (const SpaceImage *sima, Scene *scene, ViewLayer *view_layer, float r_center[2], char mode, bool *r_has_select) |
| static wmOperatorStatus | uv_move_on_axis_exec (bContext *C, wmOperator *op) |
| static void | UV_OT_move_on_axis (wmOperatorType *ot) |
Definition at line 1816 of file uvedit_ops.cc.
Referenced by bm_face_is_all_uv_sel(), and uv_hide_exec().
Definition at line 1813 of file uvedit_ops.cc.
Referenced by uv_hide_exec().
Bitwise-or together, then choose loop with highest value.
| Enumerator | |
|---|---|
| UVEP_INVALID | |
| UVEP_SELECTED | |
| UVEP_PINNED | |
Definition at line 489 of file uvedit_ops.cc.
| 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 448 of file uvedit_ops.cc.
|
strong |
| Enumerator | |
|---|---|
| BoundingBox | |
| UVTileGrid | |
| ActiveUDIM | |
| Cursor | |
Definition at line 640 of file uvedit_ops.cc.
|
strong |
| Enumerator | |
|---|---|
| X | |
| Y | |
Definition at line 646 of file uvedit_ops.cc.
|
strong |
| Enumerator | |
|---|---|
| Max | |
| Min | |
| Center | |
| None | |
Definition at line 650 of file uvedit_ops.cc.
| enum UVAlignIslandOrder |
| Enumerator | |
|---|---|
| LargeToSmall | |
| SmallToLarge | |
| Fixed | |
Definition at line 656 of file uvedit_ops.cc.
|
strong |
| Enumerator | |
|---|---|
| Mean | |
| Min | |
| Max | |
Definition at line 457 of file uvedit_ops.cc.
|
strong |
| Enumerator | |
|---|---|
| X | |
| Y | |
Definition at line 352 of file uvedit_ops.cc.
|
strong |
| Enumerator | |
|---|---|
| Dynamic | |
| Pixel | |
| Udim | |
Definition at line 347 of file uvedit_ops.cc.
|
static |
Definition at line 1820 of file uvedit_ops.cc.
References bm, 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 2804 of file uvedit_ops.cc.
References ED_operator_uvedit(), wmKeyMap::poll, RGN_TYPE_WINDOW, SPACE_EMPTY, and WM_keymap_ensure().
Referenced by ED_spacetypes_keymap().
Definition at line 170 of file uvedit_ops.cc.
References BKE_main_ensure_invariants(), BKE_object_material_get(), bNode::id, bNodeTree::id, Image::id, is_image_texture_node(), blender::bke::node_get_active_texture(), and Material::nodetree.
| bool ED_object_get_active_image | ( | Object * | ob, |
| int | mat_nr, | ||
| Image ** | r_ima, | ||
| ImageUser ** | r_iuser, | ||
| const bNode ** | r_node, | ||
| const bNodeTree ** | r_ntree ) |
Definition at line 118 of file uvedit_ops.cc.
References BKE_object_material_get(), BKE_object_material_get_eval(), DEG_is_evaluated(), bNode::id, is_image_texture_node(), blender::bke::node_get_active_texture(), Material::nodetree, SH_NODE_TEX_ENVIRONMENT, SH_NODE_TEX_IMAGE, bNode::storage, and bNode::type_legacy.
Referenced by blender::ed::object::bake_object_check(), blender::ed::object::bake_object_image_get(), blender::ed::object::bake_targets_init_image_textures(), ED_space_image_auto_set(), ED_uvedit_get_aspect_from_material(), and blender::workbench::MaterialTexture::MaterialTexture().
|
static |
Definition at line 92 of file uvedit_ops.cc.
References C, CD_PROP_FLOAT2, Mesh::corner_data, CTX_data_active_object(), CustomData_get_layer(), Object::data, ED_operator_uvmap_mesh(), OB_MESH, and Object::type.
Referenced by ED_operator_uvmap_mesh().
| void ED_operatormacros_uvedit | ( | ) |
Definition at line 2789 of file uvedit_ops.cc.
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().
| void ED_operatortypes_uvedit | ( | ) |
Definition at line 2730 of file uvedit_ops.cc.
References UV_OT_align(), UV_OT_arrange_islands(), UV_OT_average_islands_scale(), UV_OT_copy(), UV_OT_copy_mirrored_faces(), UV_OT_cube_project(), UV_OT_cursor_set(), UV_OT_custom_region_set(), UV_OT_cylinder_project(), UV_OT_hide(), UV_OT_mark_seam(), UV_OT_minimize_stretch(), UV_OT_move_on_axis(), UV_OT_pack_islands(), UV_OT_paste(), 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_ex | ( | const SpaceImage * | sima, |
| Scene * | scene, | ||
| ViewLayer * | view_layer, | ||
| float | r_center[2], | ||
| char | mode, | ||
| bool * | r_has_select ) |
Definition at line 313 of file uvedit_ops.cc.
References BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(), copy_v2_v2(), SpaceImage::cursor, ED_uvedit_center_multi(), uvedit_select_is_any_selected_multi(), and V3D_AROUND_CURSOR.
Referenced by blender::ed::transform::gizmo2d_calc_transform_pivot().
| bool ED_uvedit_center_multi | ( | const Scene * | scene, |
| Span< Object * > | objects_edit, | ||
| float | cent[2], | ||
| char | mode ) |
Definition at line 290 of file uvedit_ops.cc.
References ED_uvedit_minmax_multi(), max, mid_v2_v2v2(), min, uvedit_median_multi(), and V3D_AROUND_CENTER_BOUNDS.
Referenced by ED_uvedit_center_from_pivot_ex(), uv_align(), uv_snap_cursor_to_selection(), uv_snap_selection_exec(), and uv_weld().
| void ED_uvedit_foreach_uv | ( | const Scene * | scene, |
| BMesh * | bm, | ||
| const bool | skip_invisible, | ||
| const bool | selected, | ||
| FunctionRef< void(float[2])> | user_fn ) |
Definition at line 202 of file uvedit_ops.cc.
References bm, BM_ELEM_CD_GET_FLOAT_P, BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOPS_OF_FACE, BM_uv_map_offsets_get(), l, Scene::toolsettings, BMUVOffsets::uv, ToolSettings::uv_flag, UV_FLAG_SELECT_SYNC, uvedit_face_visible_test(), and uvedit_uv_select_test().
Referenced by ED_uvedit_foreach_uv_multi(), uv_arrange_islands_exec(), uv_move_on_axis_exec(), uv_remove_doubles_to_selected(), uv_remove_doubles_to_unselected(), uv_snap_uvs_offset(), uv_snap_uvs_to_cursor(), uv_snap_uvs_to_pixels(), and uvedit_uv_align_weld().
| void ED_uvedit_foreach_uv_multi | ( | const Scene * | scene, |
| const Span< Object * > | objects_edit, | ||
| const bool | skip_invisible, | ||
| const bool | skip_nonselected, | ||
| FunctionRef< void(float[2])> | user_fn ) |
Definition at line 234 of file uvedit_ops.cc.
References BKE_editmesh_from_object(), BMEditMesh::bm, and ED_uvedit_foreach_uv().
Referenced by ED_uvedit_minmax_multi(), uv_align(), uv_remove_doubles_to_unselected(), and uvedit_median_multi().
| bool ED_uvedit_minmax_multi | ( | const Scene * | scene, |
| const Span< Object * > | objects_edit, | ||
| float | r_min[2], | ||
| float | r_max[2] ) |
Definition at line 246 of file uvedit_ops.cc.
References ED_uvedit_foreach_uv_multi(), INIT_MINMAX2, and minmax_v2v2_v2().
Referenced by ED_uvedit_center_multi(), and uv_align().
| void ED_uvedit_select_all | ( | const ToolSettings * | ts, |
| BMesh * | bm ) |
Be careful when using this, it bypasses all synchronization options.
Definition at line 260 of file uvedit_ops.cc.
References bm, BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOPS_OF_FACE, l, uvedit_edge_select_set_no_sync(), uvedit_face_select_set_no_sync(), and uvedit_vert_select_set_no_sync().
Referenced by ED_uvedit_add_simple_uvs().
| bool ED_uvedit_test | ( | Object * | obedit | ) |
Definition at line 73 of file uvedit_ops.cc.
References BKE_editmesh_from_object(), EDBM_uv_check(), OB_MESH, ret, and Object::type.
Referenced by ED_uvedit_live_unwrap_begin(), image_panel_uv_poll(), and uvedit_ensure_uvs().
| ENUM_OPERATORS | ( | eUVEndPointPrecedence | , |
| UVEP_PINNED | ) |
References UVEP_PINNED.
|
static |
Definition at line 113 of file uvedit_ops.cc.
References ELEM, SH_NODE_TEX_ENVIRONMENT, SH_NODE_TEX_IMAGE, and bNode::type_legacy.
Referenced by ED_object_assign_active_image(), and ED_object_get_active_image().
|
static |
Definition at line 942 of file uvedit_ops.cc.
References BKE_editmesh_from_object(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(), BMEditMesh::bm, C, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_space_image(), DEG_id_tag_update(), ED_uvedit_center_multi(), ED_uvedit_foreach_uv_multi(), ED_uvedit_minmax_multi(), ELEM, INIT_MINMAX2, Max, max, Min, min, minmax_v2v2_v2(), NC_GEOM, ND_DATA, pos, BMesh::totvertsel, UV_ALIGN_AUTO, UV_ALIGN_X, UV_ALIGN_Y, UV_STRAIGHTEN, UV_STRAIGHTEN_X, UV_STRAIGHTEN_Y, uvedit_live_unwrap_update(), uvedit_uv_align_weld(), uvedit_uv_straighten(), V3D_AROUND_CENTER_MEDIAN, and WM_event_add_notifier().
Referenced by uv_align_exec().
|
static |
Definition at line 1000 of file uvedit_ops.cc.
References C, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), and uv_align().
Referenced by UV_OT_align().
|
static |
Definition at line 1009 of file uvedit_ops.cc.
References ELEM, wmOperator::ptr, RNA_enum_get(), RNA_property_identifier(), STREQ, UV_ALIGN_X, and UV_ALIGN_Y.
Referenced by UV_OT_align().
|
static |
Definition at line 732 of file uvedit_ops.cc.
References Image::active_tile_index, ActiveUDIM, BKE_editmesh_from_object(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(), bm, BMEditMesh::bm, BoundingBox, C, Center, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_space_image(), SpaceImage::cursor, DEG_id_tag_update(), ED_uvedit_foreach_uv(), ELEM, IMA_SRC_TILED, SpaceImage::image, INIT_MINMAX2, Min, minmax_v2v2_v2(), NC_GEOM, ND_DATA, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), RNA_float_get(), Image::source, SpaceImage::tile_grid_shape, BMesh::totvertsel, uvedit_live_unwrap_update(), uvedit_uv_islands_arrange(), UVTileGrid, and WM_event_add_notifier().
Referenced by UV_OT_arrange_islands().
|
static |
Definition at line 2527 of file uvedit_ops.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_overwrite(), blender::Array< T, InlineBufferCapacity, Allocator >::begin(), BLI_assert, bm, BM_ELEM_CD_GET_FLOAT_P, BM_face_calc_center_median(), BM_face_vert_share_loop(), BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_ELEM_INDEX, BM_ITER_MESH, BM_LOOPS_OF_FACE, BM_uv_map_offsets_get(), BM_VERTS_OF_MESH, CD_PROP_FLOAT2, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), CustomData_get_offset(), blender::Array< T, InlineBufferCapacity, Allocator >::end(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::items(), l, BMFace::len, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_default(), pos, powf, blender::math::round(), UNUSED_VARS_NDEBUG, BMUVOffsets::uv, uvedit_face_select_test(), BMLoop::v, and v.
Referenced by uv_copy_mirrored_faces_exec().
|
static |
Definition at line 2655 of file uvedit_ops.cc.
References BKE_editmesh_from_object(), BKE_reportf(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(), BMEditMesh::bm, C, CTX_data_scene(), CTX_data_view_layer(), DEG_id_tag_update(), NC_GEOM, ND_DATA, OPERATOR_FINISHED, wmOperator::ptr, wmOperator::reports, RNA_enum_get(), RNA_int_get(), RPT_WARNING, uv_copy_mirrored_faces(), and WM_event_add_notifier().
Referenced by UV_OT_copy_mirrored_faces().
|
static |
Definition at line 1959 of file uvedit_ops.cc.
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_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, CTX_data_scene(), CTX_data_view_layer(), DEG_id_tag_update(), ED_uvedit_select_island_check(), ID_RECALC_SELECT, l, NC_GEOM, ND_SELECT, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), SCE_SELECT_EDGE, SCE_SELECT_FACE, SCE_SELECT_VERTEX, BMEditMesh::selectmode, swap, Scene::toolsettings, UV_EDGE_SEL_TEST, ToolSettings::uv_flag, UV_FLAG_SELECT_SYNC, uv_mesh_hide_sync_select(), UV_SELECT_EDGE, UV_SELECT_FACE, UV_SELECT_VERT, ToolSettings::uv_selectmode, UV_VERT_SEL_TEST, uvedit_face_select_disable(), uvedit_face_visible_test(), and WM_event_add_notifier().
Referenced by UV_OT_hide().
|
static |
Definition at line 2431 of file uvedit_ops.cc.
References BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(), bm, BMEditMesh::bm, BM_elem_flag_set, BM_ELEM_SEAM, BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOPS_OF_FACE, BM_uv_map_offsets_get(), C, CTX_data_scene(), CTX_data_view_layer(), DEG_id_tag_update(), BMLoop::e, ED_uvedit_live_unwrap(), Mesh::id, NC_GEOM, ND_DATA, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), Mesh::runtime, Scene::toolsettings, ToolSettings::uv_flag, UV_FLAG_SELECT_SYNC, 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 2484 of file uvedit_ops.cc.
References BLT_I18NCONTEXT_OPERATOR_DEFAULT, C, CTX_IFACE_, blender::wm::ExecDefault, wmOperatorType::idname, IFACE_, uiLayout::op(), uiLayout::operator_context_set(), OPERATOR_INTERFACE, wmOperator::ptr, RNA_boolean_set(), RNA_struct_property_is_set(), wmOperator::type, UI_popup_menu_begin(), UI_popup_menu_end(), UI_popup_menu_layout(), and uv_mark_seam_exec().
Referenced by UV_OT_mark_seam().
|
static |
Definition at line 1838 of file uvedit_ops.cc.
References BLI_assert, bm, BMEditMesh::bm, BM_elem_flag_enable, BM_elem_flag_test, BM_elem_flag_test_bool, BM_ELEM_HIDDEN, BM_elem_hide_set, BM_ELEM_SELECT, BM_ELEM_SELECT_UV, BM_ELEM_SELECT_UV_EDGE, BM_ELEM_TAG, BM_FACE, BM_FACE_FIRST_LOOP, BM_face_select_set(), BM_FACES_OF_MESH, BM_ITER_MESH, BM_mesh_elem_hflag_disable_all(), Object::data, BMLoop::e, ED_uvedit_sync_uvselect_ignore(), EDBM_flag_disable_all(), EDBM_mesh_hide(), EDBM_selectmode_flush(), EDBM_update(), EDBM_uvselect_clear(), BMLoop::f, BMLoop::next, params, SCE_SELECT_EDGE, SCE_SELECT_FACE, SCE_SELECT_VERTEX, BMEditMesh::selectmode, swap, and BMLoop::v.
Referenced by uv_hide_exec().
|
static |
Definition at line 357 of file uvedit_ops.cc.
References BKE_editmesh_from_object(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(), BMEditMesh::bm, C, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_space_image(), SpaceImage::custom_grid_subdiv, DEG_id_tag_update(), distance(), Dynamic, ED_space_image_get_size(), ED_uvedit_foreach_uv(), float, NC_GEOM, ND_DATA, OPERATOR_FINISHED, Pixel, wmOperator::ptr, RNA_enum_get(), RNA_int_get(), size(), BMesh::totvertsel, uvedit_live_unwrap_update(), and WM_event_add_notifier().
Referenced by UV_OT_move_on_axis().
|
static |
Definition at line 1021 of file uvedit_ops.cc.
References ED_operator_uvedit(), Max, Mean, Min, OPTYPE_REGISTER, OPTYPE_UNDO, ot, RNA_def_enum(), UV_ALIGN_AUTO, uv_align_exec(), uv_align_poll_property(), UV_ALIGN_X, UV_ALIGN_Y, UV_STRAIGHTEN, UV_STRAIGHTEN_X, and UV_STRAIGHTEN_Y.
Referenced by ED_operatortypes_uvedit().
|
static |
Definition at line 811 of file uvedit_ops.cc.
References ActiveUDIM, BoundingBox, Center, Cursor, ED_operator_uvedit(), Fixed, LargeToSmall, Max, Min, None, OPTYPE_REGISTER, OPTYPE_UNDO, ot, RNA_def_enum(), RNA_def_float(), SmallToLarge, uv_arrange_islands_exec(), UVTileGrid, X, and Y.
Referenced by ED_operatortypes_uvedit().
| void UV_OT_copy_mirrored_faces | ( | wmOperatorType * | ot | ) |
Definition at line 2695 of file uvedit_ops.cc.
References ED_operator_editmesh(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, RNA_def_enum(), RNA_def_int(), and uv_copy_mirrored_faces_exec().
Referenced by ED_operatortypes_uvedit().
|
static |
Definition at line 2303 of file uvedit_ops.cc.
References ED_space_image_cursor_poll(), FLT_MAX, ot, RNA_def_float_vector(), uv_set_2d_cursor_exec(), and uv_set_2d_cursor_invoke().
Referenced by ED_operatortypes_uvedit().
|
static |
Definition at line 2096 of file uvedit_ops.cc.
References ED_operator_uvedit(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, RNA_def_boolean(), and uv_hide_exec().
Referenced by ED_operatortypes_uvedit().
|
static |
Definition at line 2509 of file uvedit_ops.cc.
References ED_operator_uvedit(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, RNA_def_boolean(), uv_mark_seam_exec(), and uv_mark_seam_invoke().
Referenced by ED_operatortypes_uvedit().
|
static |
Definition at line 403 of file uvedit_ops.cc.
References Dynamic, ED_operator_uvedit(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, Pixel, RNA_def_enum(), RNA_def_int(), Udim, uv_move_on_axis_exec(), X, and Y.
Referenced by ED_operatortypes_uvedit().
|
static |
Definition at line 1778 of file uvedit_ops.cc.
References ED_operator_uvedit(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_property_flag(), and uv_pin_exec().
Referenced by ED_operatortypes_uvedit().
|
static |
Definition at line 1379 of file uvedit_ops.cc.
References ED_operator_uvedit(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, RNA_def_boolean(), RNA_def_float(), and uv_remove_doubles_exec().
Referenced by ED_operatortypes_uvedit().
|
static |
Definition at line 2241 of file uvedit_ops.cc.
References ED_operator_uvedit(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, RNA_def_boolean(), and uv_reveal_exec().
Referenced by ED_operatortypes_uvedit().
|
static |
Definition at line 2407 of file uvedit_ops.cc.
References ED_operator_uvedit(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, RNA_def_boolean(), and uv_seams_from_islands_exec().
Referenced by ED_operatortypes_uvedit().
|
static |
Definition at line 1505 of file uvedit_ops.cc.
References ED_operator_uvedit_space_image(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, RNA_def_enum(), and uv_snap_cursor_exec().
Referenced by ED_operatortypes_uvedit().
|
static |
Definition at line 1689 of file uvedit_ops.cc.
References ED_operator_uvedit_space_image(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, RNA_def_enum(), and uv_snap_selection_exec().
Referenced by ED_operatortypes_uvedit().
|
static |
Definition at line 1423 of file uvedit_ops.cc.
References ED_operator_uvedit(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and uv_weld_exec().
Referenced by ED_operatortypes_uvedit().
|
static |
Definition at line 1720 of file uvedit_ops.cc.
References BKE_editmesh_from_object(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(), BMEditMesh::bm, BM_ELEM_CD_GET_BOOL, BM_ELEM_CD_SET_BOOL, BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOPS_OF_FACE, BM_uv_map_attr_pin_ensure_named(), BM_uv_map_attr_pin_exists(), BM_uv_map_offsets_get(), C, CD_PROP_FLOAT2, clear(), CTX_data_scene(), CTX_data_view_layer(), CustomData_get_active_layer_name(), DEG_id_tag_update(), ID_RECALC_SYNC_TO_EVAL, invert(), l, BMesh::ldata, NC_GEOM, ND_DATA, OPERATOR_FINISHED, BMUVOffsets::pin, wmOperator::ptr, RNA_boolean_get(), BMesh::totvertsel, uvedit_face_visible_test(), uvedit_uv_select_test(), and WM_event_add_notifier().
Referenced by UV_OT_pin().
|
static |
Definition at line 1368 of file uvedit_ops.cc.
References C, wmOperator::ptr, RNA_boolean_get(), uv_remove_doubles_to_selected(), uv_remove_doubles_to_selected_shared_vertex(), and uv_remove_doubles_to_unselected().
Referenced by UV_OT_remove_doubles().
|
static |
Definition at line 1086 of file uvedit_ops.cc.
References add_v2_v2(), BKE_editmesh_from_object(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(), BMEditMesh::bm, C, copy_v2_v2(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_space_image(), blender::Vector< T, InlineBufferCapacity, Allocator >::data(), Object::data, DEG_id_tag_update(), ED_uvedit_foreach_uv(), i, blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), MEM_calloc_arrayN(), MEM_freeN(), mul_v2_fl(), NC_GEOM, ND_DATA, OPERATOR_FINISHED, wmOperator::ptr, RNA_float_get(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), BMesh::totloop, BMesh::totvertsel, tree, uvedit_live_unwrap_update(), and WM_event_add_notifier().
Referenced by uv_remove_doubles_exec().
|
static |
Definition at line 1258 of file uvedit_ops.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), BKE_editmesh_from_object(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(), BLI_assert, BMEditMesh::bm, BM_ELEM_CD_GET_FLOAT_P, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOPS_OF_VERT, BM_uv_map_offsets_get(), BM_VERTS_OF_MESH, C, blender::Vector< T, InlineBufferCapacity, Allocator >::clear(), copy_v2_v2(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_space_image(), DEG_id_tag_update(), blender::math::distance_squared(), i, l, len_squared_v2v2(), NC_GEOM, ND_DATA, OPERATOR_FINISHED, wmOperator::ptr, blender::Vector< T, InlineBufferCapacity, Allocator >::reserve(), RNA_float_get(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), blender::math::square(), BMUVOffsets::uv, uvedit_live_unwrap_update(), uvedit_uv_select_test(), v, and WM_event_add_notifier().
Referenced by uv_remove_doubles_exec().
|
static |
Definition at line 1200 of file uvedit_ops.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), BKE_editmesh_from_object(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(), BMEditMesh::bm, C, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_space_image(), DEG_id_tag_update(), ED_uvedit_foreach_uv(), ED_uvedit_foreach_uv_multi(), NC_GEOM, ND_DATA, wmOperator::ptr, RNA_float_get(), BMesh::totloop, tree, uvedit_live_unwrap_update(), and WM_event_add_notifier().
Referenced by uv_remove_doubles_exec().
|
static |
Definition at line 2119 of file uvedit_ops.cc.
References BKE_editmesh_from_object(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(), BMEditMesh::bm, 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, CTX_data_scene(), CTX_data_view_layer(), DEG_id_tag_update(), EDBM_mesh_reveal(), EDBM_update(), ID_RECALC_SELECT, l, NC_GEOM, ND_SELECT, OPERATOR_FINISHED, params, wmOperator::ptr, RNA_boolean_get(), SCE_SELECT_EDGE, SCE_SELECT_FACE, SCE_SELECT_VERTEX, select, BMEditMesh::selectmode, Scene::toolsettings, ToolSettings::uv_flag, UV_FLAG_SELECT_SYNC, UV_SELECT_FACE, ToolSettings::uv_selectmode, uvedit_edge_select_set_no_sync(), uvedit_face_select_set_no_sync(), uvedit_vert_select_set_no_sync(), and WM_event_add_notifier().
Referenced by UV_OT_reveal().
|
static |
Definition at line 2334 of file uvedit_ops.cc.
References BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(), bm, BMEditMesh::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(), BM_uv_map_offsets_get(), C, CTX_data_scene(), CTX_data_view_layer(), DEG_id_tag_update(), BMLoop::e, EDBM_uv_check(), Mesh::id, NC_GEOM, ND_DATA, BMLoop::next, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, BMLoop::radial_next, RNA_boolean_get(), Mesh::runtime, BMUVOffsets::uv, uvedit_edge_select_test(), uvedit_face_visible_test(), and WM_event_add_notifier().
Referenced by UV_OT_seams_from_islands().
|
static |
Definition at line 2262 of file uvedit_ops.cc.
References C, CTX_wm_message_bus(), CTX_wm_screen(), CTX_wm_space_image(), SpaceImage::cursor, bScreen::id, NC_SPACE, ND_SPACE_IMAGE, 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 2284 of file uvedit_ops.cc.
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 1469 of file uvedit_ops.cc.
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, NC_SPACE, ND_SPACE_IMAGE, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), 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().
|
static |
Definition at line 1463 of file uvedit_ops.cc.
Referenced by uv_snap_cursor_exec().
|
static |
Definition at line 1448 of file uvedit_ops.cc.
References SpaceImage::cursor, ED_space_image_get_size(), and uv_snap_to_pixel().
Referenced by uv_snap_cursor_exec().
|
static |
Definition at line 1456 of file uvedit_ops.cc.
References SpaceImage::around, SpaceImage::cursor, and ED_uvedit_center_multi().
Referenced by uv_snap_cursor_exec().
|
static |
Definition at line 1635 of file uvedit_ops.cc.
References SpaceImage::around, BKE_editmesh_from_object(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(), BMEditMesh::bm, C, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_space_image(), SpaceImage::cursor, DEG_id_tag_update(), ED_uvedit_center_multi(), NC_GEOM, ND_DATA, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), sub_v2_v2v2(), BMesh::totvertsel, uv_snap_uvs_offset(), uv_snap_uvs_to_adjacent_unselected(), uv_snap_uvs_to_cursor(), uv_snap_uvs_to_pixels(), uvedit_live_unwrap_update(), and WM_event_add_notifier().
Referenced by UV_OT_snap_selected().
Definition at line 1442 of file uvedit_ops.cc.
Referenced by uv_snap_cursor_to_pixels().
Definition at line 1548 of file uvedit_ops.cc.
References BKE_editmesh_from_object(), BMEditMesh::bm, and ED_uvedit_foreach_uv().
Referenced by uv_snap_selection_exec().
Definition at line 1561 of file uvedit_ops.cc.
References add_v2_v2(), BKE_editmesh_from_object(), bm, BMEditMesh::bm, BM_ELEM_CD_GET_FLOAT_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, BM_uv_map_offsets_get(), BMLoop::f, l, mul_v2_v2fl(), BMUVOffsets::uv, uvedit_face_visible_test(), and uvedit_uv_select_test().
Referenced by uv_snap_selection_exec().
Definition at line 1535 of file uvedit_ops.cc.
References BKE_editmesh_from_object(), BMEditMesh::bm, and ED_uvedit_foreach_uv().
Referenced by uv_snap_selection_exec().
|
static |
Definition at line 1616 of file uvedit_ops.cc.
References BKE_editmesh_from_object(), BMEditMesh::bm, ED_space_image_get_size(), ED_uvedit_foreach_uv(), float, and w().
Referenced by uv_snap_selection_exec().
|
static |
Definition at line 912 of file uvedit_ops.cc.
References BKE_editmesh_from_object(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(), BMEditMesh::bm, C, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_space_image(), DEG_id_tag_update(), ED_uvedit_center_multi(), NC_GEOM, ND_DATA, BMesh::totvertsel, UV_WELD, uvedit_live_unwrap_update(), uvedit_uv_align_weld(), and WM_event_add_notifier().
Referenced by uv_weld_exec().
|
static |
Definition at line 1416 of file uvedit_ops.cc.
References C, OPERATOR_FINISHED, and uv_weld().
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 509 of file uvedit_ops.cc.
References copy_v2_v2(), len_squared_v2v2(), and uvedit_line_update_get_precedence().
Referenced by uvedit_uv_straighten_elements().
|
static |
Definition at line 496 of file uvedit_ops.cc.
References 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 187 of file uvedit_ops.cc.
References ED_uvedit_live_unwrap_begin(), ED_uvedit_live_unwrap_end(), ED_uvedit_live_unwrap_re_solve(), SpaceImage::flag, and SI_LIVE_UNWRAP.
Referenced by stitch_exit(), uv_align(), uv_arrange_islands_exec(), uv_move_on_axis_exec(), uv_remove_doubles_to_selected(), uv_remove_doubles_to_selected_shared_vertex(), uv_remove_doubles_to_unselected(), uv_rip_exec(), uv_snap_selection_exec(), and uv_weld().
|
static |
Definition at line 275 of file uvedit_ops.cc.
References add_v2_v2(), ED_uvedit_foreach_uv_multi(), mul_v2_fl(), and zero_v2().
Referenced by ED_uvedit_center_multi().
|
static |
Definition at line 463 of file uvedit_ops.cc.
References bm, ED_uvedit_foreach_uv(), ELEM, UV_ALIGN_X, UV_ALIGN_Y, and UV_WELD.
Referenced by uv_align(), and uv_weld().
|
static |
| position | The position to begin placing islands on, this is written to so multiple objects will placing non-overlapping islands. |
Definition at line 671 of file uvedit_ops.cc.
References b, blender::Array< T, InlineBufferCapacity, Allocator >::begin(), bm, BM_ELEM_CD_GET_FLOAT_P, BM_uv_element_map_create(), BM_uv_map_offsets_get(), UVAlignIslandBounds::bounds, element, blender::Array< T, InlineBufferCapacity, Allocator >::end(), i, UVAlignIslandBounds::index, INIT_MINMAX2, UvElementMap::island_indices, UvElementMap::island_total_uvs, l, LargeToSmall, minmax_v2v2_v2(), return, UvElementMap::storage, UvElementMap::total_islands, and BMUVOffsets::uv.
Referenced by uv_arrange_islands_exec().
|
static |
Group selected UVs into islands, then apply uvedit_uv_straighten_elements to each island.
Definition at line 617 of file uvedit_ops.cc.
References bm, BM_uv_element_map_create(), BM_uv_element_map_free(), BM_uv_map_offsets_get(), i, UvElementMap::island_indices, UvElementMap::island_total_uvs, UvElementMap::storage, UvElementMap::total_islands, BMUVOffsets::uv, and uvedit_uv_straighten_elements().
Referenced by uv_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 544 of file uvedit_ops.cc.
References BM_ELEM_CD_GET_BOOL, BM_ELEM_CD_GET_FLOAT_P, closest_to_line_segment_v2(), element, i, l, len, BMUVOffsets::pin, update(), BMUVOffsets::uv, UV_STRAIGHTEN, UV_STRAIGHTEN_X, UV_STRAIGHTEN_Y, uvedit_line_update_endpoint(), and UVEP_INVALID.
Referenced by uvedit_uv_straighten().