diff options
Diffstat (limited to 'source/blender/editors/mesh/editmesh_loop.c')
-rw-r--r-- | source/blender/editors/mesh/editmesh_loop.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/mesh/editmesh_loop.c b/source/blender/editors/mesh/editmesh_loop.c index 4c3e76f2285..28103828dd4 100644 --- a/source/blender/editors/mesh/editmesh_loop.c +++ b/source/blender/editors/mesh/editmesh_loop.c @@ -60,6 +60,7 @@ editmesh_loop: tools with own drawing subloops, select, knife, subdiv #include "BKE_library.h" #include "BKE_mesh.h" #include "BKE_object.h" +#include "BKE_report.h" #include "BKE_utildefines.h" #include "PIL_time.h" @@ -199,6 +200,7 @@ static void edgering_sel(EditMesh *em, EditEdge *startedge, int select, int prev } } } + void CutEdgeloop(Object *obedit, wmOperator *op, EditMesh *em, int numcuts) { ViewContext vc; // XXX @@ -636,6 +638,10 @@ static int knife_cut_exec(bContext *C, wmOperator *op) int len=0; short numcuts=1, mode= RNA_int_get(op->ptr, "type"); + /* edit-object needed for matrix, and ar->regiondata for projections to work */ + if (ELEM3(NULL, obedit, ar, ar->regiondata)) + return OPERATOR_CANCELLED; + if (EM_nvertices_selected(em) < 2) { error("No edges are selected to operate on"); BKE_mesh_end_editmesh(obedit->data, em); |