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:
authorMatt Ebb <matt@mke3.net>2004-06-05 10:52:14 +0400
committerMatt Ebb <matt@mke3.net>2004-06-05 10:52:14 +0400
commit3038507b1bbe084aa6b36592ee1de25ccd4e7518 (patch)
treed77df580e8fe040c03bad206ad7df3966c60823c /source
parent506b78bfbb6ddfddbe1a84d1fb2964eb586ef5c9 (diff)
* Better error checking with apply deformation / make duplis real in the toolbox (blame it on ugly apply_object() )
Addresses bug #1348, thanks wavk for the report
Diffstat (limited to 'source')
-rw-r--r--source/blender/src/toolbox.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/src/toolbox.c b/source/blender/src/toolbox.c
index 25f9aba1e45..f16e20e2c4e 100644
--- a/source/blender/src/toolbox.c
+++ b/source/blender/src/toolbox.c
@@ -1916,6 +1916,9 @@ static TBitem tb_transform_scaleaxis[]= {
static void tb_do_transform_clearapply(void *arg, int event)
{
+ Object *ob;
+ ob= OBACT;
+
switch(event)
{
case 0: /* clear location */
@@ -1931,7 +1934,12 @@ static void tb_do_transform_clearapply(void *arg, int event)
apply_object();
break;
case 4: /* apply deformation */
- make_duplilist_real();
+ if (ob->parent && ob->parent->type==OB_LATTICE) apply_lattice();
+ else error("The active object is not the child of a lattice");
+ break;
+ case 5: /* make duplicates real */
+ if (ob->transflag & OB_DUPLI) make_duplilist_real();
+ else error("The active object does not have dupliverts");
break;
}
}
@@ -1943,7 +1951,7 @@ static TBitem tb_transform_clearapply[]= {
{ 0, "SEPR", 0, NULL},
{ 0, "Apply Size/Rotation|Ctrl A", 3, NULL},
{ 0, "Apply Deformation|Shift Ctrl A", 4, NULL},
-{ 0, "Make Duplicates Real|Shift Ctrl A", 4, NULL},
+{ 0, "Make Duplicates Real|Shift Ctrl A", 5, NULL},
{ -1, "", 0, tb_do_transform_clearapply}};
static TBitem tb_transform_snap[]= {