Blender
V3.3
|
#include "MEM_guardedalloc.h"
#include "DNA_mesh_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_windowmanager_types.h"
#include "BLI_linklist.h"
#include "BLI_math.h"
#include "BKE_context.h"
#include "BKE_editmesh.h"
#include "BKE_layer.h"
#include "BKE_report.h"
#include "ED_mesh.h"
#include "ED_object.h"
#include "ED_screen.h"
#include "ED_select_utils.h"
#include "ED_uvedit.h"
#include "ED_view3d.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "WM_api.h"
#include "WM_types.h"
#include "bmesh.h"
#include "bmesh_tools.h"
#include "DEG_depsgraph.h"
#include "mesh_intern.h"
Go to the source code of this file.
Classes | |
struct | PathSelectParams |
struct | UserData |
Path Select Struct & Properties | |
enum | { EDGE_MODE_SELECT = 0 , EDGE_MODE_TAG_SEAM = 1 , EDGE_MODE_TAG_SHARP = 2 , EDGE_MODE_TAG_CREASE = 3 , EDGE_MODE_TAG_BEVEL = 4 , EDGE_MODE_TAG_FREESTYLE = 5 } |
static void | path_select_properties (wmOperatorType *ot) |
static void | path_select_params_from_op (wmOperator *op, ToolSettings *ts, struct PathSelectParams *op_params) |
static bool | path_select_poll_property (const bContext *C, wmOperator *UNUSED(op), const PropertyRNA *prop) |
anonymous enum |
Enumerator | |
---|---|
EDGE_MODE_SELECT | |
EDGE_MODE_TAG_SEAM | |
EDGE_MODE_TAG_SHARP | |
EDGE_MODE_TAG_CREASE | |
EDGE_MODE_TAG_BEVEL | |
EDGE_MODE_TAG_FREESTYLE |
Definition at line 52 of file editmesh_path.c.
Definition at line 656 of file editmesh_path.c.
References BMesh::act_face, bm, BM_elem_flag_test, BM_ELEM_SELECT, BM_mesh_active_elem_get(), and NULL.
Referenced by edbm_shortest_path_pick_exec(), and edbm_shortest_path_pick_invoke().
|
static |
Definition at line 638 of file editmesh_path.c.
References BM_EDGE, BM_FACE, BM_VERT, ED_view3d_select_dist_px(), EDBM_edge_find_nearest(), EDBM_face_find_nearest(), EDBM_vert_find_nearest(), ViewContext::em, NULL, SCE_SELECT_EDGE, SCE_SELECT_FACE, SCE_SELECT_VERTEX, and BMEditMesh::selectmode.
Referenced by edbm_shortest_path_pick_invoke().
|
static |
Definition at line 604 of file editmesh_path.c.
References BM_EDGE, BM_FACE, BM_VERT, Object::data, DEG_id_tag_update(), ELEM, BMElem::head, BMHeader::htype, ID_RECALC_SELECT, mouse_mesh_shortest_path_edge(), mouse_mesh_shortest_path_face(), mouse_mesh_shortest_path_vert(), NC_GEOM, ND_SELECT, NULL, UserData::op_params, scene, and WM_main_add_notifier().
Referenced by edbm_shortest_path_pick_exec(), edbm_shortest_path_pick_invoke(), and edbm_shortest_path_select_exec().
|
static |
Definition at line 748 of file editmesh_path.c.
References BKE_editmesh_from_object(), BMEditMesh::bm, bm, C, CTX_data_edit_object(), CTX_data_scene(), edbm_elem_active_elem_or_face_get(), EDBM_elem_from_index_any(), edbm_shortest_path_pick_ex(), OPERATOR_CANCELLED, OPERATOR_FINISHED, path_select_params_from_op(), wmOperator::ptr, RNA_int_get(), scene, Scene::toolsettings, BMesh::totedge, BMesh::totface, BMesh::totvert, and PathSelectParams::track_active.
Referenced by edbm_shortest_path_pick_invoke(), and MESH_OT_shortest_path_pick().
|
static |
Definition at line 667 of file editmesh_path.c.
References ViewLayer::basact, BASACT, BKE_view_layer_array_from_bases_in_edit_mode, BMEditMesh::bm, BM_EDGE, BM_mesh_elem_index_ensure(), C, copy_v2_v2_int(), ED_object_base_activate(), ED_view3d_viewcontext_init_object(), edbm_elem_active_elem_or_face_get(), edbm_elem_find_nearest(), EDBM_elem_to_index_any(), EDBM_select_pick(), edbm_shortest_path_pick_ex(), edbm_shortest_path_pick_exec(), EDBM_unified_findnearest(), PathSelectParams::edge_mode, EDGE_MODE_SELECT, ViewContext::em, em_setup_viewcontext(), BMElem::head, BMHeader::htype, MEM_freeN, ViewContext::mval, wmEvent::mval, NULL, ViewContext::obedit, Base::object, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, params, path_select_params_from_op(), wmOperator::ptr, RNA_int_set(), RNA_struct_property_is_set(), SCE_SELECT_EDGE, ViewContext::scene, SEL_OP_ADD, BMEditMesh::selectmode, Scene::toolsettings, BMesh::totvertsel, PathSelectParams::track_active, ViewContext::v3d, view3d_operator_needs_opengl(), and ViewContext::view_layer.
Referenced by MESH_OT_shortest_path_pick().
|
static |
Definition at line 809 of file editmesh_path.c.
References BKE_editmesh_from_object(), BKE_report(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data, BMEditMesh::bm, bm, BM_EDGES_OF_MESH, BM_elem_flag_test, BM_ELEM_SELECT, BM_FACES_OF_MESH, BM_ITER_MESH, BM_VERTS_OF_MESH, C, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), edbm_shortest_path_pick_ex(), BMEditSelection::ele, BMEditSelection::htype, ListBase::last, MEM_freeN, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, path_select_params_from_op(), BMEditSelection::prev, wmOperator::reports, RPT_WARNING, SCE_SELECT_EDGE, SCE_SELECT_FACE, SCE_SELECT_VERTEX, scene, BMesh::selected, BMEditMesh::selectmode, Scene::toolsettings, BMesh::totedgesel, BMesh::totfacesel, and BMesh::totvertsel.
Referenced by MESH_OT_shortest_path_select().
Definition at line 342 of file editmesh_path.c.
References BMEditMesh::bm, bm, BM_data_layer_add(), BM_mesh_cd_flag_ensure(), CD_FREESTYLE_EDGE, CustomData_has_layer(), BMesh::edata, EDGE_MODE_TAG_BEVEL, EDGE_MODE_TAG_CREASE, EDGE_MODE_TAG_FREESTYLE, Mesh::edit_mesh, UserData::me, ME_CDFLAG_EDGE_BWEIGHT, and ME_CDFLAG_EDGE_CREASE.
Referenced by mouse_mesh_shortest_path_edge().
Definition at line 274 of file editmesh_path.c.
References BM_elem_flag_test, BM_ELEM_HIDDEN, and e.
Referenced by mouse_mesh_shortest_path_edge().
Definition at line 304 of file editmesh_path.c.
References bm, BM_edge_select_set(), BM_elem_flag_set, BM_elem_float_data_set(), BM_ELEM_SEAM, BM_ELEM_SMOOTH, CD_BWEIGHT, CD_CREASE, CD_FREESTYLE_EDGE, CustomData_bmesh_get(), BMHeader::data, e, BMesh::edata, EDGE_MODE_SELECT, EDGE_MODE_TAG_BEVEL, EDGE_MODE_TAG_CREASE, EDGE_MODE_TAG_FREESTYLE, EDGE_MODE_TAG_SEAM, EDGE_MODE_TAG_SHARP, FreestyleEdge::flag, FREESTYLE_EDGE_MARK, BMVert::head, and user_data.
Referenced by mouse_mesh_shortest_path_edge().
Definition at line 278 of file editmesh_path.c.
References bm, BM_elem_flag_test, BM_elem_float_data_get(), BM_ELEM_SEAM, BM_ELEM_SELECT, BM_ELEM_SMOOTH, CD_BWEIGHT, CD_CREASE, CD_FREESTYLE_EDGE, CustomData_bmesh_get(), BMHeader::data, e, BMesh::edata, EDGE_MODE_SELECT, EDGE_MODE_TAG_BEVEL, EDGE_MODE_TAG_CREASE, EDGE_MODE_TAG_FREESTYLE, EDGE_MODE_TAG_SEAM, EDGE_MODE_TAG_SHARP, FreestyleEdge::flag, FREESTYLE_EDGE_MARK, BMVert::head, and user_data.
Referenced by mouse_mesh_shortest_path_edge().
Definition at line 487 of file editmesh_path.c.
References BM_elem_flag_test, and BM_ELEM_HIDDEN.
Referenced by mouse_mesh_shortest_path_face().
Definition at line 497 of file editmesh_path.c.
References BM_face_select_set(), and user_data.
Referenced by mouse_mesh_shortest_path_face().
Definition at line 492 of file editmesh_path.c.
References BM_elem_flag_test_bool, and BM_ELEM_SELECT.
Referenced by mouse_mesh_shortest_path_face().
void MESH_OT_shortest_path_pick | ( | wmOperatorType * | ot | ) |
Definition at line 777 of file editmesh_path.c.
References wmOperatorType::description, ED_operator_editmesh_region_view3d(), edbm_shortest_path_pick_exec(), edbm_shortest_path_pick_invoke(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, path_select_poll_property(), path_select_properties(), wmOperatorType::poll, wmOperatorType::poll_property, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_int(), RNA_def_property_flag(), and wmOperatorType::srna.
Referenced by ED_operatortypes_mesh().
void MESH_OT_shortest_path_select | ( | wmOperatorType * | ot | ) |
Definition at line 910 of file editmesh_path.c.
References wmOperatorType::description, ED_operator_editmesh(), edbm_shortest_path_select_exec(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, path_select_poll_property(), path_select_properties(), wmOperatorType::poll, and wmOperatorType::poll_property.
Referenced by ED_operatortypes_mesh().
|
static |
Definition at line 368 of file editmesh_path.c.
References BKE_editmesh_from_object(), BLI_linklist_free(), BMEditMesh::bm, bm, BM_edge_select_set(), BM_mesh_calc_path_edge(), BM_mesh_calc_path_region_edge(), BM_select_history_remove, BM_select_history_store, Object::data, ED_uvedit_live_unwrap(), EDBM_selectmode_flush(), EDBM_update(), PathSelectParams::edge_mode, EDGE_MODE_SELECT, EDGE_MODE_TAG_SEAM, edgetag_ensure_cd_flag(), edgetag_filter_cb(), edgetag_set_cb(), edgetag_test_cb(), PathSelectParams::interval_params, node, NULL, UserData::op_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 edbm_shortest_path_pick_ex().
|
static |
Definition at line 503 of file editmesh_path.c.
References BKE_editmesh_from_object(), BLI_linklist_free(), BMEditMesh::bm, bm, BM_mesh_active_face_set(), BM_mesh_calc_path_face(), BM_mesh_calc_path_region_face(), BM_select_history_remove, BM_select_history_store, Object::data, EDBM_selectmode_flush(), EDBM_update(), facetag_filter_cb(), facetag_set_cb(), facetag_test_cb(), PathSelectParams::interval_params, node, NULL, UserData::op_params, 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 edbm_shortest_path_pick_ex().
|
static |
Definition at line 175 of file editmesh_path.c.
References BKE_editmesh_from_object(), BLI_linklist_free(), BMEditMesh::bm, bm, BM_elem_flag_test, BM_ELEM_SELECT, BM_mesh_calc_path_region_vert(), BM_mesh_calc_path_vert(), BM_select_history_remove, BM_select_history_store, Object::data, EDBM_selectmode_flush(), EDBM_update(), PathSelectParams::interval_params, node, NULL, UserData::op_params, 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 edbm_shortest_path_pick_ex().
|
static |
Definition at line 108 of file editmesh_path.c.
References PathSelectParams::edge_mode, ToolSettings::edge_mode, wmOperator::flag, PathSelectParams::interval_params, OP_IS_INVOKE, wmOperator::ptr, RNA_boolean_get(), RNA_property_enum_get(), RNA_property_enum_set(), RNA_property_is_set(), RNA_struct_find_property(), PathSelectParams::track_active, PathSelectParams::use_face_step, PathSelectParams::use_fill, PathSelectParams::use_topology_distance, and WM_operator_properties_checker_interval_from_op().
Referenced by edbm_shortest_path_pick_exec(), edbm_shortest_path_pick_invoke(), and edbm_shortest_path_select_exec().
|
static |
Definition at line 133 of file editmesh_path.c.
References C, CTX_data_scene(), RNA_property_identifier(), SCE_SELECT_EDGE, scene, ToolSettings::selectmode, STREQ, and Scene::toolsettings.
Referenced by MESH_OT_shortest_path_pick(), and MESH_OT_shortest_path_select().
|
static |
Definition at line 71 of file editmesh_path.c.
References EDGE_MODE_SELECT, EDGE_MODE_TAG_BEVEL, EDGE_MODE_TAG_CREASE, EDGE_MODE_TAG_FREESTYLE, EDGE_MODE_TAG_SEAM, EDGE_MODE_TAG_SHARP, NULL, ot, RNA_def_boolean(), RNA_def_enum(), wmOperatorType::srna, and WM_operator_properties_checker_interval().
Referenced by MESH_OT_shortest_path_pick(), and MESH_OT_shortest_path_select().
Definition at line 161 of file editmesh_path.c.
References BM_elem_flag_test, BM_ELEM_HIDDEN, and v.
Referenced by mouse_mesh_shortest_path_vert().
Definition at line 169 of file editmesh_path.c.
References BM_vert_select_set(), user_data, and v.
Referenced by mouse_mesh_shortest_path_vert().
Definition at line 165 of file editmesh_path.c.
References BM_elem_flag_test_bool, BM_ELEM_SELECT, and v.
Referenced by mouse_mesh_shortest_path_vert().