diff options
author | Matt Ebb <matt@mke3.net> | 2008-07-24 10:21:33 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2008-07-24 10:21:33 +0400 |
commit | 955ffb4abf74b3b590b32e31515af5e80bf6bc42 (patch) | |
tree | df06044a630245771bf732137411a26c8a4c7fa9 /source/blender/src | |
parent | c1e85535cc7df299026ef5b36d02d10aa6ecc088 (diff) |
* Added the ability to toggle visibility/renderability for bones in edit mode or pose mode, in the outliner
Diffstat (limited to 'source/blender/src')
-rw-r--r-- | source/blender/src/outliner.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/source/blender/src/outliner.c b/source/blender/src/outliner.c index fcab7977aa9..a8409c43b90 100644 --- a/source/blender/src/outliner.c +++ b/source/blender/src/outliner.c @@ -3539,6 +3539,13 @@ static void restrictbutton_modifier_cb(void *poin, void *poin2) allqueue(REDRAWBUTSOBJECT, 0); } +static void restrictbutton_bone_cb(void *poin, void *poin2) +{ + allqueue(REDRAWOOPS, 0); + allqueue(REDRAWVIEW3D, 0); + allqueue(REDRAWBUTSEDIT, 0); +} + static void namebutton_cb(void *tep, void *oldnamep) { SpaceOops *soops= curarea->spacedata.first; @@ -3723,6 +3730,25 @@ static void outliner_draw_restrictbuts(uiBlock *block, SpaceOops *soops, ListBas uiButSetFunc(bt, restrictbutton_modifier_cb, ob, NULL); uiButSetFlag(bt, UI_NO_HILITE); } + else if(tselem->type==TSE_POSE_CHANNEL) { + bPoseChannel *pchan= (bPoseChannel *)te->directdata; + Bone *bone = pchan->bone; + + uiBlockSetEmboss(block, UI_EMBOSSN); + bt= uiDefIconButBitI(block, ICONTOG, BONE_HIDDEN_P, REDRAWALL, ICON_RESTRICT_VIEW_OFF, + (int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, te->ys, 17, OL_H-1, &(bone->flag), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View"); + uiButSetFunc(bt, restrictbutton_bone_cb, ob, NULL); + uiButSetFlag(bt, UI_NO_HILITE); + } + else if(tselem->type==TSE_EBONE) { + EditBone *ebone= (EditBone *)te->directdata; + + uiBlockSetEmboss(block, UI_EMBOSSN); + bt= uiDefIconButBitI(block, ICONTOG, BONE_HIDDEN_A, REDRAWALL, ICON_RESTRICT_VIEW_OFF, + (int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, te->ys, 17, OL_H-1, &(ebone->flag), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View"); + uiButSetFunc(bt, restrictbutton_bone_cb, ob, NULL); + uiButSetFlag(bt, UI_NO_HILITE); + } } if((tselem->flag & TSE_CLOSED)==0) outliner_draw_restrictbuts(block, soops, &te->subtree); |