Blender
V3.3
|
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "BLI_linklist.h"
#include "DNA_windowmanager_types.h"
#include "MEM_guardedalloc.h"
#include "BLI_ghash.h"
#include "BLI_linklist_stack.h"
#include "BLI_math.h"
#include "BLI_math_vector.h"
#include "BLI_utildefines.h"
#include "DNA_image_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 "BKE_context.h"
#include "BKE_customdata.h"
#include "BKE_editmesh.h"
#include "BKE_layer.h"
#include "BKE_mesh.h"
#include "BKE_report.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_query.h"
#include "ED_screen.h"
#include "ED_transform.h"
#include "ED_uvedit.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "WM_api.h"
#include "WM_types.h"
#include "UI_view2d.h"
#include "intern/bmesh_marking.h"
#include "uvedit_intern.h"
#include "bmesh_tools.h"
Go to the source code of this file.
Classes | |
struct | PathSelectParams |
struct | UserData_UV |
Functions | |
Path Select Struct & Properties | |
static void | path_select_properties (wmOperatorType *ot) |
static void | path_select_params_from_op (wmOperator *op, struct PathSelectParams *op_params) |
UV Vert Path | |
static bool | verttag_filter_cb (BMLoop *l, void *user_data_v) |
static bool | verttag_test_cb (BMLoop *l, void *user_data_v) |
static void | verttag_set_cb (BMLoop *l, bool val, void *user_data_v) |
static int | mouse_mesh_uv_shortest_path_vert (Scene *scene, Object *obedit, const struct PathSelectParams *op_params, BMLoop *l_src, BMLoop *l_dst, const float aspect_y, const int cd_loop_uv_offset) |
UV Edge Path | |
static bool | edgetag_filter_cb (BMLoop *l, void *user_data_v) |
static bool | edgetag_test_cb (BMLoop *l, void *user_data_v) |
static void | edgetag_set_cb (BMLoop *l, bool val, void *user_data_v) |
static int | mouse_mesh_uv_shortest_path_edge (Scene *scene, Object *obedit, const struct PathSelectParams *op_params, BMLoop *l_src, BMLoop *l_dst, const float aspect_y, const int cd_loop_uv_offset) |
UV Face Path | |
static bool | facetag_filter_cb (BMFace *f, void *user_data_v) |
static bool | facetag_test_cb (BMFace *f, void *user_data_v) |
static void | facetag_set_cb (BMFace *f, bool val, void *user_data_v) |
static int | mouse_mesh_uv_shortest_path_face (Scene *scene, Object *obedit, const struct PathSelectParams *op_params, BMFace *f_src, BMFace *f_dst, const float aspect_y, const int cd_loop_uv_offset) |
Main Operator for vert/edge/face tag | |
static int | uv_shortest_path_pick_exec (bContext *C, wmOperator *op) |
static bool | uv_shortest_path_pick_ex (Scene *scene, Depsgraph *depsgraph, Object *obedit, const struct PathSelectParams *op_params, BMElem *ele_src, BMElem *ele_dst, const float aspect_y, const int cd_loop_uv_offset) |
static int | uv_shortest_path_pick_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
void | UV_OT_shortest_path_pick (wmOperatorType *ot) |
Select Path Between Existing Selection | |
static int | uv_shortest_path_select_exec (bContext *C, wmOperator *op) |
void | UV_OT_shortest_path_select (wmOperatorType *ot) |
Definition in file uvedit_path.c.
Definition at line 246 of file uvedit_path.c.
References BMLoop::f, l, user_data, and uvedit_face_visible_test().
Referenced by edgetag_test_cb(), and mouse_mesh_uv_shortest_path_edge().
Definition at line 270 of file uvedit_path.c.
References UserData_UV::cd_loop_uv_offset, UserData_UV::em, l, scene, user_data, and uvedit_edge_select_set_with_sticky().
Referenced by mouse_mesh_uv_shortest_path_edge().
Definition at line 251 of file uvedit_path.c.
References BM_ITER_ELEM, BM_loop_uv_share_edge_check(), BM_LOOPS_OF_EDGE, UserData_UV::cd_loop_uv_offset, BMLoop::e, edgetag_filter_cb(), l, scene, user_data, and uvedit_edge_select_test().
Referenced by mouse_mesh_uv_shortest_path_edge().
Definition at line 368 of file uvedit_path.c.
References user_data, and uvedit_face_visible_test().
Referenced by mouse_mesh_uv_shortest_path_face().
Definition at line 388 of file uvedit_path.c.
References UserData_UV::cd_loop_uv_offset, UserData_UV::em, scene, user_data, and uvedit_face_select_set_with_sticky().
Referenced by mouse_mesh_uv_shortest_path_face().
Definition at line 373 of file uvedit_path.c.
References BM_ITER_ELEM, BM_LOOPS_OF_FACE, UserData_UV::cd_loop_uv_offset, scene, user_data, and uvedit_edge_select_test().
Referenced by mouse_mesh_uv_shortest_path_face().
|
static |
Definition at line 279 of file uvedit_path.c.
References BMCalcPathUVParams::aspect_y, BKE_editmesh_from_object(), BLI_linklist_free(), BMEditMesh::bm, bm, BM_mesh_calc_path_uv_edge(), BM_mesh_calc_path_uv_region_edge(), BMCalcPathUVParams::cd_loop_uv_offset, UserData_UV::cd_loop_uv_offset, ED_uvedit_active_edge_loop_set(), edgetag_filter_cb(), edgetag_set_cb(), edgetag_test_cb(), UserData_UV::em, PathSelectParams::interval_params, node, NULL, params, scene, PathSelectParams::track_active, PathSelectParams::use_face_step, PathSelectParams::use_fill, PathSelectParams::use_topology_distance, user_data, and WM_operator_properties_checker_interval_test().
Referenced by uv_shortest_path_pick_ex().
|
static |
Definition at line 397 of file uvedit_path.c.
References BMCalcPathUVParams::aspect_y, BKE_editmesh_from_object(), BLI_linklist_free(), BMEditMesh::bm, bm, BM_mesh_active_face_set(), BM_mesh_calc_path_uv_face(), BM_mesh_calc_path_uv_region_face(), BMCalcPathUVParams::cd_loop_uv_offset, UserData_UV::cd_loop_uv_offset, UserData_UV::em, facetag_filter_cb(), facetag_set_cb(), facetag_test_cb(), PathSelectParams::interval_params, node, NULL, params, scene, PathSelectParams::track_active, PathSelectParams::use_face_step, PathSelectParams::use_fill, PathSelectParams::use_topology_distance, user_data, and WM_operator_properties_checker_interval_test().
Referenced by uv_shortest_path_pick_ex().
|
static |
Definition at line 159 of file uvedit_path.c.
References BMCalcPathUVParams::aspect_y, BKE_editmesh_from_object(), BLI_linklist_free(), BMEditMesh::bm, bm, BM_mesh_calc_path_uv_region_vert(), BM_mesh_calc_path_uv_vert(), BMCalcPathUVParams::cd_loop_uv_offset, UserData_UV::cd_loop_uv_offset, ED_uvedit_active_vert_loop_set(), UserData_UV::em, PathSelectParams::interval_params, node, NULL, params, scene, PathSelectParams::track_active, PathSelectParams::use_face_step, PathSelectParams::use_fill, PathSelectParams::use_topology_distance, user_data, verttag_filter_cb(), verttag_set_cb(), verttag_test_cb(), and WM_operator_properties_checker_interval_test().
Referenced by uv_shortest_path_pick_ex().
|
static |
Definition at line 98 of file uvedit_path.c.
References PathSelectParams::interval_params, wmOperator::ptr, RNA_boolean_get(), PathSelectParams::track_active, PathSelectParams::use_face_step, PathSelectParams::use_fill, PathSelectParams::use_topology_distance, and WM_operator_properties_checker_interval_from_op().
Referenced by uv_shortest_path_pick_exec(), uv_shortest_path_pick_invoke(), and uv_shortest_path_select_exec().
|
static |
Definition at line 77 of file uvedit_path.c.
References ot, RNA_def_boolean(), wmOperatorType::srna, and WM_operator_properties_checker_interval().
Referenced by UV_OT_shortest_path_pick(), and UV_OT_shortest_path_select().
void UV_OT_shortest_path_pick | ( | wmOperatorType * | ot | ) |
Definition at line 753 of file uvedit_path.c.
References wmOperatorType::description, ED_operator_uvedit_space_image(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, path_select_properties(), wmOperatorType::poll, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_int(), RNA_def_property_flag(), wmOperatorType::srna, uv_shortest_path_pick_exec(), and uv_shortest_path_pick_invoke().
Referenced by ED_operatortypes_uvedit().
void UV_OT_shortest_path_select | ( | wmOperatorType * | ot | ) |
Definition at line 852 of file uvedit_path.c.
References wmOperatorType::description, ED_operator_uvedit_space_image(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, path_select_properties(), wmOperatorType::poll, and uv_shortest_path_select_exec().
Referenced by ED_operatortypes_uvedit().
|
static |
Definition at line 488 of file uvedit_path.c.
References BMCalcPathUVParams::aspect_y, BKE_editmesh_from_object(), BKE_mesh_batch_cache_dirty_tag(), BKE_MESH_BATCH_DIRTY_UVEDIT_SELECT, BM_FACE, BM_LOOP, BMCalcPathUVParams::cd_loop_uv_offset, Object::data, DEG_get_evaluated_object(), DEG_id_tag_update(), depsgraph, ED_uvedit_select_mode_get(), ED_uvedit_select_sync_flush(), ED_uvedit_selectmode_flush(), ELEM, BMElem::head, BMHeader::htype, ID_RECALC_SELECT, mouse_mesh_uv_shortest_path_edge(), mouse_mesh_uv_shortest_path_face(), mouse_mesh_uv_shortest_path_vert(), NC_GEOM, ND_SELECT, NULL, scene, select(), Scene::toolsettings, ToolSettings::uv_flag, UV_SELECT_EDGE, UV_SYNC_SELECTION, and WM_main_add_notifier().
Referenced by uv_shortest_path_pick_exec(), uv_shortest_path_pick_invoke(), and uv_shortest_path_select_exec().
|
static |
Definition at line 692 of file uvedit_path.c.
References BKE_editmesh_from_object(), BMEditMesh::bm, bm, BM_face_at_index_find_or_table(), BM_loop_at_index_find(), BM_mesh_active_face_get(), C, CD_MLOOPUV, CTX_data_edit_object(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_scene(), CustomData_get_offset(), depsgraph, ED_uvedit_active_edge_loop_get(), ED_uvedit_active_vert_loop_get(), ED_uvedit_get_aspect(), ED_uvedit_select_mode_get(), BMesh::ldata, OPERATOR_CANCELLED, OPERATOR_FINISHED, path_select_params_from_op(), wmOperator::ptr, RNA_int_get(), scene, BMesh::totface, BMesh::totloop, PathSelectParams::track_active, UV_SELECT_EDGE, UV_SELECT_FACE, and uv_shortest_path_pick_ex().
Referenced by UV_OT_shortest_path_pick(), and uv_shortest_path_pick_invoke().
|
static |
Definition at line 563 of file uvedit_path.c.
References BKE_editmesh_from_object(), BMEditMesh::bm, bm, BM_elem_index_get, BM_FACE, BM_LOOP, BM_mesh_active_edge_get(), BM_mesh_active_face_get(), BM_mesh_active_vert_get(), BM_mesh_elem_index_ensure(), C, CD_MLOOPUV, CTX_data_edit_object(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_scene(), CTX_wm_region(), CustomData_get_offset(), depsgraph, ED_uvedit_active_edge_loop_get(), ED_uvedit_active_vert_loop_get(), ED_uvedit_get_aspect(), ED_uvedit_select_mode_get(), UvNearestHit::efa, UvNearestHit::l, BMesh::ldata, wmEvent::mval, BMLoop::next, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, path_select_params_from_op(), wmOperator::ptr, RNA_int_set(), RNA_struct_property_is_set(), scene, Scene::toolsettings, PathSelectParams::track_active, UI_view2d_region_to_view(), uv_find_nearest_edge(), uv_find_nearest_face(), uv_find_nearest_loop_from_edge(), uv_find_nearest_loop_from_vert(), uv_find_nearest_vert(), ToolSettings::uv_flag, UV_NEAREST_HIT_INIT_MAX, UV_SELECT_EDGE, UV_SELECT_FACE, uv_shortest_path_pick_ex(), uv_shortest_path_pick_exec(), UV_SYNC_SELECTION, uvedit_uv_select_test(), and ARegion::v2d.
Referenced by UV_OT_shortest_path_pick().
|
static |
Definition at line 784 of file uvedit_path.c.
References BKE_editmesh_from_object(), BKE_report(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data, BMEditMesh::bm, bm, C, CD_MLOOPUV, CTX_data_edit_object(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), CustomData_get_offset(), depsgraph, ED_uvedit_get_aspect(), ED_uvedit_select_mode_get(), ED_uvedit_selected_edges(), ED_uvedit_selected_faces(), ED_uvedit_selected_verts(), BMesh::ldata, MEM_freeN, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, path_select_params_from_op(), wmOperator::reports, RPT_WARNING, scene, UV_SELECT_EDGE, UV_SELECT_FACE, and uv_shortest_path_pick_ex().
Referenced by UV_OT_shortest_path_select().
Definition at line 114 of file uvedit_path.c.
References BMLoop::f, l, user_data, and uvedit_face_visible_test().
Referenced by mouse_mesh_uv_shortest_path_vert(), verttag_set_cb(), and verttag_test_cb().
Definition at line 140 of file uvedit_path.c.
References BM_ELEM_CD_GET_VOID_P, BM_ITER_ELEM, BM_LOOPS_OF_VERT, UserData_UV::cd_loop_uv_offset, UserData_UV::em, equals_v2v2(), l, scene, user_data, MLoopUV::uv, uvedit_uv_select_set(), BMLoop::v, and verttag_filter_cb().
Referenced by mouse_mesh_uv_shortest_path_vert().
Definition at line 119 of file uvedit_path.c.
References BM_ELEM_CD_GET_VOID_P, BM_ITER_ELEM, BM_LOOPS_OF_VERT, UserData_UV::cd_loop_uv_offset, equals_v2v2(), l, scene, user_data, MLoopUV::uv, uvedit_uv_select_test(), BMLoop::v, and verttag_filter_cb().
Referenced by mouse_mesh_uv_shortest_path_vert().