diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-01-29 19:32:06 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-01-29 19:32:06 +0300 |
commit | 812e5140b0b0a8e1569ceac3fac1852274ea3a2c (patch) | |
tree | f21c7a1c0ea8bac569516aee277c610e2dcf2fcd /source/blender/editors/space_node | |
parent | e803c033088a4b17b9a0f142851801e26f3395ba (diff) |
Fix #20549: selecting a texture node in a material node tree would
keep that texture locked as the current visible texture in the
texture buttons.
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r-- | source/blender/editors/space_node/node_edit.c | 6 | ||||
-rw-r--r-- | source/blender/editors/space_node/node_select.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index f77eeec9cc8..89fb40367e8 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -433,12 +433,12 @@ void node_set_active(SpaceNode *snode, bNode *node) if(node->type!=NODE_GROUP) { /* tree specific activate calls */ if(snode->treetype==NTREE_SHADER) { - // XXX -#if 0 - /* when we select a material, active texture is cleared, for buttons */ if(node->id && GS(node->id->name)==ID_MA) nodeClearActiveID(snode->edittree, ID_TE); + + // XXX +#if 0 if(node->id) ; // XXX BIF_preview_changed(-1); /* temp hack to force texture preview to update */ diff --git a/source/blender/editors/space_node/node_select.c b/source/blender/editors/space_node/node_select.c index 518901bcbec..f10fff56ec5 100644 --- a/source/blender/editors/space_node/node_select.c +++ b/source/blender/editors/space_node/node_select.c @@ -122,7 +122,7 @@ static int node_select_exec(bContext *C, wmOperator *op) /* WATCH THIS, there are a few other ways to change the active material */ if(node) { - if (node->id && GS(node->id->name)== ID_MA) { + if (node->id && ELEM(GS(node->id->name), ID_MA, ID_TE)) { WM_event_add_notifier(C, NC_MATERIAL|ND_SHADING_DRAW, node->id); } } |