Revision: 38371
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38371
Author:   blendix
Date:     2011-07-13 18:07:30 +0000 (Wed, 13 Jul 2011)
Log Message:
-----------
Fix python error in image sampling panel drawing when
there is no texture slot available.

Modified Paths:
--------------
    trunk/blender/release/scripts/startup/bl_ui/properties_texture.py

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_texture.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_texture.py   
2011-07-13 17:52:23 UTC (rev 38370)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_texture.py   
2011-07-13 18:07:30 UTC (rev 38371)
@@ -393,7 +393,7 @@
 
         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 @@
         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

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to