diff options
author | Ton Roosendaal <ton@blender.org> | 2005-10-05 00:17:10 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2005-10-05 00:17:10 +0400 |
commit | 5b25951013caa841fb0bbcf2aeb78b74e80c0e50 (patch) | |
tree | c51c9b822509aa6b1bf4c0780e37aea971d9154f /source/blender/src/drawipo.c | |
parent | 38ee277db1cfd48589bd822a85615156a90d9a20 (diff) |
Drivers cannot drive channels of own Object, added error warning for it. I
might allow this once, but it's a lot of new complexities then.
It also means you cannot drive one Bone with another Bone in same Pose.
Diffstat (limited to 'source/blender/src/drawipo.c')
-rw-r--r-- | source/blender/src/drawipo.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/source/blender/src/drawipo.c b/source/blender/src/drawipo.c index 8beb17061c6..f4e416e4fb5 100644 --- a/source/blender/src/drawipo.c +++ b/source/blender/src/drawipo.c @@ -73,6 +73,7 @@ #include "BIF_interface.h" #include "BIF_mywindow.h" #include "BIF_space.h" +#include "BIF_toolbox.h" #include "BIF_glutil.h" #include "BSE_drawipo.h" @@ -1721,9 +1722,15 @@ void do_ipobuts(unsigned short event) IpoDriver *driver= ei->icu->driver; if(driver->ob) { - /* check if type is still OK */ - if(driver->ob->type==OB_ARMATURE && driver->blocktype==ID_AR); - else driver->blocktype= ID_OB; + if(ob==driver->ob) { + error("Cannot assign a Driver to own Object"); + driver->ob= NULL; + } + else { + /* check if type is still OK */ + if(driver->ob->type==OB_ARMATURE && driver->blocktype==ID_AR); + else driver->blocktype= ID_OB; + } } DAG_scene_sort(G.scene); |