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>2010-01-29 19:32:06 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-01-29 19:32:06 +0300
commit812e5140b0b0a8e1569ceac3fac1852274ea3a2c (patch)
treef21c7a1c0ea8bac569516aee277c610e2dcf2fcd /release
parente803c033088a4b17b9a0f142851801e26f3395ba (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 'release')
-rw-r--r--release/scripts/ui/properties_texture.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/release/scripts/ui/properties_texture.py b/release/scripts/ui/properties_texture.py
index 3631fb40784..5f742ddcfb9 100644
--- a/release/scripts/ui/properties_texture.py
+++ b/release/scripts/ui/properties_texture.py
@@ -87,14 +87,13 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel):
def draw(self, context):
layout = self.layout
-
+ slot = context.texture_slot
+ node = context.texture_node
space = context.space_data
tex = context.texture
wide_ui = context.region.width > narrowui
idblock = context_tex_datablock(context)
- tex_collection = space.pin_id == None and type(idblock) != bpy.types.Brush
-
-
+ tex_collection = space.pin_id == None and type(idblock) != bpy.types.Brush and not node
if tex_collection:
row = layout.row()
@@ -113,6 +112,8 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel):
if tex_collection:
col.template_ID(idblock, "active_texture", new="texture.new")
+ elif node:
+ col.template_ID(node, "texture", new="texture.new")
elif idblock:
col.template_ID(idblock, "texture", new="texture.new")
@@ -129,7 +130,6 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel):
split = layout.split(percentage=0.2)
if tex.use_nodes:
- slot = context.texture_slot
if slot:
split.label(text="Output:")