diff options
author | Matt Ebb <matt@mke3.net> | 2006-11-20 08:12:58 +0300 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2006-11-20 08:12:58 +0300 |
commit | 5428f2eb6c33b970d66f06dc5b08bc70bf98f3fb (patch) | |
tree | e17b31c8327f34fa463816a15dc286345b1c75c7 /source/blender/src/header_oops.c | |
parent | e435fbc3c5a00e5b63c1cd2609ab6828187660d3 (diff) |
* Object level restrictions in outliner
This adds the ability to restrict an individual object from:
- being visible in the 3D View
- being selectable in the 3D View
- being renderable
with 3 columns of buttons in the outliner.
These restrictions are further down the hierarchy than layers, so for example if an object is in an invisible layer, it will be invisible regardless of whether the object's own visibility setting is on or off. This works on a different conceptual level than layers, being better for more quick interaction (like temporarily making a mesh unselectable while you're posing its armature), rather than so much for scene organisation.
The 3 columns of icons can be turned off in the Outliner View menu.
Along with this is some small cleaning up in interface_icons.c and outliner.c.
Diffstat (limited to 'source/blender/src/header_oops.c')
-rw-r--r-- | source/blender/src/header_oops.c | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/source/blender/src/header_oops.c b/source/blender/src/header_oops.c index fe1e3b89644..1a825bbe6dd 100644 --- a/source/blender/src/header_oops.c +++ b/source/blender/src/header_oops.c @@ -135,6 +135,7 @@ void do_oops_buttons(short event) static void do_oops_viewmenu(void *arg, int event) { + SpaceOops *soops= curarea->spacedata.first; switch(event) { case 0: /* Shuffle Selected Blocks */ @@ -153,14 +154,11 @@ static void do_oops_viewmenu(void *arg, int event) /* using event B_FULL */ break; case 5: /* show outliner */ - { - SpaceOops *soops= curarea->spacedata.first; - if(soops->type==SO_OOPS || soops->type==SO_DEPSGRAPH) soops->type= SO_OUTLINER; - else soops->type= SO_OOPS; - init_v2d_oops(curarea, soops); - test_view2d(G.v2d, curarea->winx, curarea->winy); - scrarea_queue_winredraw(curarea); - } + if(soops->type==SO_OOPS || soops->type==SO_DEPSGRAPH) soops->type= SO_OUTLINER; + else soops->type= SO_OOPS; + init_v2d_oops(curarea, soops); + test_view2d(G.v2d, curarea->winx, curarea->winy); + scrarea_queue_winredraw(curarea); break; case 6: outliner_toggle_visible(curarea); @@ -193,6 +191,10 @@ static void do_oops_viewmenu(void *arg, int event) } break; #endif + case 12: + if (soops->flag & SO_HIDE_RESTRICTCOLS) soops->flag &= ~SO_HIDE_RESTRICTCOLS; + else soops->flag |= SO_HIDE_RESTRICTCOLS; + break; } } @@ -229,13 +231,20 @@ static uiBlock *oops_viewmenu(void *arg_unused) else { uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Oops Schematic", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, ""); - uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); + uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); + if (soops->flag & SO_HIDE_RESTRICTCOLS) + uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Show Restriction Columns", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 12, ""); + else + uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Show Restriction Columns", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 12, ""); + + uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Expand One Level|NumPad +", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 9, ""); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Collapse One Level|NumPad -", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 10, ""); - - uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); + uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show/Hide All", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, ""); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Hierarchy|Home", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 7, ""); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Active|NumPad .", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 8, ""); |