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:
Diffstat (limited to 'source/blender/editors/mesh/editmesh_bisect.c')
-rw-r--r--source/blender/editors/mesh/editmesh_bisect.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/editors/mesh/editmesh_bisect.c b/source/blender/editors/mesh/editmesh_bisect.c
index 7bc3ff3ab77..c3c4bda4178 100644
--- a/source/blender/editors/mesh/editmesh_bisect.c
+++ b/source/blender/editors/mesh/editmesh_bisect.c
@@ -36,6 +36,7 @@
#include "BKE_global.h"
#include "BKE_context.h"
#include "BKE_editmesh.h"
+#include "BKE_report.h"
#include "RNA_define.h"
#include "RNA_access.h"
@@ -110,8 +111,15 @@ static bool mesh_bisect_interactive_calc(
static int mesh_bisect_invoke(bContext *C, wmOperator *op, const wmEvent *event)
{
+ Object *obedit = CTX_data_edit_object(C);
+ BMEditMesh *em = BKE_editmesh_from_object(obedit);
int ret;
+ if (em->bm->totedgesel == 0) {
+ BKE_report(op->reports, RPT_ERROR, "Selected edges/faces required");
+ return OPERATOR_CANCELLED;
+ }
+
/* if the properties are set or there is no rv3d,
* skip model and exec immediately */
@@ -129,8 +137,6 @@ static int mesh_bisect_invoke(bContext *C, wmOperator *op, const wmEvent *event)
wmGesture *gesture = op->customdata;
BisectData *opdata;
- Object *obedit = CTX_data_edit_object(C);
- BMEditMesh *em = BKE_editmesh_from_object(obedit);
opdata = MEM_mallocN(sizeof(BisectData), "inset_operator_data");
opdata->mesh_backup = EDBM_redo_state_store(em);