Blender
V3.3
|
#include "MEM_guardedalloc.h"
#include "DNA_object_types.h"
#include "BLI_math.h"
#include "BKE_context.h"
#include "BKE_editmesh.h"
#include "BKE_layer.h"
#include "BKE_mesh.h"
#include "BKE_report.h"
#include "WM_types.h"
#include "ED_mesh.h"
#include "ED_object.h"
#include "ED_scene.h"
#include "ED_screen.h"
#include "ED_transform.h"
#include "ED_view3d.h"
#include "bmesh.h"
#include "mesh_intern.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "WM_api.h"
#include "DEG_depsgraph.h"
Go to the source code of this file.
Tools to implement polygon building tool, an experimental tool for quickly constructing/manipulating faces.
Definition in file editmesh_polybuild.c.
|
static |
Definition at line 56 of file editmesh_polybuild.c.
References BKE_editmesh_from_object(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data, BMEditMesh::bm, Object::data, DEG_id_tag_update(), EDBM_flag_disable_all(), ID_RECALC_SELECT, MEM_freeN, and BMesh::totvertsel.
Referenced by edbm_polybuild_dissolve_at_cursor_invoke(), edbm_polybuild_face_at_cursor_invoke(), edbm_polybuild_split_at_cursor_invoke(), and edbm_polybuild_transform_at_cursor_invoke().
|
static |
Definition at line 176 of file editmesh_polybuild.c.
References ViewLayer::basact, BMEditMesh::bm, bm, BM_edge_collapse(), BM_elem_flag_enable, BM_ELEM_TAG, BM_FACE, BM_VERT, BM_vert_is_edge_pair(), BM_vert_is_wire(), C, Object::data, DEL_FACES, BMVert::e, ED_object_base_activate(), ED_view3d_init_mats_rv3d(), EDBM_flag_disable_all(), EDBM_op_callf(), edbm_preselect_or_active_init_viewcontext(), edbm_selectmode_ensure(), EDBM_update(), ViewContext::em, BMElem::head, BMHeader::htype, Object::imat, invert_m4_m4(), NULL, ViewContext::obedit, Object::obmat, OPERATOR_CANCELLED, OPERATOR_FINISHED, ViewContext::rv3d, SCE_SELECT_VERTEX, ViewContext::scene, ViewContext::view_layer, ViewContext::win, and WM_event_add_mousemove().
Referenced by MESH_OT_polybuild_delete_at_cursor().
|
static |
Definition at line 530 of file editmesh_polybuild.c.
References ViewLayer::basact, BMEditMesh::bm, bm, BM_EDGE, BM_edge_collapse(), BM_edge_loop_pair(), BM_elem_flag_enable, BM_ELEM_SELECT, BM_ELEM_TAG, BM_faces_join_pair(), BM_VERT, BM_vert_is_edge_pair(), C, Object::data, BMVert::e, ED_object_base_activate(), EDBM_flag_disable_all(), edbm_flag_disable_all_multi(), EDBM_op_callf(), edbm_preselect_or_active_init_viewcontext(), EDBM_update(), ViewContext::em, BMElem::head, BMHeader::htype, l_b, NULL, ViewContext::obedit, OPERATOR_CANCELLED, OPERATOR_FINISHED, ViewContext::v3d, ViewContext::view_layer, ViewContext::win, and WM_event_add_mousemove().
Referenced by MESH_OT_polybuild_dissolve_at_cursor().
|
static |
Definition at line 270 of file editmesh_polybuild.c.
References ViewLayer::basact, BMEditMesh::bm, bm, BM_CREATE_NOP, BM_DISK_EDGE_NEXT, BM_EDGE, BM_edge_calc_length_squared(), BM_edge_create(), BM_edge_is_boundary(), BM_edge_is_wire(), BM_edge_other_vert(), BM_edge_split(), BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ELEM_SELECT, BM_FACE, BM_face_create_verts(), BM_select_history_store, BM_VERT, BM_vert_create(), BM_vert_select_set(), C, center, CLAMPIS, BMVert::co, copy_v3_v3(), Scene::cursor, Object::data, BMVert::e, ED_object_base_activate(), ED_view3d_init_mats_rv3d(), ED_view3d_win_to_3d_int(), edbm_flag_disable_all_multi(), edbm_preselect_or_active_init_viewcontext(), edbm_selectmode_ensure(), EDBM_update(), ViewContext::em, BMLoop::f, BMElem::head, BMHeader::htype, Object::imat, invert_m4_m4(), BMEdge::l, l, BMFace::len, line_point_factor_v3(), View3DCursor::location, mid_v3_v3v3(), mul_m4_v3(), mul_v3_m4v3(), wmEvent::mval, NULL, ViewContext::obedit, Object::obmat, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, ViewContext::region, RNA_boolean_get(), ViewContext::rv3d, SCE_SELECT_VERTEX, ViewContext::scene, SWAP, BMLoop::v, BMEdge::v1, BMEdge::v2, ViewContext::v3d, ViewContext::view_layer, ViewContext::win, and WM_event_add_mousemove().
Referenced by MESH_OT_polybuild_face_at_cursor().
|
static |
Definition at line 445 of file editmesh_polybuild.c.
References ViewLayer::basact, BMEditMesh::bm, bm, BM_EDGE, BM_edge_split(), BM_ELEM_SELECT, BM_FACE, BM_select_history_store, BM_VERT, BM_vert_select_set(), C, center, CLAMPIS, BMVert::co, copy_v3_v3(), Object::data, ED_object_base_activate(), ED_view3d_init_mats_rv3d(), ED_view3d_win_to_3d_int(), edbm_flag_disable_all_multi(), edbm_preselect_or_active_init_viewcontext(), edbm_selectmode_ensure(), EDBM_update(), ViewContext::em, BMElem::head, BMHeader::hflag, BMHeader::htype, Object::imat, invert_m4_m4(), line_point_factor_v3(), mid_v3_v3v3(), mul_m4_v3(), wmEvent::mval, NULL, ViewContext::obedit, Object::obmat, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, ViewContext::region, ViewContext::rv3d, SCE_SELECT_VERTEX, ViewContext::scene, BMEdge::v1, BMEdge::v2, ViewContext::v3d, ViewContext::view_layer, ViewContext::win, and WM_event_add_mousemove().
Referenced by MESH_OT_polybuild_split_at_cursor().
|
static |
Definition at line 111 of file editmesh_polybuild.c.
References ViewLayer::basact, BMEditMesh::bm, bm, BM_EDGE, BM_edge_select_set(), BM_ELEM_SELECT, BM_FACE, BM_face_select_set(), BM_select_history_store, BM_VERT, BM_vert_select_set(), C, Object::data, ED_object_base_activate(), ED_view3d_init_mats_rv3d(), edbm_flag_disable_all_multi(), edbm_preselect_or_active_init_viewcontext(), edbm_selectmode_ensure(), EDBM_update(), ViewContext::em, BMElem::head, BMHeader::htype, Object::imat, invert_m4_m4(), NULL, ViewContext::obedit, Object::obmat, OPERATOR_CANCELLED, OPERATOR_FINISHED, ViewContext::rv3d, SCE_SELECT_VERTEX, ViewContext::scene, ViewContext::v3d, ViewContext::view_layer, ViewContext::win, and WM_event_add_mousemove().
Referenced by MESH_OT_polybuild_transform_at_cursor().
|
static |
Definition at line 74 of file editmesh_polybuild.c.
References ViewLayer::basact, BKE_editmesh_from_object(), BMEditMesh::bm, bm, BM_mesh_active_elem_get(), C, CTX_data_view_layer(), CTX_wm_region(), ED_view3d_gizmo_mesh_preselect_get_active(), ListBase::first, View3D::gizmo_flag, ARegion::gizmo_map, wmGizmoGroup::gizmos, NULL, Base::object, V3D_GIZMO_HIDE, V3D_GIZMO_HIDE_TOOL, and WM_gizmomap_group_find().
Referenced by edbm_preselect_or_active_init_viewcontext().
|
static |
Definition at line 98 of file editmesh_polybuild.c.
References C, ED_view3d_viewcontext_init_object(), edbm_preselect_or_active(), em_setup_viewcontext(), and ViewContext::v3d.
Referenced by edbm_polybuild_delete_at_cursor_invoke(), edbm_polybuild_dissolve_at_cursor_invoke(), edbm_polybuild_face_at_cursor_invoke(), edbm_polybuild_split_at_cursor_invoke(), and edbm_polybuild_transform_at_cursor_invoke().
|
static |
Definition at line 46 of file editmesh_polybuild.c.
References EDBM_selectmode_set(), scene, BMEditMesh::selectmode, ToolSettings::selectmode, and Scene::toolsettings.
Referenced by edbm_polybuild_delete_at_cursor_invoke(), edbm_polybuild_face_at_cursor_invoke(), edbm_polybuild_split_at_cursor_invoke(), and edbm_polybuild_transform_at_cursor_invoke().
void MESH_OT_polybuild_delete_at_cursor | ( | wmOperatorType * | ot | ) |
Definition at line 247 of file editmesh_polybuild.c.
References edbm_polybuild_delete_at_cursor_invoke(), EDBM_view3d_poll(), wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, P_MIRROR_DUMMY, P_PROPORTIONAL, wmOperatorType::poll, and Transform_Properties().
Referenced by ED_operatortypes_mesh().
void MESH_OT_polybuild_dissolve_at_cursor | ( | wmOperatorType * | ot | ) |
Definition at line 601 of file editmesh_polybuild.c.
References edbm_polybuild_dissolve_at_cursor_invoke(), EDBM_view3d_poll(), wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_mesh().
void MESH_OT_polybuild_face_at_cursor | ( | wmOperatorType * | ot | ) |
Definition at line 417 of file editmesh_polybuild.c.
References edbm_polybuild_face_at_cursor_invoke(), EDBM_view3d_poll(), wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, P_MIRROR_DUMMY, P_PROPORTIONAL, wmOperatorType::poll, RNA_def_boolean(), wmOperatorType::srna, and Transform_Properties().
Referenced by ED_operatortypes_mesh().
void MESH_OT_polybuild_split_at_cursor | ( | wmOperatorType * | ot | ) |
Definition at line 507 of file editmesh_polybuild.c.
References edbm_polybuild_split_at_cursor_invoke(), EDBM_view3d_poll(), wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, P_MIRROR_DUMMY, P_PROPORTIONAL, wmOperatorType::poll, and Transform_Properties().
Referenced by ED_operatortypes_mesh().
void MESH_OT_polybuild_transform_at_cursor | ( | wmOperatorType * | ot | ) |
Definition at line 159 of file editmesh_polybuild.c.
References edbm_polybuild_transform_at_cursor_invoke(), EDBM_view3d_poll(), wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, P_MIRROR_DUMMY, P_PROPORTIONAL, wmOperatorType::poll, and Transform_Properties().
Referenced by ED_operatortypes_mesh().