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

Thomas Dinges dingto at gmx.de
Mon Jun 8 14:01:18 CEST 2009


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

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

Some tweaks by William Reynish. Thanks! 

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-08 11:55:16 UTC (rev 20731)
+++ branches/blender2.5/blender/release/ui/buttons_texture.py	2009-06-08 12:01:17 UTC (rev 20732)
@@ -59,7 +59,12 @@
 		layout.itemS()
 		
 		if tex:
-			layout.itemR(tex, "type")
+			split = layout.split(percentage=0.2)
+		
+			col = split.column()
+			col.itemL(text="Type:")
+			col = split.column()
+			col.itemR(tex, "type", text="")
 
 class TEXTURE_PT_colors(TextureButtonsPanel):
 	__idname__= "TEXTURE_PT_colors"
@@ -72,11 +77,14 @@
 		if tex.color_ramp:
 			layout.template_color_ramp(tex.color_ramp, expand=True)
 		else:
-			layout.itemR(tex, "rgb_factor")
+			split = layout.split()
+			col = split.column()
+			col.itemR(tex, "rgb_factor")
 
-		row = layout.row()
-		row.itemR(tex, "brightness")
-		row.itemR(tex, "contrast")
+		col = split.column()
+		col.itemL(text="Adjust:")
+		col.itemR(tex, "brightness")
+		col.itemR(tex, "contrast")
 
 class TEXTURE_PT_clouds(TextureButtonsPanel):
 	__idname__= "TEXTURE_PT_clouds"
@@ -112,13 +120,17 @@
 		layout = self.layout
 		tex = context.texture
 		
+		layout.itemR(tex, "noisebasis2", expand=True)
 		layout.itemR(tex, "stype", expand=True)
-		layout.itemR(tex, "noisebasis2", expand=True)
-		layout.itemL(text="Noise:")
-		layout.itemR(tex, "noise_type", text="Type", expand=True)
-		layout.itemR(tex, "noise_basis", text="Basis")
 		
+		col = layout.column()
+		col.active = tex.stype in ('RINGNOISE', 'BANDNOISE')
+		col.itemL(text="Noise:")
+		col.row().itemR(tex, "noise_type", text="Type", expand=True)
+		col.itemR(tex, "noise_basis", text="Basis")
+		
 		col = layout.column_flow()
+		col.active = tex.stype in ('RINGNOISE', 'BANDNOISE')
 		col.itemR(tex, "noise_size", text="Size")
 		col.itemR(tex, "turbulence")
 		col.itemR(tex, "nabla")
@@ -389,7 +401,6 @@
 
 bpy.types.register(TEXTURE_PT_preview)
 bpy.types.register(TEXTURE_PT_texture)
-bpy.types.register(TEXTURE_PT_colors)
 bpy.types.register(TEXTURE_PT_clouds)
 bpy.types.register(TEXTURE_PT_wood)
 bpy.types.register(TEXTURE_PT_marble)
@@ -403,4 +414,4 @@
 bpy.types.register(TEXTURE_PT_musgrave)
 bpy.types.register(TEXTURE_PT_voronoi)
 bpy.types.register(TEXTURE_PT_distortednoise)
-
+bpy.types.register(TEXTURE_PT_colors)
\ No newline at end of file





More information about the Bf-blender-cvs mailing list