diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-07-13 21:52:23 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-07-13 21:52:23 +0400 |
commit | 74536efa9180da90daf651b162296a474e5bfde8 (patch) | |
tree | 59ef9a58549a9ac6bb99d4c0d6b81e04fab894a3 /source/blender/editors/space_buttons/buttons_context.c | |
parent | 5e841e4b4a30bbb242290407740b5ca3afbab972 (diff) |
Fix #26704: activating a texture node inside material nodes did not show that
texture in the texture properties.
Diffstat (limited to 'source/blender/editors/space_buttons/buttons_context.c')
-rw-r--r-- | source/blender/editors/space_buttons/buttons_context.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index f91e830d52e..8e1a4b2d16c 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -218,7 +218,7 @@ static int buttons_context_path_modifier(ButsContextPath *path) return 0; } -static int buttons_context_path_material(ButsContextPath *path) +static int buttons_context_path_material(ButsContextPath *path, int for_texture) { Object *ob; PointerRNA *ptr= &path->ptr[path->len-1]; @@ -236,6 +236,9 @@ static int buttons_context_path_material(ButsContextPath *path) ma= give_current_material(ob, ob->actcol); RNA_id_pointer_create(&ma->id, &path->ptr[path->len]); path->len++; + + if(for_texture && give_current_material_texture_node(ma)) + return 1; ma= give_node_material(ma); if(ma) { @@ -432,7 +435,7 @@ static int buttons_context_path_texture(ButsContextPath *path) } } /* try material */ - if(buttons_context_path_material(path)) { + if(buttons_context_path_material(path, 1)) { ma= path->ptr[path->len-1].data; if(ma) { @@ -524,7 +527,7 @@ static int buttons_context_path(const bContext *C, ButsContextPath *path, int ma found= buttons_context_path_particle(path); break; case BCONTEXT_MATERIAL: - found= buttons_context_path_material(path); + found= buttons_context_path_material(path, 0); break; case BCONTEXT_TEXTURE: found= buttons_context_path_texture(path); |