diff options
author | Thomas Dinges <blender@dingto.org> | 2010-12-27 15:12:43 +0300 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2010-12-27 15:12:43 +0300 |
commit | 56453a436107d2f0a2303d4b27f42c8ff01b51c1 (patch) | |
tree | 5ac33ef80f061538cbb7ab03f887d57702f86354 /release | |
parent | 9118614d8ecd054263d2735968b2e705f2f0e818 (diff) |
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.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/ui/properties_texture.py | 17 |
1 files changed, 10 insertions, 7 deletions
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() |