Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Fox <mfoxdogg@gmail.com>2009-05-07 05:20:43 +0400
committerMichael Fox <mfoxdogg@gmail.com>2009-05-07 05:20:43 +0400
commit7325b8e2bf987e0e96e53de5404f3e48bef7efb9 (patch)
treeec0722acd589efdddd9550273aae6f438a418b60 /source/blender/editors/space_buttons/buttons_header.c
parentee4e89ec530f3a66b2bda15160b9469be5bab2ee (diff)
just a small tweak to the buttons window header buttons, seperating the global buttons like scene and world from the sub buttons like ob data and materials, also tweaked the object checks aswell
Diffstat (limited to 'source/blender/editors/space_buttons/buttons_header.c')
-rw-r--r--source/blender/editors/space_buttons/buttons_header.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/space_buttons/buttons_header.c b/source/blender/editors/space_buttons/buttons_header.c
index ca8787f0c48..9cea5959e2f 100644
--- a/source/blender/editors/space_buttons/buttons_header.c
+++ b/source/blender/editors/space_buttons/buttons_header.c
@@ -179,9 +179,12 @@ void buttons_header_buttons(const bContext *C, ARegion *ar)
uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, dataicon, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_DATA, 0, 0, "Object Data");
if(ob && ELEM5(ob->type, OB_MESH, OB_SURF, OB_MBALL, OB_CURVE, OB_FONT))
uiDefIconButS(block, ROW, B_BUTSPREVIEW, ICON_MATERIAL, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_MATERIAL, 0, 0, "Material");
- uiDefIconButS(block, ROW, B_BUTSPREVIEW, ICON_TEXTURE, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_TEXTURE, 0, 0, "Texture");
+ if(ob && ELEM6(ob->type, OB_MESH, OB_SURF, OB_MBALL, OB_CURVE, OB_FONT, OB_LAMP))
+ uiDefIconButS(block, ROW, B_BUTSPREVIEW, ICON_TEXTURE, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_TEXTURE, 0, 0, "Texture");
if(ob && ELEM5(ob->type, OB_MESH, OB_SURF, OB_MBALL, OB_CURVE, OB_FONT))
uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_PARTICLES, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_PARTICLE, 0, 0, "Particles");
+
+ if(ob && ELEM6(ob->type, OB_MESH, OB_SURF, OB_MBALL, OB_CURVE, OB_FONT, OB_EMPTY))
uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_PHYSICS, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_PHYSICS, 0, 0, "Physics");
xco+= XIC;