|
Blender V4.3
|
#include "MEM_guardedalloc.h"#include "DNA_object_types.h"#include "BLT_translation.hh"#include "BKE_context.hh"#include "BKE_editmesh.hh"#include "BKE_global.hh"#include "BKE_layer.hh"#include "BKE_report.hh"#include "BKE_workspace.hh"#include "BLI_math_geom.h"#include "BLI_math_matrix.h"#include "BLI_math_rotation.h"#include "BLI_math_vector.h"#include "RNA_access.hh"#include "RNA_define.hh"#include "WM_api.hh"#include "WM_types.hh"#include "ED_gizmo_utils.hh"#include "ED_mesh.hh"#include "ED_screen.hh"#include "ED_view3d.hh"#include "UI_resources.hh"#include "mesh_intern.hh"#include "ED_gizmo_library.hh"#include "ED_undo.hh"Go to the source code of this file.
Classes | |
| struct | BisectData |
| struct | BisectData::BisectDataBackup |
| struct | GizmoGroup |
Macros | |
| #define | USE_GIZMO |
| #define USE_GIZMO |
Definition at line 42 of file editmesh_bisect.cc.
|
static |
Definition at line 181 of file editmesh_bisect.cc.
References BisectData::backup, BisectData::backup_len, EDBM_redo_state_free(), G, BisectData::BisectDataBackup::is_valid, MEM_freeN(), and BisectData::BisectDataBackup::mesh_backup.
Referenced by mesh_bisect_modal().
|
static |
XXX. calling redo from property updates is not great. This is needed because changing the RNA doesn't cause a redo and we're not using operator UI which does just this.
Definition at line 499 of file editmesh_bisect.cc.
References GizmoGroup::context, GizmoGroup::data, ED_undo_operator_repeat(), GizmoGroup::op, and WM_operator_last_redo().
Referenced by gizmo_bisect_prop_angle_set(), gizmo_bisect_prop_depth_set(), and gizmo_bisect_prop_translate_set().
|
static |
Definition at line 613 of file editmesh_bisect.cc.
References angle(), angle_signed_on_axis_v3v3_v3(), wmGizmoPropertyType::array_length, BLI_assert, wmGizmoGroup::customdata, GizmoGroup::data, is_zero_v3(), normalize_v3(), GizmoGroup::op, wmGizmo::parent_gzgroup, project_plane_normalized_v3_v3v3(), GizmoGroup::prop_plane_no, wmOperator::ptr, RNA_property_float_get_array(), GizmoGroup::rotate_axis, GizmoGroup::rotate_up, wmGizmoProperty::type, and UNUSED_VARS_NDEBUG.
Referenced by gizmo_mesh_bisect_setup().
|
static |
Definition at line 639 of file editmesh_bisect.cc.
References angle_compat_rad(), angle_signed_on_axis_v3v3_v3(), wmGizmoPropertyType::array_length, axis_angle_normalized_to_mat3(), BLI_assert, wmGizmoGroup::customdata, GizmoGroup::data, gizmo_bisect_exec(), is_zero_v3(), mul_m3_v3(), normalize_v3(), GizmoGroup::op, wmGizmo::parent_gzgroup, project_plane_normalized_v3_v3v3(), GizmoGroup::prop_plane_no, wmOperator::ptr, RNA_property_float_get_array(), RNA_property_float_set_array(), GizmoGroup::rotate_axis, GizmoGroup::rotate_up, wmGizmoProperty::type, and UNUSED_VARS_NDEBUG.
Referenced by gizmo_mesh_bisect_setup().
|
static |
Definition at line 540 of file editmesh_bisect.cc.
References wmGizmoPropertyType::array_length, BLI_assert, wmGizmoGroup::customdata, GizmoGroup::data, dot_v3v3(), wmGizmo::matrix_basis, GizmoGroup::op, wmGizmo::parent_gzgroup, GizmoGroup::prop_plane_co, GizmoGroup::prop_plane_no, wmOperator::ptr, RNA_property_float_get_array(), wmGizmoProperty::type, and UNUSED_VARS_NDEBUG.
Referenced by gizmo_mesh_bisect_setup().
|
static |
Definition at line 556 of file editmesh_bisect.cc.
References wmGizmoPropertyType::array_length, BLI_assert, closest_to_plane_normalized_v3(), wmGizmoGroup::customdata, GizmoGroup::data, dot_v3v3(), gizmo_bisect_exec(), wmGizmo::matrix_basis, normalize_v3(), GizmoGroup::op, wmGizmo::parent_gzgroup, GizmoGroup::prop_plane_co, GizmoGroup::prop_plane_no, wmOperator::ptr, RNA_property_float_get_array(), RNA_property_float_set_array(), wmGizmoProperty::type, and UNUSED_VARS_NDEBUG.
Referenced by gizmo_mesh_bisect_setup().
|
static |
Definition at line 583 of file editmesh_bisect.cc.
References wmGizmoPropertyType::array_length, BLI_assert, wmGizmoGroup::customdata, GizmoGroup::data, GizmoGroup::op, wmGizmo::parent_gzgroup, GizmoGroup::prop_plane_co, wmOperator::ptr, RNA_property_float_get_array(), wmGizmoProperty::type, and UNUSED_VARS_NDEBUG.
Referenced by gizmo_mesh_bisect_setup().
|
static |
Definition at line 596 of file editmesh_bisect.cc.
References wmGizmoPropertyType::array_length, BLI_assert, wmGizmoGroup::customdata, GizmoGroup::data, gizmo_bisect_exec(), GizmoGroup::op, wmGizmo::parent_gzgroup, GizmoGroup::prop_plane_co, wmOperator::ptr, RNA_property_float_set_array(), wmGizmoProperty::type, and UNUSED_VARS_NDEBUG.
Referenced by gizmo_mesh_bisect_setup().
|
static |
Definition at line 748 of file editmesh_bisect.cc.
References GizmoGroup::context, wmGizmoGroup::customdata, GizmoGroup::data, gizmo_mesh_bisect_update_from_op(), wmOperator::next, GizmoGroup::op, and WM_operator_last_redo().
Referenced by MESH_GGT_bisect().
|
static |
Definition at line 674 of file editmesh_bisect.cc.
References ED_gizmo_poll_or_unlink_delayed_from_operator().
Referenced by MESH_GGT_bisect().
|
static |
Definition at line 679 of file editmesh_bisect.cc.
References wmGizmo::color, GizmoGroup::context, wmGizmoGroup::customdata, GizmoGroup::data, ED_GIZMO_ARROW_STYLE_NORMAL, ED_GIZMO_MOVE_STYLE_RING_2D, gizmo_bisect_prop_angle_get(), gizmo_bisect_prop_angle_set(), gizmo_bisect_prop_depth_get(), gizmo_bisect_prop_depth_set(), gizmo_bisect_prop_translate_get(), gizmo_bisect_prop_translate_set(), gizmo_mesh_bisect_update_from_op(), wmOperatorType::idname, MEM_callocN, GizmoGroup::op, params, GizmoGroup::prop_plane_co, GizmoGroup::prop_plane_no, wmGizmo::ptr, wmOperator::ptr, RNA_enum_set(), RNA_struct_find_property(), GizmoGroup::rotate_c, STREQ, TH_GIZMO_PRIMARY, TH_GIZMO_SECONDARY, GizmoGroup::translate_c, GizmoGroup::translate_z, wmOperator::type, UI_GetThemeColor3fv(), WM_GIZMO_DRAW_VALUE, WM_gizmo_new_ptr(), WM_gizmo_set_flag(), WM_gizmo_target_property_def_func(), WM_gizmotype_find(), and WM_operator_last_redo().
Referenced by MESH_GGT_bisect().
|
static |
Definition at line 507 of file editmesh_bisect.cc.
References GizmoGroup::context, GizmoGroup::data, ED_view3d_context_rv3d(), normalize_v3(), normalize_v3_v3(), GizmoGroup::op, project_plane_normalized_v3_v3v3(), GizmoGroup::prop_plane_co, GizmoGroup::prop_plane_no, wmOperator::ptr, RNA_property_float_get_array(), GizmoGroup::rotate_axis, GizmoGroup::rotate_c, GizmoGroup::rotate_up, GizmoGroup::translate_c, GizmoGroup::translate_z, RegionView3D::viewinv, WM_gizmo_set_matrix_location(), WM_gizmo_set_matrix_rotation_from_z_axis(), and WM_gizmo_set_scale().
Referenced by gizmo_mesh_bisect_draw_prepare(), and gizmo_mesh_bisect_setup().
|
static |
Definition at line 229 of file editmesh_bisect.cc.
References BisectData::backup, BKE_editmesh_from_object(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data(), bm, BMEditMesh::bm, BM_EDGE, BM_ELEM_SELECT, BM_FACE, BM_VERT, BMO_op_exec(), BMO_op_finish(), BMO_op_initf(), BMO_slot_buffer_hflag_enable(), copy_v3_v3(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), wmOperator::customdata, Object::data, wmGenericUserData::data, ED_view3d_context_rv3d(), EDBM_flag_disable_all(), EDBM_op_finish(), EDBM_op_init(), EDBM_redo_state_restore(), EDBM_selectmode_flush(), EDBM_update(), invert_m4_m4(), BisectData::BisectDataBackup::is_dirty, BisectData::BisectDataBackup::is_valid, BisectData::BisectDataBackup::mesh_backup, mesh_bisect_interactive_calc(), mul_m4_v3(), mul_transposed_mat3_m4_v3(), normalize_v3_v3(), OPERATOR_CANCELLED, OPERATOR_FINISHED, params, wmOperator::ptr, ret, RNA_boolean_get(), RNA_float_get(), RNA_property_float_get_array(), RNA_property_float_set_array(), RNA_property_is_set(), RNA_struct_find_property(), BMOperator::slots_out, BMesh::totedgesel, wmGesture::user_data, and RegionView3D::viewinv.
Referenced by mesh_bisect_invoke(), and MESH_OT_bisect().
|
static |
Definition at line 68 of file editmesh_bisect.cc.
References cross_v3_v3v3(), CTX_wm_region(), CTX_wm_view3d(), ED_view3d_calc_zfac(), ED_view3d_win_to_3d(), ED_view3d_win_to_delta(), ED_view3d_win_to_vector(), float, negate_v3(), normalize_v3(), RegionView3D::ofs, wmOperator::ptr, RNA_boolean_get(), RNA_int_get(), and sub_v2_v2v2().
Referenced by mesh_bisect_exec().
|
static |
Definition at line 109 of file editmesh_bisect.cc.
References BisectData::backup, BisectData::backup_len, BKE_editmesh_from_object(), BKE_report(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data(), BMEditMesh::bm, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_region_view3d(), CTX_wm_view3d(), wmOperator::customdata, wmGenericUserData::data, ED_workspace_status_text(), EDBM_redo_state_store(), G, G_TRANSFORM_EDIT, IFACE_, BisectData::BisectDataBackup::is_valid, MEM_callocN, MEM_mallocN, BisectData::BisectDataBackup::mesh_backup, mesh_bisect_exec(), OPERATOR_CANCELLED, OPERATOR_RUNNING_MODAL, wmOperator::ptr, wmOperator::reports, ret, RNA_boolean_get(), RNA_struct_property_is_set(), RPT_ERROR, BMesh::totedgesel, wmGesture::user_data, WM_gesture_straightline_active_side_invoke(), and WM_gesture_straightline_invoke().
Referenced by MESH_OT_bisect().
|
static |
Definition at line 193 of file editmesh_bisect.cc.
References BKE_workspace_status_clear(), CTX_wm_view3d(), CTX_wm_workspace(), wmOperator::customdata, wmGenericUserData::data, edbm_bisect_exit(), View3D::gizmo_flag, OPERATOR_CANCELLED, OPERATOR_FINISHED, ret, wmGesture::user_data, V3D_GIZMO_HIDE, WM_gesture_straightline_modal(), and WM_gizmo_group_type_ensure().
Referenced by MESH_OT_bisect().
|
static |
Definition at line 757 of file editmesh_bisect.cc.
References wmGizmoGroupType::draw_prepare, wmGizmoGroupType::flag, gizmo_mesh_bisect_draw_prepare(), gizmo_mesh_bisect_poll(), gizmo_mesh_bisect_setup(), wmGizmoGroupType::gzmap_params, wmGizmoGroupType::idname, wmGizmoGroupType::name, wmGizmoGroupType::poll, wmGizmoMapType_Params::regionid, RGN_TYPE_WINDOW, wmGizmoGroupType::setup, SPACE_VIEW3D, wmGizmoMapType_Params::spaceid, WM_GIZMOGROUPTYPE_3D, and WM_GIZMOGROUPTYPE_DRAW_MODAL_EXCLUDE.
Referenced by MESH_OT_bisect().
| void MESH_OT_bisect | ( | wmOperatorType * | ot | ) |
Definition at line 399 of file editmesh_bisect.cc.
References BLT_I18NCONTEXT_ID_MASK, wmOperatorType::cancel, wmOperatorType::description, ED_operator_editmesh(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, mesh_bisect_exec(), mesh_bisect_invoke(), mesh_bisect_modal(), MESH_GGT_bisect(), wmOperatorType::modal, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_float(), RNA_def_float_vector(), RNA_def_float_vector_xyz(), RNA_def_property_flag(), RNA_def_property_translation_context(), RNA_def_property_ui_range(), wmOperatorType::srna, WM_CURSOR_EDIT, WM_gesture_straightline_cancel(), WM_gizmogrouptype_append(), and WM_operator_properties_gesture_straightline().
Referenced by ED_operatortypes_mesh().