forked from bartvdbraak/blender
Fix python error in image sampling panel drawing when
there is no texture slot available.
This commit is contained in:
parent
74536efa91
commit
f94c9d5d61
@ -393,7 +393,7 @@ class TEXTURE_PT_image_sampling(TextureTypePanel, bpy.types.Panel):
|
||||
|
||||
idblock = context_tex_datablock(context)
|
||||
tex = context.texture
|
||||
slot = context.texture_slot
|
||||
slot = getattr(context, "texture_slot", None)
|
||||
|
||||
split = layout.split()
|
||||
|
||||
@ -408,7 +408,7 @@ class TEXTURE_PT_image_sampling(TextureTypePanel, bpy.types.Panel):
|
||||
col = split.column()
|
||||
|
||||
#Only for Material based textures, not for Lamp/World...
|
||||
if isinstance(idblock, bpy.types.Material):
|
||||
if slot and isinstance(idblock, bpy.types.Material):
|
||||
col.prop(tex, "use_normal_map")
|
||||
row = col.row()
|
||||
row.active = tex.use_normal_map
|
||||
|
Loading…
Reference in New Issue
Block a user