|
Blender V4.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_vector.h"#include "BKE_context.hh"#include "BKE_customdata.hh"#include "BKE_editmesh.hh"#include "BKE_layer.hh"#include "BKE_mesh_types.hh"#include "BKE_report.hh"#include "ED_mesh.hh"#include "ED_object.hh"#include "ED_screen.hh"#include "ED_select_utils.hh"#include "ED_uvedit.hh"#include "ED_view3d.hh"#include "RNA_access.hh"#include "RNA_define.hh"#include "WM_api.hh"#include "WM_types.hh"#include "bmesh.hh"#include "bmesh_tools.hh"#include "DEG_depsgraph.hh"#include "mesh_intern.hh"Go to the source code of this file.
Classes | |
| struct | PathSelectParams |
| struct | UserData |
Functions | |
Vert Path | |
| static bool | verttag_filter_cb (BMVert *v, void *) |
| static bool | verttag_test_cb (BMVert *v, void *) |
| static void | verttag_set_cb (BMVert *v, bool val, void *user_data_v) |
| static void | mouse_mesh_shortest_path_vert (Scene *, Object *obedit, const PathSelectParams *op_params, BMVert *v_act, BMVert *v_dst) |
Edge Path | |
| static bool | edgetag_filter_cb (BMEdge *e, void *) |
| static bool | edgetag_test_cb (BMEdge *e, void *user_data_v) |
| static void | edgetag_set_cb (BMEdge *e, bool val, void *user_data_v) |
| static void | edgetag_ensure_cd_flag (Mesh *mesh, const char edge_mode) |
| static void | mouse_mesh_shortest_path_edge (Scene *scene, Object *obedit, const PathSelectParams *op_params, BMEdge *e_act, BMEdge *e_dst) |
Face Path | |
| static bool | facetag_filter_cb (BMFace *f, void *) |
| static bool | facetag_test_cb (BMFace *f, void *) |
| static void | facetag_set_cb (BMFace *f, bool val, void *user_data_v) |
| static void | mouse_mesh_shortest_path_face (Scene *, Object *obedit, const PathSelectParams *op_params, BMFace *f_act, BMFace *f_dst) |
Main Operator for vert/edge/face tag | |
| static bool | edbm_shortest_path_pick_ex (Scene *scene, Object *obedit, const PathSelectParams *op_params, BMElem *ele_src, BMElem *ele_dst) |
| static int | edbm_shortest_path_pick_exec (bContext *C, wmOperator *op) |
| static BMElem * | edbm_elem_find_nearest (ViewContext *vc, const char htype) |
| static BMElem * | edbm_elem_active_elem_or_face_get (BMesh *bm) |
| static int | edbm_shortest_path_pick_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
| void | MESH_OT_shortest_path_pick (wmOperatorType *ot) |
Select Path Between Existing Selection | |
| static int | edbm_shortest_path_select_exec (bContext *C, wmOperator *op) |
| void | MESH_OT_shortest_path_select (wmOperatorType *ot) |
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, PathSelectParams *op_params) |
| static bool | path_select_poll_property (const bContext *C, wmOperator *, 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 56 of file editmesh_path.cc.
Definition at line 697 of file editmesh_path.cc.
References BMesh::act_face, bm, BM_elem_flag_test, BM_ELEM_SELECT, and BM_mesh_active_elem_get().
Referenced by edbm_shortest_path_pick_exec(), and edbm_shortest_path_pick_invoke().
|
static |
Definition at line 679 of file editmesh_path.cc.
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, SCE_SELECT_EDGE, SCE_SELECT_FACE, SCE_SELECT_VERTEX, and BMEditMesh::selectmode.
Referenced by edbm_shortest_path_pick_invoke().
|
static |
Definition at line 645 of file editmesh_path.cc.
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, 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 790 of file editmesh_path.cc.
References BKE_editmesh_from_object(), bm, BMEditMesh::bm, 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(), 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 708 of file editmesh_path.cc.
References blender::ed::object::base_activate(), BKE_view_layer_active_base_get(), BKE_view_layer_array_from_bases_in_edit_mode(), BKE_view_layer_synced_ensure(), BMEditMesh::bm, BM_EDGE, BM_mesh_elem_index_ensure(), copy_v2_v2_int(), 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, ViewContext::mval, wmEvent::mval, 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 852 of file editmesh_path.cc.
References BKE_editmesh_from_object(), BKE_report(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data(), bm, BMEditMesh::bm, BM_EDGES_OF_MESH, BM_elem_flag_test, BM_ELEM_SELECT, BM_FACES_OF_MESH, BM_ITER_MESH, BM_VERTS_OF_MESH, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), edbm_shortest_path_pick_ex(), BMEditSelection::ele, BMEditSelection::htype, ListBase::last, OPERATOR_CANCELLED, OPERATOR_FINISHED, path_select_params_from_op(), BMEditSelection::prev, wmOperator::reports, RPT_WARNING, SCE_SELECT_EDGE, SCE_SELECT_FACE, SCE_SELECT_VERTEX, BMesh::selected, BMEditMesh::selectmode, BMesh::totedgesel, BMesh::totfacesel, and BMesh::totvertsel.
Referenced by MESH_OT_shortest_path_select().
|
static |
Definition at line 358 of file editmesh_path.cc.
References bm, BM_data_layer_add(), BM_data_layer_add_named(), CD_FREESTYLE_EDGE, CD_PROP_FLOAT, CustomData_has_layer(), CustomData_has_layer_named(), BMesh::edata, EDGE_MODE_TAG_BEVEL, EDGE_MODE_TAG_CREASE, and EDGE_MODE_TAG_FREESTYLE.
Referenced by mouse_mesh_shortest_path_edge().
|
static |
Definition at line 291 of file editmesh_path.cc.
References BM_elem_flag_test, BM_ELEM_HIDDEN, and e.
Referenced by mouse_mesh_shortest_path_edge().
|
static |
Definition at line 321 of file editmesh_path.cc.
References bm, UserData::bm, BM_edge_select_set(), BM_ELEM_CD_SET_FLOAT, BM_elem_flag_set, BM_ELEM_SEAM, BM_ELEM_SMOOTH, CD_FREESTYLE_EDGE, UserData::cd_offset, CustomData_bmesh_get(), BMHeader::data, e, BMesh::edata, PathSelectParams::edge_mode, 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 UserData::op_params.
Referenced by mouse_mesh_shortest_path_edge().
|
static |
Definition at line 295 of file editmesh_path.cc.
References bm, UserData::bm, BM_ELEM_CD_GET_FLOAT, BM_elem_flag_test, BM_ELEM_SEAM, BM_ELEM_SELECT, BM_ELEM_SMOOTH, CD_FREESTYLE_EDGE, UserData::cd_offset, CustomData_bmesh_get(), BMHeader::data, e, BMesh::edata, PathSelectParams::edge_mode, EDGE_MODE_SELECT, EDGE_MODE_TAG_BEVEL, EDGE_MODE_TAG_CREASE, EDGE_MODE_TAG_FREESTYLE, EDGE_MODE_TAG_SEAM, EDGE_MODE_TAG_SHARP, false, FreestyleEdge::flag, FREESTYLE_EDGE_MARK, BMVert::head, UserData::op_params, and true.
Referenced by mouse_mesh_shortest_path_edge().
|
static |
Definition at line 516 of file editmesh_path.cc.
References BM_elem_flag_test, and BM_ELEM_HIDDEN.
Referenced by mouse_mesh_shortest_path_face().
|
static |
Definition at line 526 of file editmesh_path.cc.
References UserData::bm, and BM_face_select_set().
Referenced by mouse_mesh_shortest_path_face().
|
static |
Definition at line 521 of file editmesh_path.cc.
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 820 of file editmesh_path.cc.
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 950 of file editmesh_path.cc.
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 388 of file editmesh_path.cc.
References BKE_editmesh_from_object(), BLI_linklist_free(), bm, BMEditMesh::bm, BM_edge_select_set(), BM_mesh_calc_path_edge(), BM_mesh_calc_path_region_edge(), BM_select_history_remove, BM_select_history_store, CD_PROP_FLOAT, CustomData_get_offset_named(), Object::data, ED_uvedit_live_unwrap(), BMesh::edata, EDBM_selectmode_flush(), EDBM_update(), PathSelectParams::edge_mode, EDGE_MODE_SELECT, EDGE_MODE_TAG_BEVEL, EDGE_MODE_TAG_CREASE, EDGE_MODE_TAG_FREESTYLE, EDGE_MODE_TAG_SEAM, EDGE_MODE_TAG_SHARP, edgetag_ensure_cd_flag(), edgetag_filter_cb(), edgetag_set_cb(), edgetag_test_cb(), PathSelectParams::interval_params, node, params, PathSelectParams::track_active, PathSelectParams::use_face_step, PathSelectParams::use_fill, PathSelectParams::use_topology_distance, and WM_operator_properties_checker_interval_test().
Referenced by edbm_shortest_path_pick_ex().
|
static |
Definition at line 532 of file editmesh_path.cc.
References BKE_editmesh_from_object(), BLI_linklist_free(), bm, BMEditMesh::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, CD_PROP_FLOAT, CustomData_get_offset_named(), Object::data, BMesh::edata, EDBM_selectmode_flush(), EDBM_update(), PathSelectParams::edge_mode, EDGE_MODE_SELECT, EDGE_MODE_TAG_BEVEL, EDGE_MODE_TAG_CREASE, EDGE_MODE_TAG_FREESTYLE, EDGE_MODE_TAG_SEAM, EDGE_MODE_TAG_SHARP, facetag_filter_cb(), facetag_set_cb(), facetag_test_cb(), PathSelectParams::interval_params, node, params, PathSelectParams::track_active, PathSelectParams::use_face_step, PathSelectParams::use_fill, PathSelectParams::use_topology_distance, and WM_operator_properties_checker_interval_test().
Referenced by edbm_shortest_path_pick_ex().
|
static |
Definition at line 180 of file editmesh_path.cc.
References BKE_editmesh_from_object(), BLI_linklist_free(), bm, BMEditMesh::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, CD_PROP_FLOAT, CustomData_get_offset_named(), Object::data, BMesh::edata, EDBM_selectmode_flush(), EDBM_update(), PathSelectParams::edge_mode, EDGE_MODE_SELECT, EDGE_MODE_TAG_BEVEL, EDGE_MODE_TAG_CREASE, EDGE_MODE_TAG_FREESTYLE, EDGE_MODE_TAG_SEAM, EDGE_MODE_TAG_SHARP, PathSelectParams::interval_params, node, params, PathSelectParams::track_active, PathSelectParams::use_face_step, PathSelectParams::use_fill, PathSelectParams::use_topology_distance, 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 112 of file editmesh_path.cc.
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 137 of file editmesh_path.cc.
References CTX_data_scene(), RNA_property_identifier(), SCE_SELECT_EDGE, ToolSettings::selectmode, and STREQ.
Referenced by MESH_OT_shortest_path_pick(), and MESH_OT_shortest_path_select().
|
static |
Definition at line 75 of file editmesh_path.cc.
References EDGE_MODE_SELECT, EDGE_MODE_TAG_BEVEL, EDGE_MODE_TAG_CREASE, EDGE_MODE_TAG_FREESTYLE, EDGE_MODE_TAG_SEAM, EDGE_MODE_TAG_SHARP, 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().
|
static |
Definition at line 166 of file editmesh_path.cc.
References BM_elem_flag_test, BM_ELEM_HIDDEN, and v.
Referenced by mouse_mesh_shortest_path_vert().
|
static |
Definition at line 174 of file editmesh_path.cc.
References UserData::bm, BM_vert_select_set(), and v.
Referenced by mouse_mesh_shortest_path_vert().
|
static |
Definition at line 170 of file editmesh_path.cc.
References BM_elem_flag_test_bool, BM_ELEM_SELECT, and v.
Referenced by mouse_mesh_shortest_path_vert().