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
path: root/source
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2007-04-09 12:49:42 +0400
committerTon Roosendaal <ton@blender.org>2007-04-09 12:49:42 +0400
commitc48a676d471ca6d389c25c1bc21254022bcf2191 (patch)
treeb21269f5d2f9f6032eadf5b1596c13f050a24bca /source
parentbd142ac2f44b78f10ad60643dbb71e5d09035b91 (diff)
Bugfix #6503
Displacement option for render only works without Nodes (it is calculated as a Texture effect in advance, not a render option). To illustrate that, the button to enable diplacement mapping is hidden for Node materials.
Diffstat (limited to 'source')
-rw-r--r--source/blender/src/buttons_shading.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/src/buttons_shading.c b/source/blender/src/buttons_shading.c
index 979cb492a93..f46575a8306 100644
--- a/source/blender/src/buttons_shading.c
+++ b/source/blender/src/buttons_shading.c
@@ -2939,8 +2939,8 @@ void do_matbuts(unsigned short event)
}
-
-static void material_panel_map_to(Material *ma)
+/* if from nodes, hide options that are not available */
+static void material_panel_map_to(Material *ma, int from_nodes)
{
uiBlock *block;
MTex *mtex;
@@ -2996,7 +2996,8 @@ static void material_panel_map_to(Material *ma)
uiDefButBitS(block, TOG3, MAP_ALPHA, B_MATPRV, "Alpha", 110,160,50,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the alpha value");
uiDefButBitS(block, TOG3, MAP_EMIT, B_MATPRV, "Emit", 160,160,45,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the emit value");
uiDefButBitS(block, TOG3, MAP_TRANSLU, B_MATPRV, "TransLu", 205,160,60,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the layer blending value");
- uiDefButBitS(block, TOG3, MAP_DISPLACE, B_MATPRV, "Disp", 265,160,45,19, &(mtex->mapto), 0, 0, 0, 0, "Let the texture displace the surface");
+ if(from_nodes==0)
+ uiDefButBitS(block, TOG3, MAP_DISPLACE, B_MATPRV, "Disp", 265,160,45,19, &(mtex->mapto), 0, 0, 0, 0, "Let the texture displace the surface");
uiBlockEndAlign(block);
uiBlockBeginAlign(block);
@@ -3689,6 +3690,8 @@ void material_panels()
// type numbers are ordered
if((ob->type<OB_LAMP) && ob->type) {
+ int from_nodes= 0;
+
ma= give_current_material(ob, ob->actcol);
// always draw first 2 panels
@@ -3697,6 +3700,7 @@ void material_panels()
if(ma && ma->use_nodes) {
material_panel_nodes(ma);
+ from_nodes= 1;
}
ma= editnode_get_active_material(ma);
@@ -3720,7 +3724,7 @@ void material_panels()
mtex= ma->mtex[ ma->texact ];
if(mtex && mtex->tex) {
material_panel_map_input(ob, ma);
- material_panel_map_to(ma);
+ material_panel_map_to(ma, from_nodes);
}
}
}