Blender V2.61 - r43446
|
#include <float.h>
#include <string.h>
#include <ctype.h>
#include <stdio.h>
#include "DNA_ID.h"
#include "DNA_object_types.h"
#include "DNA_screen_types.h"
#include "DNA_scene_types.h"
#include "DNA_userdef_types.h"
#include "DNA_windowmanager_types.h"
#include "MEM_guardedalloc.h"
#include "PIL_time.h"
#include "BLI_blenlib.h"
#include "BLI_dynstr.h"
#include "BLI_editVert.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BKE_blender.h"
#include "BKE_context.h"
#include "BKE_depsgraph.h"
#include "BKE_mesh.h"
#include "BKE_modifier.h"
#include "BKE_report.h"
#include "BKE_scene.h"
#include "BKE_array_mallocn.h"
#include "BIF_gl.h"
#include "BIF_glutil.h"
#include "IMB_imbuf_types.h"
#include "ED_screen.h"
#include "ED_space_api.h"
#include "ED_view3d.h"
#include "ED_mesh.h"
#include "ED_numinput.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "UI_interface.h"
#include "WM_api.h"
#include "WM_types.h"
#include "mesh_intern.h"
Go to the source code of this file.
Classes | |
struct | tringselOpData |
Typedefs | |
typedef struct tringselOpData | tringselOpData |
Functions | |
static void | ringsel_draw (const bContext *C, ARegion *UNUSED(ar), void *arg) |
static void | edgering_sel (tringselOpData *lcd, int previewlines, int select) |
static void | ringsel_find_edge (tringselOpData *lcd, int cuts) |
static void | ringsel_finish (bContext *C, wmOperator *op) |
static void | ringsel_exit (wmOperator *op) |
static int | ringsel_init (bContext *C, wmOperator *op, int do_cut) |
static int | ringcut_cancel (bContext *UNUSED(C), wmOperator *op) |
static int | ringsel_invoke (bContext *C, wmOperator *op, wmEvent *evt) |
static int | ringcut_invoke (bContext *C, wmOperator *op, wmEvent *evt) |
static int | ringcut_modal (bContext *C, wmOperator *op, wmEvent *event) |
void | MESH_OT_edgering_select (wmOperatorType *ot) |
void | MESH_OT_loopcut (wmOperatorType *ot) |
Definition in file loopcut.c.
typedef struct tringselOpData tringselOpData |
static void edgering_sel | ( | tringselOpData * | lcd, |
int | previewlines, | ||
int | select | ||
) | [static] |
Definition at line 133 of file loopcut.c.
References co, EditVert::co, EditFace::e1, EditFace::e2, EditFace::e3, EditFace::e4, tringselOpData::edges, EditMesh::edges, tringselOpData::eed, tringselOpData::em, EM_clear_flag_all(), EM_select_edge(), tringselOpData::extend, EditEdge::f, EditFace::f1, EditEdge::f1, EditEdge::f2, EditMesh::faces, ListBase::first, EditEdge::h, EditFace::h, i, MEM_freeN(), EditEdge::next, EditFace::next, NULL, SELECT, tringselOpData::totedge, EditFace::v1, EditFace::v2, EditFace::v3, EditFace::v4, V_DYNDECLARE, V_GROW, and VECCOPY.
Referenced by ringsel_find_edge(), and ringsel_finish().
void MESH_OT_edgering_select | ( | wmOperatorType * | ot | ) |
Definition at line 534 of file loopcut.c.
References wmOperatorType::description, ED_operator_editmesh_region_view3d(), wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, ringsel_invoke(), RNA_def_boolean(), and wmOperatorType::srna.
Referenced by ED_operatortypes_mesh().
void MESH_OT_loopcut | ( | wmOperatorType * | ot | ) |
Definition at line 551 of file loopcut.c.
References wmOperatorType::cancel, wmOperatorType::description, ED_operator_editmesh_region_view3d(), wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, ringcut_cancel(), ringcut_invoke(), ringcut_modal(), RNA_def_int(), and wmOperatorType::srna.
Referenced by ED_operatortypes_mesh().
static int ringcut_cancel | ( | bContext * | UNUSEDC, |
wmOperator * | op | ||
) | [static] |
Definition at line 362 of file loopcut.c.
References OPERATOR_CANCELLED, and ringsel_exit().
Referenced by MESH_OT_loopcut(), and ringcut_modal().
static int ringcut_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | evt | ||
) | [static] |
Definition at line 406 of file loopcut.c.
References BKE_report(), CTX_data_edit_object(), CTX_wm_area(), wmOperator::customdata, ED_area_headerprint(), tringselOpData::eed, findnearestedge(), modifiers_isDeformedByArmature(), modifiers_isDeformedByLattice(), ViewContext::mval, wmEvent::mval, OPERATOR_CANCELLED, OPERATOR_RUNNING_MODAL, wmOperator::reports, ringsel_find_edge(), ringsel_init(), RPT_WARNING, tringselOpData::vc, view3d_operator_needs_opengl(), and WM_event_add_modal_handler().
Referenced by MESH_OT_loopcut().
static int ringcut_modal | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 438 of file loopcut.c.
References applyNumInput(), tringselOpData::ar, CLAMPIS, CTX_wm_area(), wmOperator::customdata, ED_area_headerprint(), ED_region_tag_redraw(), tringselOpData::eed, ESCKEY, findnearestedge(), handleNumInput(), KM_PRESS, KM_RELEASE, LEFTMOUSE, MAX2, MOUSEMOVE, ViewContext::mval, NULL, tringselOpData::num, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, PADMINUS, PADPLUSKEY, PAGEDOWNKEY, PAGEUPKEY, wmOperator::ptr, RIGHTMOUSE, ringcut_cancel(), ringsel_exit(), ringsel_find_edge(), ringsel_finish(), RNA_int_get(), RNA_int_set(), wmEvent::type, wmEvent::val, tringselOpData::vc, view3d_operator_needs_opengl(), WHEELDOWNMOUSE, and WHEELUPMOUSE.
Referenced by MESH_OT_loopcut().
Definition at line 106 of file loopcut.c.
References CTX_wm_view3d(), tringselOpData::edges, glMultMatrixf, i, tringselOpData::ob, Object::obmat, tringselOpData::totedge, and View3D::zbuf.
Referenced by ringsel_init().
static void ringsel_exit | ( | wmOperator * | op | ) | [static] |
Definition at line 318 of file loopcut.c.
References tringselOpData::ar, wmOperator::customdata, tringselOpData::draw_handle, ED_region_draw_cb_exit(), ED_region_tag_redraw(), tringselOpData::edges, MEM_freeN(), NULL, and ARegion::type.
Referenced by ringcut_cancel(), ringcut_modal(), and ringsel_invoke().
static void ringsel_find_edge | ( | tringselOpData * | lcd, |
int | cuts | ||
) | [static] |
Definition at line 263 of file loopcut.c.
References edgering_sel(), tringselOpData::edges, tringselOpData::eed, MEM_freeN(), NULL, and tringselOpData::totedge.
Referenced by ringcut_invoke(), ringcut_modal(), and ringsel_invoke().
static void ringsel_finish | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 274 of file loopcut.c.
References BKE_mesh_get_editmesh(), CTX_data_scene(), CTX_data_tool_settings(), wmOperator::customdata, DAG_id_tag_update(), Object::data, tringselOpData::do_cut, edgering_sel(), EDITEDGE, EDITVERT, tringselOpData::eed, tringselOpData::em, EM_selectmode_flush(), EM_selectmode_set(), EM_store_selection(), esubdivideflag(), NC_GEOM, NC_SCENE, ND_DATA, ND_SELECT, ND_TOOLSETTINGS, tringselOpData::ob, wmOperator::ptr, RNA_int_get(), SCE_SELECT_EDGE, SCE_SELECT_FACE, SCE_SELECT_VERTEX, SELECT, EditMesh::selectmode, ToolSettings::selectmode, SUBDIV_SELECT_LOOPCUT, EditEdge::v1, and WM_event_add_notifier().
Referenced by ringcut_modal(), and ringsel_invoke().
static int ringsel_init | ( | bContext * | C, |
wmOperator * | op, | ||
int | do_cut | ||
) | [static] |
Definition at line 336 of file loopcut.c.
References tringselOpData::ar, BKE_mesh_get_editmesh(), CTX_data_edit_object(), CTX_wm_region(), wmOperator::customdata, Object::data, tringselOpData::do_cut, tringselOpData::draw_handle, ED_region_draw_cb_activate(), ED_region_tag_redraw(), tringselOpData::em, em_setup_viewcontext(), tringselOpData::extend, NumInput::flag, NumInput::idx_max, initNumInput(), MEM_callocN(), tringselOpData::num, NUM_NO_FRACTION, NUM_NO_NEGATIVE, tringselOpData::ob, wmOperator::ptr, REGION_DRAW_POST_VIEW, ringsel_draw(), RNA_boolean_get(), ARegion::type, and tringselOpData::vc.
Referenced by ringcut_invoke(), and ringsel_invoke().
static int ringsel_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | evt | ||
) | [static] |
Definition at line 369 of file loopcut.c.
References wmOperator::customdata, tringselOpData::eed, tringselOpData::em, findnearestedge(), ViewContext::mval, wmEvent::mval, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, ringsel_exit(), ringsel_find_edge(), ringsel_finish(), ringsel_init(), SCE_SELECT_FACE, EditMesh::selectmode, tringselOpData::vc, view3d_operator_needs_opengl(), WM_OP_INVOKE_REGION_WIN, and WM_operator_name_call().
Referenced by MESH_OT_edgering_select().