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
path: root/source
diff options
context:
space:
mode:
authorMichael Fox <mfoxdogg@gmail.com>2009-01-20 14:03:53 +0300
committerMichael Fox <mfoxdogg@gmail.com>2009-01-20 14:03:53 +0300
commit42c8b6a684b9db3b022542f6aaef49d74ddcd3e6 (patch)
tree8917ed32f86b7b626f9157b6979e470b2a6748fd /source
parent5cf8612d4b216120787e95672f4444cf18301165 (diff)
2.5
****** small commit, just a few error reports
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/object/editgroup.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/editors/object/editgroup.c b/source/blender/editors/object/editgroup.c
index 4117e74ab72..b86ebef82cd 100644
--- a/source/blender/editors/object/editgroup.c
+++ b/source/blender/editors/object/editgroup.c
@@ -44,6 +44,7 @@
#include "BKE_global.h"
#include "BKE_context.h"
#include "BKE_main.h"
+#include "BKE_report.h"
#include "ED_view3d.h"
#include "ED_space_api.h"
@@ -67,6 +68,7 @@ static int objects_add_active_exec(bContext *C, wmOperator *op)
Scene *scene= CTX_data_scene(C);
Object *ob= OBACT, *obt;
Group *group;
+ int ok = 0;
if (!ob) return OPERATOR_CANCELLED;
@@ -83,12 +85,15 @@ static int objects_add_active_exec(bContext *C, wmOperator *op)
obt->flag |= OB_FROMGROUP;
base->flag |= OB_FROMGROUP;
base->object->recalc= OB_RECALC_OB;
+ ok = 1;
}
CTX_DATA_END;
}
group= group->id.next;
}
-
+
+ if (!ok) BKE_report(op->reports, RPT_ERROR, "Active Object contains no groups");
+
DAG_scene_sort(CTX_data_scene(C));
ED_undo_push(C,"Add To Active Group");
@@ -115,6 +120,7 @@ static int objects_remove_active_exec(bContext *C, wmOperator *op)
Scene *scene= CTX_data_scene(C);
Object *ob= OBACT, *obt;
Group *group;
+ int ok = 0;
if (!ob) return OPERATOR_CANCELLED;
@@ -131,12 +137,15 @@ static int objects_remove_active_exec(bContext *C, wmOperator *op)
obt->flag &= ~OB_FROMGROUP;
base->flag &= ~OB_FROMGROUP;
base->object->recalc= OB_RECALC_OB;
+ ok = 1;
}
CTX_DATA_END;
}
group= group->id.next;
}
-
+
+ if (!ok) BKE_report(op->reports, RPT_ERROR, "Active Object contains no groups");
+
DAG_scene_sort(CTX_data_scene(C));
ED_undo_push(C,"Remove From Active Group");