diff options
author | Matt Ebb <matt@mke3.net> | 2010-04-22 10:59:41 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2010-04-22 10:59:41 +0400 |
commit | a2b6abeee15f359ddeafdea7a2f3a965da0bf410 (patch) | |
tree | 57d81fe3a168e26e5895d781c2d054d62c9141f9 /source/blender/blenkernel/intern/texture.c | |
parent | 5c948964901435ee22596dc6180284605ab3b52d (diff) |
Fix [#22097] missing panels in texture tab
Made texture/texture slot context a bit less flaky when dealing with active material and
texture nodes inside a node material in the node editor. Now if the active material has
nodes enabled, and there are no active material/texture nodes inside it, nothing will be
shown in the texture properties (similar to 2.49).
Diffstat (limited to 'source/blender/blenkernel/intern/texture.c')
-rw-r--r-- | source/blender/blenkernel/intern/texture.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c index c13e48e8f01..99370610479 100644 --- a/source/blender/blenkernel/intern/texture.c +++ b/source/blender/blenkernel/intern/texture.c @@ -879,9 +879,15 @@ Tex *give_current_material_texture(Material *ma) } else { node= nodeGetActiveID(ma->nodetree, ID_MA); - if(node) + if(node) { ma= (Material*)node->id; + if(ma) { + mtex= ma->mtex[(int)(ma->texact)]; + if(mtex) tex= mtex->tex; + } + } } + return tex; } if(ma) { |