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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-12-06 20:04:45 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-12-06 20:04:45 +0400
commitb8cc575ee312ced934498663f85b7b6b7428cc14 (patch)
treea0376292f3889a88250f3ed00bc233c44d68fff2 /source/blender/editors/space_node/node_draw.c
parentb7649ea7578e90a15a0584142c9a2720731eedfe (diff)
Fix related to #29513: materials using nodes will output passes from the active
material node. This is a confusing system, but two features were missing from 2.4x that made this at least a bit more clear: * The top right icon in the node now shows brighter again for the active node. * Setting a material datablock in a node makes that node active.
Diffstat (limited to 'source/blender/editors/space_node/node_draw.c')
-rw-r--r--source/blender/editors/space_node/node_draw.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index 02a8b5cc9fb..67b4c43343e 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -605,15 +605,11 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
iconofs= rct->xmax - 7.0f;
if(node->typeinfo->flag & NODE_PREVIEW) {
- int icon_id;
+ float alpha = (node->flag & (NODE_ACTIVE_ID|NODE_DO_OUTPUT))? 1.0f: 0.5f;
- if(node->flag & (NODE_ACTIVE_ID|NODE_DO_OUTPUT))
- icon_id= ICON_MATERIAL;
- else
- icon_id= ICON_MATERIAL_DATA;
iconofs-=iconbutw;
- uiDefIconBut(node->block, LABEL, B_REDR, icon_id, iconofs, rct->ymax-NODE_DY,
- iconbutw, UI_UNIT_Y, NULL, 0.0, 0.0, 1.0, 0.5, "");
+ uiDefIconBut(node->block, LABEL, B_REDR, ICON_MATERIAL, iconofs, rct->ymax-NODE_DY,
+ iconbutw, UI_UNIT_Y, NULL, 0.0, 0.0, 1.0, alpha, "");
}
if(node->type == NODE_GROUP) {