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.
This commit is contained in:
2010-12-27 12:12:43 +00:00
parent 9118614d8e
commit 56453a4361
3 changed files with 11 additions and 24 deletions

View File

@@ -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()