Blender
V3.3
|
#include "DNA_object_types.h"
#include "MEM_guardedalloc.h"
#include "BLI_math.h"
#include "BLI_string.h"
#include "BLT_translation.h"
#include "DNA_mesh_types.h"
#include "BKE_context.h"
#include "BKE_editmesh.h"
#include "BKE_layer.h"
#include "BKE_modifier.h"
#include "BKE_report.h"
#include "BKE_unit.h"
#include "UI_interface.h"
#include "ED_mesh.h"
#include "ED_numinput.h"
#include "ED_screen.h"
#include "ED_space_api.h"
#include "ED_view3d.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_enum_types.h"
#include "WM_api.h"
#include "WM_types.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_query.h"
#include "mesh_intern.h"
Go to the source code of this file.
Classes | |
struct | MeshCoordsCache |
struct | RingSelOpData |
Macros | |
#define | SUBD_SMOOTH_MAX 4.0f |
#define | SUBD_CUTS_MAX 500 |
Typedefs | |
typedef struct RingSelOpData | RingSelOpData |
#define SUBD_CUTS_MAX 500 |
Definition at line 47 of file editmesh_loopcut.c.
#define SUBD_SMOOTH_MAX 4.0f |
Definition at line 46 of file editmesh_loopcut.c.
typedef struct RingSelOpData RingSelOpData |
|
static |
Definition at line 94 of file editmesh_loopcut.c.
References RingSelOpData::bases, RingSelOpData::bases_len, BKE_editmesh_from_object(), BMEditMesh::bm, BM_edge_select_set(), BM_ELEM_SELECT, BMW_begin(), BMW_EDGERING, BMW_end(), BMW_FLAG_TEST_HIDDEN, BMW_init(), BMW_MASK_NOP, BMW_NIL_LAY, BMW_step(), Object::data, DEG_id_tag_update(), EDBM_flag_disable_all(), RingSelOpData::eed, RingSelOpData::em, RingSelOpData::extend, ID_RECALC_SELECT, NC_GEOM, ND_SELECT, Base::object, and WM_main_add_notifier().
Referenced by ringsel_finish().
|
static |
Definition at line 500 of file editmesh_loopcut.c.
References C, loopcut_init(), and NULL.
Referenced by MESH_OT_loopcut().
|
static |
Definition at line 505 of file editmesh_loopcut.c.
References RingSelOpData::base_index, BMEditMesh::bm, BM_EDGE, BM_elem_index_get, BM_mesh_elem_index_ensure(), C, ED_region_tag_redraw(), ED_workspace_status_text(), RingSelOpData::eed, RingSelOpData::em, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RingSelOpData::region, ringcut_cancel(), ringsel_exit(), ringsel_finish(), and RNA_int_set().
Referenced by loopcut_modal().
|
static |
Definition at line 366 of file editmesh_loopcut.c.
References RingSelOpData::base_index, RingSelOpData::bases, RingSelOpData::bases_len, BKE_editmesh_from_object(), BKE_modifiers_is_deformed_by_armature(), BKE_modifiers_is_deformed_by_lattice(), BKE_report(), BKE_view_layer_array_from_bases_in_edit_mode, BMEditMesh::bm, BM_EDGE, BM_edge_at_index(), BM_mesh_elem_table_ensure(), C, copy_v2_v2_int(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), wmOperator::customdata, e, ED_view3d_viewcontext_init_object(), ED_workspace_status_text(), ViewContext::em, wmOperator::flag, RingSelOpData::geom_cache, loopcut_mouse_move(), loopcut_update_edge(), MEM_callocN, MEM_freeN, ViewContext::mval, wmEvent::mval, NULL, Base::object, OP_IS_MODAL_CURSOR_REGION, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, wmOperator::ptr, wmOperator::reports, ringsel_exit(), ringsel_finish(), ringsel_init(), RNA_boolean_set_array(), RNA_int_get(), RPT_WARNING, SCE_SELECT_EDGE, SCE_SELECT_FACE, SCE_SELECT_VERTEX, scene, ToolSettings::selectmode, TIP_, Scene::toolsettings, BMesh::totedge, RingSelOpData::vc, view3d_operator_needs_opengl(), and WM_event_add_modal_handler().
Referenced by loopcut_exec(), and ringcut_invoke().
|
static |
Definition at line 529 of file editmesh_loopcut.c.
References applyNumInput(), BLI_snprintf(), C, clamp_f(), CTX_data_scene(), wmOperator::customdata, RingSelOpData::cuts, ED_region_tag_redraw(), ED_workspace_status_text(), em_setup_viewcontext(), EVT_ESCKEY, EVT_PADENTER, EVT_PADMINUS, EVT_PADPLUSKEY, EVT_PAGEDOWNKEY, EVT_PAGEUPKEY, EVT_RETKEY, handleNumInput(), hasNumInput(), KM_ALT, KM_PRESS, KM_RELEASE, LEFTMOUSE, loopcut_finish(), loopcut_mouse_move(), max_ff(), wmEvent::modifier, MOUSEMOVE, MOUSEPAN, ViewContext::mval, NDOF_MOTION, NULL, RingSelOpData::num, NUM_STR_REP_LEN, OPERATOR_CANCELLED, OPERATOR_PASS_THROUGH, OPERATOR_RUNNING_MODAL, outputNumInput(), wmOperator::ptr, ViewContext::region, RingSelOpData::region, RIGHTMOUSE, ringcut_cancel(), ringsel_exit(), ringsel_find_edge(), RNA_float_set(), RNA_int_set(), RingSelOpData::smoothness, SUBD_CUTS_MAX, SUBD_SMOOTH_MAX, TIP_, wmEvent::type, UI_MAX_DRAW_STR, Scene::unit, wmEvent::val, RingSelOpData::vc, view3d_operator_needs_opengl(), WHEELDOWNMOUSE, and WHEELUPMOUSE.
Referenced by MESH_OT_loopcut().
|
static |
Definition at line 337 of file editmesh_loopcut.c.
References RingSelOpData::base_index, RingSelOpData::bases, RingSelOpData::bases_len, ED_view3d_select_dist_px(), ED_view3d_viewcontext_init_object(), EDBM_edge_find_nearest_ex(), loopcut_update_edge(), NULL, Base::object, and RingSelOpData::vc.
Referenced by loopcut_init(), and loopcut_modal().
|
static |
Definition at line 318 of file editmesh_loopcut.c.
References RingSelOpData::base_index, e, RingSelOpData::eed, ViewContext::em, RingSelOpData::em, NULL, RingSelOpData::ob, ViewContext::obedit, ringsel_find_edge(), UINT_MAX, and RingSelOpData::vc.
Referenced by loopcut_init(), and loopcut_mouse_move().
void MESH_OT_loopcut | ( | wmOperatorType * | ot | ) |
Definition at line 719 of file editmesh_loopcut.c.
References BLT_I18NCONTEXT_ID_CURVE_LEGACY, wmOperatorType::cancel, wmOperatorType::description, ED_operator_editmesh_region_view3d(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, loopcut_exec(), loopcut_modal(), wmOperatorType::modal, wmOperatorType::name, NULL, OPTYPE_BLOCKING, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, PROP_ENUM, PROP_HIDDEN, PROP_INVSQUARE, PROP_NONE, PROP_SKIP_SAVE, ringcut_cancel(), ringcut_invoke(), RNA_def_boolean_array(), RNA_def_float(), RNA_def_int(), RNA_def_property(), RNA_def_property_enum_default(), RNA_def_property_enum_items(), RNA_def_property_flag(), RNA_def_property_translation_context(), RNA_def_property_ui_text(), rna_enum_proportional_falloff_curve_only_items, wmOperatorType::srna, SUBD_SMOOTH_MAX, and WM_operatortype_props_advanced_begin().
Referenced by ED_operatortypes_mesh().
|
static |
Definition at line 312 of file editmesh_loopcut.c.
References C, and ringsel_exit().
Referenced by loopcut_finish(), loopcut_modal(), and MESH_OT_loopcut().
|
static |
Definition at line 474 of file editmesh_loopcut.c.
References C, CTX_wm_region(), ListBase::first, ARegion::gizmo_map, wmGizmoGroup::gizmos, loopcut_init(), NULL, OPERATOR_CANCELLED, wmOperator::ptr, wmGizmo::ptr, RNA_int_get(), RNA_int_set(), and WM_gizmomap_group_find().
Referenced by MESH_OT_loopcut().
Definition at line 88 of file editmesh_loopcut.c.
References EDBM_preselect_edgering_draw(), RingSelOpData::ob, Object::obmat, and RingSelOpData::presel_edgering.
Referenced by ringsel_init().
|
static |
Definition at line 247 of file editmesh_loopcut.c.
References RingSelOpData::bases, RingSelOpData::bases_len, MeshCoordsCache::coords, wmOperator::customdata, RingSelOpData::draw_handle, ED_region_draw_cb_exit(), ED_region_tag_redraw(), EDBM_preselect_edgering_destroy(), RingSelOpData::geom_cache, MeshCoordsCache::is_alloc, MEM_freeN, NULL, RingSelOpData::presel_edgering, RingSelOpData::region, and ARegion::type.
Referenced by loopcut_finish(), loopcut_init(), loopcut_modal(), and ringcut_cancel().
|
static |
Definition at line 129 of file editmesh_loopcut.c.
References RingSelOpData::base_index, BKE_editmesh_from_object(), BKE_editmesh_vert_coords_when_deformed(), BMEditMesh::bm, MeshCoordsCache::coords, DEG_get_evaluated_id(), DEG_get_evaluated_object(), ViewContext::depsgraph, EDBM_preselect_edgering_clear(), EDBM_preselect_edgering_update_from_edge(), RingSelOpData::eed, RingSelOpData::em, RingSelOpData::geom_cache, Scene::id, MeshCoordsCache::is_alloc, MeshCoordsCache::is_init, NULL, RingSelOpData::ob, RingSelOpData::presel_edgering, ViewContext::scene, and RingSelOpData::vc.
Referenced by loopcut_modal(), and loopcut_update_edge().
|
static |
Definition at line 150 of file editmesh_loopcut.c.
References BMEditMesh::bm, BM_edge_is_any_face_len_test(), BM_edge_is_wire(), BM_ELEM_SELECT, BM_mesh_esubdivide(), BM_select_history_store, BM_vert_select_set(), C, wmOperator::customdata, Object::data, DEG_id_tag_update(), RingSelOpData::do_cut, EDBM_selectmode_disable_multi(), EDBM_selectmode_flush(), EDBM_selectmode_flush_ex(), EDBM_update(), edgering_select(), RingSelOpData::eed, RingSelOpData::em, ID_RECALC_SELECT, NC_GEOM, ND_SELECT, NULL, RingSelOpData::ob, wmOperator::opm, wmOperator::ptr, RNA_enum_get(), RNA_float_get(), RNA_int_get(), SCE_SELECT_EDGE, SCE_SELECT_FACE, SCE_SELECT_VERTEX, BMEditMesh::selectmode, SUBD_CORNER_PATH, SUBDIV_SELECT_INNER, SUBDIV_SELECT_LOOPCUT, SUBDIV_SELECT_NONE, BMEdge::v1, BMEdge::v2, and WM_event_add_notifier().
Referenced by loopcut_finish(), and loopcut_init().
|
static |
Definition at line 274 of file editmesh_loopcut.c.
References B_UNIT_NONE, C, CTX_data_ensure_evaluated_depsgraph(), CTX_data_scene(), CTX_wm_region(), wmOperator::customdata, RingSelOpData::cuts, RingSelOpData::depsgraph, RingSelOpData::do_cut, RingSelOpData::draw_handle, ED_region_draw_cb_activate(), ED_region_tag_redraw(), EDBM_preselect_edgering_create(), RingSelOpData::em, em_setup_viewcontext(), RingSelOpData::extend, NumInput::idx_max, initNumInput(), MEM_callocN, NULL, RingSelOpData::num, NUM_NO_FRACTION, NUM_NO_NEGATIVE, RingSelOpData::ob, RingSelOpData::presel_edgering, wmOperator::ptr, RingSelOpData::region, REGION_DRAW_POST_VIEW, ringsel_draw(), RNA_boolean_get(), RNA_float_get(), RNA_int_get(), scene, RingSelOpData::smoothness, UnitSettings::system, ARegion::type, Scene::unit, NumInput::unit_sys, NumInput::unit_type, NumInput::val_flag, and RingSelOpData::vc.
Referenced by loopcut_init().