diff options
author | Ton Roosendaal <ton@blender.org> | 2004-10-17 02:30:54 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2004-10-17 02:30:54 +0400 |
commit | 0be2d97e2e2052f4a123492bb2afe9c4db9b99e7 (patch) | |
tree | f8fe53f3b61b98fef260d873bd222720af52711f /source/blender/src/outliner.c | |
parent | 121f842fb41dd339e26fae1407149bdbbd6f4291 (diff) |
Hah! found the trick to recover hierarchy in edit bones, so the display
of Outliner of it is nice hierarchical too.
Please note that storage in outliner for editbones and pose-bones are
separate, so you have to uncollapse the views independently
Diffstat (limited to 'source/blender/src/outliner.c')
-rw-r--r-- | source/blender/src/outliner.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/src/outliner.c b/source/blender/src/outliner.c index 4a3b92da782..d0c7ce35025 100644 --- a/source/blender/src/outliner.c +++ b/source/blender/src/outliner.c @@ -585,7 +585,21 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i ten= outliner_add_element(soops, &te->subtree, id, te, TSE_EBONE, a); ten->directdata= ebone; ten->name= ebone->name; + ebone->temp= ten; } + /* make hierarchy */ + ten= te->subtree.first; + while(ten) { + TreeElement *nten= ten->next, *par; + ebone= (EditBone *)ten->directdata; + if(ebone->parent) { + BLI_remlink(&te->subtree, ten); + par= ebone->parent->temp; + BLI_addtail(&par->subtree, ten); + } + ten= nten; + } + } else { Bone *curBone; |