diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-02-27 17:47:53 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-02-27 17:47:53 +0400 |
commit | e17bf02c2dcf6e51176eafc5bbe77171bc7014c5 (patch) | |
tree | d64b04687791c96d639458278c73110f804fa04a /source/blender/editors | |
parent | 08b35cda7fb903d4e6cf0f7e6b29024ee536f2b3 (diff) |
Code Cleanup:
* made bmesh_structure.h function names more consistant.
* remove unused code in bmesh_structure.c
* removed 'Edge Flip' operator (missing from bmesh but looked into trunk feature and dont think its worth keeping).
* tagged some BMESH_TODO's
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/include/ED_mesh.h | 4 | ||||
-rw-r--r-- | source/blender/editors/include/ED_uvedit.h | 11 | ||||
-rw-r--r-- | source/blender/editors/include/ED_view3d.h | 25 | ||||
-rw-r--r-- | source/blender/editors/mesh/bmesh_tools.c | 66 | ||||
-rw-r--r-- | source/blender/editors/mesh/loopcut.c | 50 | ||||
-rw-r--r-- | source/blender/editors/mesh/mesh_intern.h | 1 | ||||
-rw-r--r-- | source/blender/editors/mesh/mesh_ops.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_intern.h | 15 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_select.c | 1 | ||||
-rw-r--r-- | source/blender/editors/transform/transform.h | 15 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_conversions.c | 3 | ||||
-rw-r--r-- | source/blender/editors/uvedit/uvedit_intern.h | 2 |
12 files changed, 47 insertions, 148 deletions
diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index 12524a9fd2e..fd29ce94827 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -38,10 +38,6 @@ extern "C" { struct ID; struct View3D; struct ARegion; -struct EditMesh; -struct EditVert; -struct EditEdge; -struct EditFace; struct bContext; struct wmOperator; struct wmWindowManager; diff --git a/source/blender/editors/include/ED_uvedit.h b/source/blender/editors/include/ED_uvedit.h index 6c74eea3a5e..398dca1fe76 100644 --- a/source/blender/editors/include/ED_uvedit.h +++ b/source/blender/editors/include/ED_uvedit.h @@ -31,21 +31,20 @@ #define __ED_UVEDIT_H__ struct ARegionType; -struct EditFace; +struct BMEditMesh; +struct BMFace; +struct BMLoop; struct Image; -struct Main; struct ImageUser; struct MTFace; +struct MTexPoly; +struct Main; struct Object; struct Scene; struct SpaceImage; struct bContext; struct bNode; struct wmKeyConfig; -struct BMEditMesh; -struct BMLoop; -struct BMFace; -struct MTexPoly; /* uvedit_ops.c */ void ED_operatortypes_uvedit(void); diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index 9ef4bc1cbd5..5627d3df91c 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -33,30 +33,29 @@ /* ********* exports for space_view3d/ module ********** */ struct ARegion; -struct bContext; -struct BezTriple; -struct bglMats; -struct BoundBox; -struct BPoint; -struct Nurb; -struct BezTriple; -struct BMVert; struct BMEdge; struct BMFace; -struct EditVert; +struct BMVert; +struct BPoint; +struct BezTriple; +struct BezTriple; +struct BoundBox; struct ImBuf; +struct MVert; struct Main; struct Nurb; +struct Nurb; struct Object; -struct rcti; struct RegionView3D; struct Scene; struct View3D; struct ViewContext; -struct wmWindow; -struct MVert; -struct wmOperatorType; +struct bContext; +struct bglMats; +struct rcti; struct wmOperator; +struct wmOperatorType; +struct wmWindow; /* for derivedmesh drawing callbacks, for view3d_select, .... */ typedef struct ViewContext { diff --git a/source/blender/editors/mesh/bmesh_tools.c b/source/blender/editors/mesh/bmesh_tools.c index a2cd394f86f..36ffacef1ab 100644 --- a/source/blender/editors/mesh/bmesh_tools.c +++ b/source/blender/editors/mesh/bmesh_tools.c @@ -2874,23 +2874,23 @@ typedef struct CutCurve { /* ******************************************************************** */ /* Knife Subdivide Tool. Subdivides edges intersected by a mouse trail - drawn by user. - - Currently mapped to KKey when in MeshEdit mode. - Usage: - Hit Shift K, Select Centers or Exact - Hold LMB down to draw path, hit RETKEY. - ESC cancels as expected. - - Contributed by Robert Wenzlaff (Det. Thorn). - - 2.5 revamp: - - non modal (no menu before cutting) - - exit on mouse release - - polygon/segment drawing can become handled by WM cb later - - bmesh port version -*/ + * drawn by user. + * + * Currently mapped to KKey when in MeshEdit mode. + * Usage: + * - Hit Shift K, Select Centers or Exact + * - Hold LMB down to draw path, hit RETKEY. + * - ESC cancels as expected. + * + * Contributed by Robert Wenzlaff (Det. Thorn). + * + * 2.5 Revamp: + * - non modal (no menu before cutting) + * - exit on mouse release + * - polygon/segment drawing can become handled by WM cb later + * + * bmesh port version + */ #define KNIFE_EXACT 1 #define KNIFE_MIDPOINT 2 @@ -2903,7 +2903,7 @@ static EnumPropertyItem knife_items[] = { {0, NULL, 0, NULL, NULL} }; -/* seg_intersect() Determines if and where a mouse trail intersects an EditEdge */ +/* bm_edge_seg_isect() Determines if and where a mouse trail intersects an BMEdge */ static float bm_edge_seg_isect(BMEdge *e, CutCurve *c, int len, char mode, struct GHash *gh, int *isected) @@ -3575,36 +3575,6 @@ void MESH_OT_dissolve_limited(wmOperatorType *ot) RNA_def_property_float_default(prop, DEG2RADF(15.0f)); } -static int edge_flip_exec(bContext *UNUSED(C), wmOperator *UNUSED(op)) -{ -#if 0 - Object *obedit = CTX_data_edit_object(C); - EditMesh *em = BKE_mesh_get_editmesh((Mesh *)obedit->data); - - edge_flip(em); - - DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); - - BKE_mesh_end_editmesh(obedit->data, em); -#endif - return OPERATOR_FINISHED; -} - -void MESH_OT_edge_flip(wmOperatorType *ot) -{ - /* identifiers */ - ot->name = "Edge Flip"; - ot->idname = "MESH_OT_edge_flip"; - - /* api callbacks */ - ot->exec = edge_flip_exec; - ot->poll = ED_operator_editmesh; - - /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; -} - static int split_mesh_exec(bContext *C, wmOperator *op) { Object *ob = CTX_data_edit_object(C); diff --git a/source/blender/editors/mesh/loopcut.c b/source/blender/editors/mesh/loopcut.c index aee62ef0d29..4be24e7f781 100644 --- a/source/blender/editors/mesh/loopcut.c +++ b/source/blender/editors/mesh/loopcut.c @@ -395,56 +395,6 @@ static int ringcut_cancel (bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } -/* for bmesh this tool is in bmesh_select.c */ -#if 0 - -static int ringsel_invoke (bContext *C, wmOperator *op, wmEvent *evt) -{ - tringselOpData *lcd; - EditEdge *edge; - int dist = 75; - - view3d_operator_needs_opengl(C); - - if (!ringsel_init(C, op, 0)) - return OPERATOR_CANCELLED; - - lcd = op->customdata; - - if (lcd->em->selectmode == SCE_SELECT_FACE) { - PointerRNA props_ptr; - int extend = RNA_boolean_get(op->ptr, "extend"); - - ringsel_exit(op); - - WM_operator_properties_create(&props_ptr, "MESH_OT_loop_select"); - RNA_boolean_set(&props_ptr, "extend", extend); - WM_operator_name_call(C, "MESH_OT_loop_select", WM_OP_INVOKE_REGION_WIN, &props_ptr); - WM_operator_properties_free(&props_ptr); - - return OPERATOR_CANCELLED; - } - - lcd->vc.mval[0] = evt->mval[0]; - lcd->vc.mval[1] = evt->mval[1]; - - edge = findnearestedge(&lcd->vc, &dist); - if(!edge) { - ringsel_exit(op); - return OPERATOR_CANCELLED; - } - - lcd->eed = edge; - ringsel_find_edge(lcd, 1); - - ringsel_finish(C, op); - ringsel_exit(op); - - return OPERATOR_FINISHED; -} - -#endif - static int ringcut_invoke (bContext *C, wmOperator *op, wmEvent *evt) { Object *obedit= CTX_data_edit_object(C); diff --git a/source/blender/editors/mesh/mesh_intern.h b/source/blender/editors/mesh/mesh_intern.h index c75f85a2794..98ae8915c41 100644 --- a/source/blender/editors/mesh/mesh_intern.h +++ b/source/blender/editors/mesh/mesh_intern.h @@ -162,7 +162,6 @@ void MESH_OT_beautify_fill(struct wmOperatorType *ot); void MESH_OT_quads_convert_to_tris(struct wmOperatorType *ot); void MESH_OT_tris_convert_to_quads(struct wmOperatorType *ot); void MESH_OT_dissolve_limited(struct wmOperatorType *ot); -void MESH_OT_edge_flip(struct wmOperatorType *ot); void MESH_OT_faces_shade_smooth(struct wmOperatorType *ot); void MESH_OT_faces_shade_flat(struct wmOperatorType *ot); void MESH_OT_split(struct wmOperatorType *ot); diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c index c3f749b2c45..4b4083751e7 100644 --- a/source/blender/editors/mesh/mesh_ops.c +++ b/source/blender/editors/mesh/mesh_ops.c @@ -115,7 +115,6 @@ void ED_operatortypes_mesh(void) WM_operatortype_append(MESH_OT_quads_convert_to_tris); WM_operatortype_append(MESH_OT_tris_convert_to_quads); WM_operatortype_append(MESH_OT_dissolve_limited); - WM_operatortype_append(MESH_OT_edge_flip); WM_operatortype_append(MESH_OT_faces_shade_smooth); WM_operatortype_append(MESH_OT_faces_shade_flat); WM_operatortype_append(MESH_OT_sort_faces); @@ -311,7 +310,6 @@ void ED_keymap_mesh(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "MESH_OT_quads_convert_to_tris", TKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "MESH_OT_tris_convert_to_quads", JKEY, KM_PRESS, KM_ALT, 0); - WM_keymap_add_item(keymap, "MESH_OT_edge_flip", FKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0); WM_keymap_add_item(keymap, "MESH_OT_rip_move",VKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "MESH_OT_merge", MKEY, KM_PRESS, KM_ALT, 0); diff --git a/source/blender/editors/space_view3d/view3d_intern.h b/source/blender/editors/space_view3d/view3d_intern.h index 40037f82376..50dfc17af6f 100644 --- a/source/blender/editors/space_view3d/view3d_intern.h +++ b/source/blender/editors/space_view3d/view3d_intern.h @@ -35,21 +35,20 @@ /* internal exports only */ -struct bScreen; struct ARegion; +struct ARegionType; struct BoundBox; -struct Object; struct DerivedMesh; -struct wmOperatorType; -struct bContext; -struct wmWindowManager; -struct EditMesh; +struct Object; struct ViewContext; -struct ARegionType; -struct bPoseChannel; struct bAnimVizSettings; +struct bContext; struct bMotionPath; +struct bPoseChannel; +struct bScreen; struct wmNDOFMotionData; +struct wmOperatorType; +struct wmWindowManager; #define BL_NEAR_CLIP 0.001 diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index a4a0d332c51..dfd8b4a3568 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -567,6 +567,7 @@ static void do_lasso_select_mesh(ViewContext *vc, int mcords[][2], short moves, EDBM_selectmode_flush(vc->em); } +/* BMESH_TODO */ #if 0 /* this is an exception in that its the only lasso that dosnt use the 3d view (uses space image view) */ static void do_lasso_select_mesh_uv(int mcords[][2], short moves, short select) diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h index d2b37c0f3b7..3397230b080 100644 --- a/source/blender/editors/transform/transform.h +++ b/source/blender/editors/transform/transform.h @@ -181,8 +181,6 @@ typedef struct TransDataNla { } TransDataNla; struct LinkNode; -struct EditEdge; -struct EditVert; struct GHash; typedef struct TransDataSlideVert { @@ -201,14 +199,7 @@ typedef struct SlideData { struct SmallHash vhash; struct SmallHash origfaces; - - /* - TransDataSlideUv *slideuv, *suv_last; - int totuv, uvlay_tot; - struct GHash *vhash, **uvhash; - struct EditVert *nearest; - struct LinkNode *edgelist, *vertlist; - */ + int start[2], end[2]; struct BMEditMesh *em; float perc; @@ -230,8 +221,8 @@ typedef struct TransData { struct bConstraint *con; /* for objects/bones, the first constraint in its constraint stack */ TransDataExtension *ext; /* for objects, poses. 1 single malloc per TransInfo! */ TransDataCurveHandleFlags *hdata; /* for curves, stores handle flags for modification/cancel */ - void *extra; /* extra data (mirrored element pointer, in editmode mesh to EditVert) (editbone for roll fixing) (...) */ - int flag; /* Various flags */ + void *extra; /* extra data (mirrored element pointer, in editmode mesh to BMVert) (editbone for roll fixing) (...) */ + int flag; /* Various flags */ short protectflag; /* If set, copy of Object or PoseChannel protection */ } TransData; diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index bb10aa448d6..5598d70ee70 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -1980,8 +1980,7 @@ static void get_edge_center(float cent_r[3], BMesh *bm, BMVert *eve) } } -/* way to overwrite what data is edited with transform - * static void VertsToTransData(TransData *td, EditVert *eve, BakeKey *key) */ +/* way to overwrite what data is edited with transform */ static void VertsToTransData(TransInfo *t, TransData *td, BMEditMesh *em, BMVert *eve, float *bweight) { td->flag = 0; diff --git a/source/blender/editors/uvedit/uvedit_intern.h b/source/blender/editors/uvedit/uvedit_intern.h index 4ac68ae5a18..0e2154006c1 100644 --- a/source/blender/editors/uvedit/uvedit_intern.h +++ b/source/blender/editors/uvedit/uvedit_intern.h @@ -32,8 +32,6 @@ #ifndef __UVEDIT_INTERN_H__ #define __UVEDIT_INTERN_H__ -struct EditFace; -struct EditMesh; struct MTexPoly; struct Image; struct MTFace; |