[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [20835] branches/blender2.5/blender/ release/ui/buttons_texture.py: 2.5 Texture Buttons:

Thomas Dinges dingto at gmx.de
Fri Jun 12 17:22:08 CEST 2009


Revision: 20835
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20835
Author:   dingto
Date:     2009-06-12 17:22:08 +0200 (Fri, 12 Jun 2009)

Log Message:
-----------
2.5 Texture Buttons:

* Now texture settings (colors, mapping, influence) only show up, when the texture type != None. 

Modified Paths:
--------------
    branches/blender2.5/blender/release/ui/buttons_texture.py

Modified: branches/blender2.5/blender/release/ui/buttons_texture.py
===================================================================
--- branches/blender2.5/blender/release/ui/buttons_texture.py	2009-06-12 15:11:51 UTC (rev 20834)
+++ branches/blender2.5/blender/release/ui/buttons_texture.py	2009-06-12 15:22:08 UTC (rev 20835)
@@ -69,6 +69,9 @@
 class TEXTURE_PT_mapping(TextureButtonsPanel):
 	__idname__= "TEXTURE_PT_mapping"
 	__label__ = "Mapping"
+	
+	def poll(self, context):
+		return (context.texture != None and context.texture.type != 'NONE')
 
 	def draw(self, context):
 		layout = self.layout
@@ -80,8 +83,7 @@
 		col.itemL(text="Coordinates:")
 		col = split.column()
 		col.itemR(tex, "texture_coordinates", text="")
-		
-		
+
 		if tex.texture_coordinates == 'UV':
 			row = layout.row()
 			row.itemR(tex, "uv_layer")
@@ -97,14 +99,15 @@
 			col.itemR(tex, "mapping", text="")
 
 		split = layout.split()
+		
 		col = split.column()
 		col.itemR(tex, "from_dupli")
 		
 		col = split.column()
-		colrow = col.row()
-		colrow.itemR(tex, "x_mapping", text="")
-		colrow.itemR(tex, "y_mapping", text="")
-		colrow.itemR(tex, "z_mapping", text="")
+		row = col.row()
+		row.itemR(tex, "x_mapping", text="")
+		row.itemR(tex, "y_mapping", text="")
+		row.itemR(tex, "z_mapping", text="")
 
 		row = layout.row()
 		row.column().itemR(tex, "offset")
@@ -113,6 +116,9 @@
 class TEXTURE_PT_influence(TextureButtonsPanel):
 	__idname__= "TEXTURE_PT_influence"
 	__label__ = "Influence"
+	
+	def poll(self, context):
+		return (context.texture != None and context.texture.type != 'NONE')
 
 	def draw(self, context):
 		layout = self.layout
@@ -172,6 +178,9 @@
 class TEXTURE_PT_colors(TextureButtonsPanel):
 	__idname__= "TEXTURE_PT_colors"
 	__label__ = "Colors"
+	
+	def poll(self, context):
+		return (context.texture != None and context.texture.type != 'NONE')
 
 	def draw(self, context):
 		layout = self.layout





More information about the Bf-blender-cvs mailing list