diff options
author | Martin Poirier <theeth@yahoo.com> | 2009-07-16 07:16:03 +0400 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2009-07-16 07:16:03 +0400 |
commit | 111be5ea2aa227cc93c9fc57750e463c55056673 (patch) | |
tree | 8c2c4579544cf9dd86e525ad0187b1986d99fb97 /source/blender/editors/mesh | |
parent | 2b99cdd5cab1c833ac79a2e96db70d6fe79aed13 (diff) |
Extrude along normals.
Note that this is on in all cases now, it needs to be restricted to face extrude only.
Some slight transform operator cleanup too.
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r-- | source/blender/editors/mesh/editmesh_tools.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 6993efefe21..2e869933db9 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -702,6 +702,7 @@ static int mesh_extrude_invoke(bContext *C, wmOperator *op, wmEvent *event) Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data); + int constraint_axis[3] = {0, 0, 1}; extrude_mesh(obedit,em, op); @@ -712,6 +713,12 @@ static int mesh_extrude_invoke(bContext *C, wmOperator *op, wmEvent *event) RNA_enum_set(op->ptr, "proportional", 0); RNA_boolean_set(op->ptr, "mirror", 0); + + /* the following two should only be set when extruding faces */ + RNA_enum_set(op->ptr, "constraint_orientation", V3D_MANIP_NORMAL); + RNA_boolean_set_array(op->ptr, "constraint_axis", constraint_axis); + + WM_operator_name_call(C, "TFM_OT_translation", WM_OP_INVOKE_REGION_WIN, op->ptr); return OPERATOR_FINISHED; @@ -750,6 +757,7 @@ void MESH_OT_extrude(wmOperatorType *ot) /* to give to transform */ Properties_Proportional(ot); + Properties_Constraints(ot); RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", ""); } |