diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2016-04-26 05:54:51 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-04-26 05:56:47 +0300 |
commit | 27cc015581c0ec269d9f0638b867a74630c50aca (patch) | |
tree | 679b49e412a7cb4a70ee74dac590c716b26ba46f /source/blender/editors/space_outliner/outliner_tree.c | |
parent | 45d9c9de35007e7143ae9e3d483dbb9d84d83614 (diff) |
Outliner: "Show Active" support for active bone
Resolves T48229
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_tree.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_tree.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index d688e628967..afa2210d3ed 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -245,6 +245,41 @@ TreeElement *outliner_find_id(SpaceOops *soops, ListBase *lb, ID *id) return NULL; } +TreeElement *outliner_find_posechannel(SpaceOops *soops, ListBase *lb, const bPoseChannel *pchan) +{ + for (TreeElement *te = lb->first; te; te = te->next) { + if (te->directdata == pchan) { + return te; + } + + TreeStoreElem *tselem = TREESTORE(te); + if (ELEM(tselem->type, TSE_POSE_BASE, TSE_POSE_CHANNEL)) { + TreeElement *tes = outliner_find_posechannel(soops, &te->subtree, pchan); + if (tes) { + return tes; + } + } + } + return NULL; +} + +TreeElement *outliner_find_editbone(SpaceOops *soops, ListBase *lb, const EditBone *ebone) +{ + for (TreeElement *te = lb->first; te; te = te->next) { + if (te->directdata == ebone) { + return te; + } + + TreeStoreElem *tselem = TREESTORE(te); + if (ELEM(tselem->type, 0, TSE_EBONE)) { + TreeElement *tes = outliner_find_editbone(soops, &te->subtree, ebone); + if (tes) { + return tes; + } + } + } + return NULL; +} ID *outliner_search_back(SpaceOops *UNUSED(soops), TreeElement *te, short idcode) { |