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 | |
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')
-rw-r--r-- | source/blender/blenkernel/intern/depsgraph.c | 1 | ||||
-rw-r--r-- | source/blender/src/drawipo.c | 13 | ||||
-rw-r--r-- | source/blender/src/outliner.c | 16 |
3 files changed, 21 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c index 81adc459804..68ab67c399d 100644 --- a/source/blender/blenkernel/intern/depsgraph.c +++ b/source/blender/blenkernel/intern/depsgraph.c @@ -306,7 +306,6 @@ static void dag_add_driver_relation(Ipo *ipo, DagForest *dag, DagNode *node, int } } - struct DagForest *build_dag(struct Scene *sce, short mask) { Base *base; 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); diff --git a/source/blender/src/outliner.c b/source/blender/src/outliner.c index 2ac8c47db18..ec7cf701a7c 100644 --- a/source/blender/src/outliner.c +++ b/source/blender/src/outliner.c @@ -1838,8 +1838,10 @@ static void pchan_cb(int event, TreeElement *te, TreeStoreElem *tselem) pchan->bone->flag |= BONE_SELECTED; else if(event==2) pchan->bone->flag &= ~BONE_SELECTED; - else if(event==3) + else if(event==3) { pchan->bone->flag |= BONE_HIDDEN_P; + pchan->bone->flag &= ~BONE_SELECTED; + } else if(event==4) pchan->bone->flag &= ~BONE_HIDDEN_P; } @@ -1852,8 +1854,10 @@ static void bone_cb(int event, TreeElement *te, TreeStoreElem *tselem) bone->flag |= BONE_SELECTED; else if(event==2) bone->flag &= ~BONE_SELECTED; - else if(event==3) + else if(event==3) { bone->flag |= BONE_HIDDEN_P; + bone->flag &= ~BONE_SELECTED; + } else if(event==4) bone->flag &= ~BONE_HIDDEN_P; } @@ -1866,10 +1870,12 @@ static void ebone_cb(int event, TreeElement *te, TreeStoreElem *tselem) ebone->flag |= BONE_SELECTED; else if(event==2) ebone->flag &= ~BONE_SELECTED; - else if(event==3) - ebone->flag |= BONE_HIDDEN_P; + else if(event==3) { + ebone->flag |= BONE_HIDDEN_A; + ebone->flag &= ~BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL; + } else if(event==4) - ebone->flag &= ~BONE_HIDDEN_P; + ebone->flag &= ~BONE_HIDDEN_A; } static void outliner_do_data_operation(SpaceOops *soops, int type, int event, ListBase *lb, |