diff options
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", ""); } |