[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38371] trunk/blender/release/scripts/ startup/bl_ui/properties_texture.py: Fix python error in image sampling panel drawing when

Brecht Van Lommel brechtvanlommel at pandora.be
Wed Jul 13 20:07:31 CEST 2011


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




More information about the Bf-blender-cvs mailing list