From 56453a436107d2f0a2303d4b27f42c8ff01b51c1 Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Mon, 27 Dec 2010 12:12:43 +0000 Subject: Fix for own commit 24156: Normal Map bool and the normal_space menu are only used for material based textures, not for textures used by lamp/world etc. Accidentally ported this over from 2.49, where these buttons are drawn even they don't work in that context. --- release/scripts/ui/properties_texture.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'release') diff --git a/release/scripts/ui/properties_texture.py b/release/scripts/ui/properties_texture.py index c72a2f5ca94..5898f182380 100644 --- a/release/scripts/ui/properties_texture.py +++ b/release/scripts/ui/properties_texture.py @@ -394,9 +394,10 @@ class TEXTURE_PT_image_sampling(TextureTypePanel, bpy.types.Panel): def draw(self, context): layout = self.layout - + + idblock = context_tex_datablock(context) tex = context.texture - # slot = context.texture_slot + slot = context.texture_slot split = layout.split() @@ -409,11 +410,13 @@ class TEXTURE_PT_image_sampling(TextureTypePanel, bpy.types.Panel): col.prop(tex, "use_flip_axis", text="Flip X/Y Axis") col = split.column() - - col.prop(tex, "use_normal_map") - row = col.row() - row.active = tex.use_normal_map - row.prop(tex, "normal_space", text="") + + #Only for Material based textures, not for Lamp/World... + if isinstance(idblock, bpy.types.Material): + col.prop(tex, "use_normal_map") + row = col.row() + row.active = tex.use_normal_map + row.prop(slot, "normal_map_space", text="") col.prop(tex, "use_mipmap") row = col.row() -- cgit v1.2.3