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:
authorMatt Ebb <matt@mke3.net>2007-12-29 08:17:19 +0300
committerMatt Ebb <matt@mke3.net>2007-12-29 08:17:19 +0300
commit3c1ad6a295af33ee97847d80ff1e007369bdf96f (patch)
tree70b50df7a2247926554a1024e0e1f132ea90fc5a /source/blender/src/header_info.c
parent02b00e2fd742401aa1232e5b0e4dc618f268e9f3 (diff)
* Displacement map baking
This is an extension on the work Brecht already did to implement normal map baking. I've updated the release notes page here with info and pics: http://www.blender.org/development/current-projects/changes-since-244/render-baking/
Diffstat (limited to 'source/blender/src/header_info.c')
-rw-r--r--source/blender/src/header_info.c28
1 files changed, 21 insertions, 7 deletions
diff --git a/source/blender/src/header_info.c b/source/blender/src/header_info.c
index beb3eb52820..552201445d1 100644
--- a/source/blender/src/header_info.c
+++ b/source/blender/src/header_info.c
@@ -1724,8 +1724,13 @@ static uiBlock *info_timelinemenu(void *arg_unused)
void do_info_render_bakemenu(void *arg, int event)
{
-
- objects_bake_render(event);
+ switch (event) {
+ case R_BAKE_TO_ACTIVE:
+ G.scene->r.bake_flag ^= event;
+ break;
+ default:
+ objects_bake_render(event);
+ }
allqueue(REDRAWINFO, 0);
}
@@ -1733,15 +1738,24 @@ void do_info_render_bakemenu(void *arg, int event)
static uiBlock *info_render_bakemenu(void *arg_unused)
{
uiBlock *block;
- short yco= 0;
+ short yco= 0, menuwidth=160;
block= uiNewBlock(&curarea->uiblocks, "render_bakemenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
uiBlockSetButmFunc(block, do_info_render_bakemenu, NULL);
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Full Render|Ctrl Alt B, 1", 0, yco-=20, 160, 19, NULL, 0.0, 0.0, 1, 1, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Ambient Occlusion|Ctrl Alt B, 2", 0, yco-=20, 160, 19, NULL, 0.0, 0.0, 1, 2, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Normals|Ctrl Alt B, 3", 0, yco-=20, 160, 19, NULL, 0.0, 0.0, 1, 3, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Texture Only|Ctrl Alt B, 4", 0, yco-=20, 160, 19, NULL, 0.0, 0.0, 1, 4, "");
+ if(G.scene->r.bake_flag & R_BAKE_TO_ACTIVE) {
+ uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Selected to Active", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, R_BAKE_TO_ACTIVE, "");
+ } else {
+ uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Selected to Active", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, R_BAKE_TO_ACTIVE, "");
+ }
+
+ uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Full Render|Ctrl Alt B, 1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Ambient Occlusion|Ctrl Alt B, 2", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Normals|Ctrl Alt B, 3", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Texture Only|Ctrl Alt B, 4", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 4, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Displacement|Ctrl Alt B, 5", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, "");
uiBlockSetDirection(block, UI_RIGHT);
uiTextBoundsBlock(block, 50);