diff options
author | Thomas Dinges <blender@dingto.org> | 2009-05-20 19:33:28 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2009-05-20 19:33:28 +0400 |
commit | 240ee1104c3534f1d9380719b57b4c6f41e2db5b (patch) | |
tree | 02225e8836899d3b5e0f0f2f658cbec6b78dc2d3 /source/blender | |
parent | a06caced79d3735e0f1ff15a72b3789fca833fa1 (diff) |
2.5 UI:
* Added missing buttons validation for Modifier Tab.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/space_buttons/buttons_header.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/space_buttons/buttons_header.c b/source/blender/editors/space_buttons/buttons_header.c index 83586986e23..03b2ce9d11c 100644 --- a/source/blender/editors/space_buttons/buttons_header.c +++ b/source/blender/editors/space_buttons/buttons_header.c @@ -182,10 +182,16 @@ void buttons_header_buttons(const bContext *C, ARegion *ar) if(!ob && !ELEM(sbuts->mainb, (float)BCONTEXT_SCENE, (float)BCONTEXT_WORLD)) sbuts->mainb = (float)BCONTEXT_WORLD; + + if((ob && ELEM5(ob->type, OB_EMPTY, OB_MBALL, OB_LAMP, OB_CAMERA, OB_ARMATURE)) && (sbuts->mainb == (float) BCONTEXT_MODIFIER)) + sbuts->mainb = (float)BCONTEXT_DATA; + // Default panels uiBlockBeginAlign(block); uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_SCENE, xco, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_SCENE, 0, 0, "Scene"); uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_WORLD, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_WORLD, 0, 0, "World"); + + // Specific panels, check on active object seletion if(ob) { uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_OBJECT_DATA, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_OBJECT, 0, 0, "Object"); |