Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Eagar <joeedh@gmail.com>2009-05-18 18:55:34 +0400
committerJoseph Eagar <joeedh@gmail.com>2009-05-18 18:55:34 +0400
commit5e1fba0e43381a1965189853eb8b1ee60bb878bb (patch)
tree2d4ed097857d4468fa99ead4a914c9e638fe0710 /source/blender/editors/mesh/editmesh_tools.c
parent41ada2b2786bad90286a7bfdd5e0243ad66cf5f8 (diff)
extrude works now, though vert extrude does not. still plenty of work needed on this code. also did some work on the select infrastructure; the bmesh api now tracks the number of selected verts/edges/faces.
Diffstat (limited to 'source/blender/editors/mesh/editmesh_tools.c')
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c113
1 files changed, 0 insertions, 113 deletions
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 046366eb553..267145a6a78 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -704,56 +704,6 @@ void extrude_mesh(Object *obedit, EditMesh *em, wmOperator *op)
}
-// XXX should be a menu item
-static int mesh_extrude_invoke(bContext *C, wmOperator *op, wmEvent *event)
-{
- Object *obedit= CTX_data_edit_object(C);
- EditMesh *em= EM_GetEditMesh((Mesh *)obedit->data);
-
- extrude_mesh(obedit,em, op);
-
- RNA_int_set(op->ptr, "mode", TFM_TRANSLATION);
- WM_operator_name_call(C, "TFM_OT_transform", WM_OP_INVOKE_REGION_WIN, op->ptr);
-
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
-
- EM_EndEditMesh(obedit->data, em);
- return OPERATOR_FINISHED;
-}
-
-/* extrude without transform */
-static int mesh_extrude_exec(bContext *C, wmOperator *op)
-{
- Object *obedit= CTX_data_edit_object(C);
- EditMesh *em= EM_GetEditMesh(obedit->data);
-
- extrude_mesh(obedit,em, op);
-
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
-
- EM_EndEditMesh(obedit->data, em);
- return OPERATOR_FINISHED;
-}
-
-
-void MESH_OT_extrude(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Extrude Mesh";
- ot->idname= "MESH_OT_extrude";
-
- /* api callbacks */
- ot->invoke= mesh_extrude_invoke;
- ot->exec= mesh_extrude_exec;
- ot->poll= ED_operator_editmesh;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- /* to give to transform */
- RNA_def_int(ot->srna, "mode", TFM_TRANSLATION, 0, INT_MAX, "Mode", "", 0, INT_MAX);
-}
-
static int split_mesh(bContext *C, wmOperator *op)
{
Object *obedit= CTX_data_edit_object(C);
@@ -790,69 +740,6 @@ void MESH_OT_split(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
-
-static int extrude_repeat_mesh(bContext *C, wmOperator *op)
-{
- Object *obedit= CTX_data_edit_object(C);
- EditMesh *em= EM_GetEditMesh((Mesh *)obedit->data);
-
- RegionView3D *rv3d = CTX_wm_region_view3d(C);
-
- int steps = RNA_int_get(op->ptr,"steps");
-
- float offs = RNA_float_get(op->ptr,"offset");
-
- float dvec[3], tmat[3][3], bmat[3][3], nor[3]= {0.0, 0.0, 0.0};
- short a;
-
- /* dvec */
- dvec[0]= rv3d->persinv[2][0];
- dvec[1]= rv3d->persinv[2][1];
- dvec[2]= rv3d->persinv[2][2];
- Normalize(dvec);
- dvec[0]*= offs;
- dvec[1]*= offs;
- dvec[2]*= offs;
-
- /* base correction */
- Mat3CpyMat4(bmat, obedit->obmat);
- Mat3Inv(tmat, bmat);
- Mat3MulVecfl(tmat, dvec);
-
- for(a=0; a<steps; a++) {
- extrudeflag(obedit, em, SELECT, nor);
- translateflag(em, SELECT, dvec);
- }
-
- recalc_editnormals(em);
-
- EM_fgon_flags(em);
-
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
-
-// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- EM_EndEditMesh(obedit->data, em);
- return OPERATOR_FINISHED;
-}
-
-void MESH_OT_extrude_repeat(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Extrude Repeat Mesh";
- ot->idname= "MESH_OT_extrude_repeat";
-
- /* api callbacks */
- ot->exec= extrude_repeat_mesh;
- ot->poll= ED_operator_editmesh;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- /* props */
- RNA_def_float(ot->srna, "offset", 2.0f, 0.0f, 100.0f, "Offset", "", 0.0f, FLT_MAX);
- RNA_def_int(ot->srna, "steps", 10, 0, 180, "Steps", "", 0, INT_MAX);
-}
-
/* ************************** spin operator ******************** */
static int spin_mesh(bContext *C, float *dvec, int steps, float degr, int dupli )