Blenderstorm: idea #164: Hide useless World Shading buttons
authorCampbell Barton <ideasman42@gmail.com>
Fri, 18 Apr 2008 21:59:54 +0000 (21:59 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 18 Apr 2008 21:59:54 +0000 (21:59 +0000)
Simple button change

source/blender/src/buttons_shading.c

index db531c7e6e372d2d455b6f8609d45e8d8a048ca5..aeb14d7c12bda113dfddc85d250509bb29ef344f 100644 (file)
@@ -2336,9 +2336,11 @@ static void world_panel_preview(World *wrld)
        uiDefBut(block, LABEL, 0, " ",  20,20,10,10, 0, 0, 0, 0, 0, "");
 
        uiBlockBeginAlign(block);
-       uiDefButBitS(block, TOG, WO_SKYREAL, B_WORLDPRV,"Real", 200,175,80,25, &wrld->skytype, 0, 0, 0, 0, "Renders background with a real horizon");
-       uiDefButBitS(block, TOG, WO_SKYBLEND, B_WORLDPRV,"Blend",200,150,80,25, &wrld->skytype, 0, 0, 0, 0, "Renders background with natural progression from horizon to zenith");
-       uiDefButBitS(block, TOG,WO_SKYPAPER, B_WORLDPRV,"Paper",200,125,80,25, &wrld->skytype, 0, 0, 0, 0, "Flattens blend or texture coordinates");
+       uiDefButBitS(block, TOG, WO_SKYBLEND, B_WORLDPRV,"Blend", 220,175,100,25, &wrld->skytype, 0, 0, 0, 0, "Renders background with natural progression from horizon to zenith");
+       if (wrld->skytype & WO_SKYBLEND) {
+               uiDefButBitS(block, TOG, WO_SKYREAL, B_WORLDPRV,"Real", 220,150,50,25, &wrld->skytype, 0, 0, 0, 0, "Renders background with a real horizon");
+               uiDefButBitS(block, TOG,WO_SKYPAPER, B_WORLDPRV,"Paper",270,150,50,25, &wrld->skytype, 0, 0, 0, 0, "Flattens blend or texture coordinates");
+       }
        uiBlockEndAlign(block);
 
 }