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:
authorNathan Letwory <nathan@letworyinteractive.com>2004-04-09 11:42:43 +0400
committerNathan Letwory <nathan@letworyinteractive.com>2004-04-09 11:42:43 +0400
commit1c3a1ba3612c47a68aa4fbb56d5d487cf90310f6 (patch)
treea84196b6b2852351717c8f27928dc664a4363568
parent0e9e6bdc7242b4cfd5016f9ad99227784bb41d2f (diff)
Tell the user he is trying to do a boolean op with a faceless mesh, instead of spewing a meaningless "An internal error occurred -- sorry" message.
-rw-r--r--source/blender/src/booleanops.c4
-rw-r--r--source/blender/src/editobject.c10
2 files changed, 8 insertions, 6 deletions
diff --git a/source/blender/src/booleanops.c b/source/blender/src/booleanops.c
index 6edcf206870..0ced994fd56 100644
--- a/source/blender/src/booleanops.c
+++ b/source/blender/src/booleanops.c
@@ -412,9 +412,9 @@ NewBooleanMesh(
if (me == NULL || me2 == NULL) return 0;
success = has_faces(me);
- if(success==0) return 0;
+ if(success==0) return -1;
success = has_faces(me2);
- if(success==0) return 0;
+ if(success==0) return -1;
success = 0;
diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c
index 5a9227fe61b..360c71c8a39 100644
--- a/source/blender/src/editobject.c
+++ b/source/blender/src/editobject.c
@@ -1458,7 +1458,7 @@ void special_editmenu(void)
extern short editbutflag;
extern float doublimit;
float fac;
- int nr;
+ int nr,ret;
short randfac;
if(G.obedit==0) {
@@ -1547,10 +1547,12 @@ void special_editmenu(void)
if (base_select) {
if (get_mesh(base_select->object)) {
waitcursor(1);
-
- if (!NewBooleanMesh(BASACT,base_select,nr)) {
+ ret = NewBooleanMesh(BASACT,base_select,nr);
+ if (ret==0) {
error("An internal error occurred -- sorry!");
- }
+ } else if(ret==-1) {
+ error("Boolean ops with faceless meshes is not allowed");
+ }
waitcursor(0);
} else {