[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [22309] branches/blender2.5/blender/ release/ui: 2.5 Button Files:

Thomas Dinges dingto at gmx.de
Sat Aug 8 19:21:36 CEST 2009


Revision: 22309
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=22309
Author:   dingto
Date:     2009-08-08 19:21:34 +0200 (Sat, 08 Aug 2009)

Log Message:
-----------
2.5 Button Files:

* Cleanup of smoke and texture files to match guidelines. 
* Made "Curve" Panel in Toolbar Closed per default. 

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

Modified: branches/blender2.5/blender/release/ui/buttons_physics_smoke.py
===================================================================
--- branches/blender2.5/blender/release/ui/buttons_physics_smoke.py	2009-08-08 16:28:10 UTC (rev 22308)
+++ branches/blender2.5/blender/release/ui/buttons_physics_smoke.py	2009-08-08 17:21:34 UTC (rev 22309)
@@ -41,7 +41,6 @@
 			layout.itemR(md, "smoke_type")
 		
 			if md.smoke_type == 'TYPE_DOMAIN':
-				
 				split = layout.split()
 				
 				col = split.column()
@@ -56,13 +55,13 @@
 				sub.itemR(md.domain_settings, "amplify", text="High")
 				col.itemR(md.domain_settings, "highres", text="Use High Resolution")
 				
-				sub = split.column()
-				sub.itemL(text="Display:")
-				sub.itemR(md.domain_settings, "visibility")
-				sub.itemR(md.domain_settings, "color", slider=True)
-				mysub = sub.column()
-				mysub.active = md.domain_settings.highres
-				mysub.itemR(md.domain_settings, "viewhighres")
+				col = split.column()
+				col.itemL(text="Display:")
+				col.itemR(md.domain_settings, "visibility")
+				col.itemR(md.domain_settings, "color", slider=True)
+				sub = col.column()
+				sub.active = md.domain_settings.highres
+				sub.itemR(md.domain_settings, "viewhighres")
 				
 				layout.itemL(text="Noise Type:")
 				layout.itemR(md.domain_settings, "noise_type", expand=True)
@@ -81,7 +80,6 @@
 				col.itemR(md.domain_settings, "coll_group", text="")
 				
 			elif md.smoke_type == 'TYPE_FLOW':
-				
 				split = layout.split()
 				
 				col = split.column()
@@ -92,12 +90,12 @@
 				if md.flow_settings.outflow:				
 					col = split.column()
 				else:
-					sub = split.column()
-					sub.itemL(text="Behavior:")
-					sub.itemR(md.flow_settings, "temperature")
-					sub.itemR(md.flow_settings, "density")
+					col = split.column()
+					col.itemL(text="Behavior:")
+					col.itemR(md.flow_settings, "temperature")
+					col.itemR(md.flow_settings, "density")
 					
-			elif md.smoke_type == 'TYPE_COLL':
-				layout.itemS()
+			#elif md.smoke_type == 'TYPE_COLL':
+			#	layout.itemS()
 
 bpy.types.register(PHYSICS_PT_smoke)
\ No newline at end of file

Modified: branches/blender2.5/blender/release/ui/buttons_texture.py
===================================================================
--- branches/blender2.5/blender/release/ui/buttons_texture.py	2009-08-08 16:28:10 UTC (rev 22308)
+++ branches/blender2.5/blender/release/ui/buttons_texture.py	2009-08-08 17:21:34 UTC (rev 22309)
@@ -7,14 +7,14 @@
 	__context__ = "texture"
 	
 	def poll(self, context):
-		return (context.texture != None and context.texture.type != 'NONE')
+		return (context.texture and context.texture.type != 'NONE')
 		
 class TEXTURE_PT_preview(TextureButtonsPanel):
-	__idname__= "TEXTURE_PT_preview"
 	__label__ = "Preview"
 
 	def draw(self, context):
 		layout = self.layout
+		
 		tex = context.texture
 		ma = context.material
 		la = context.lamp
@@ -33,7 +33,6 @@
 			layout.template_preview(tex)
 
 class TEXTURE_PT_context_texture(TextureButtonsPanel):
-	__idname__= "TEXTURE_PT_context_texture"
 	__show_header__ = False
 
 	def poll(self, context):
@@ -44,7 +43,7 @@
 
 		tex = context.texture
 		
-		id =				context.material
+		id = context.material
 		if not id: id =	context.lamp
 		if not id: id =	context.world
 		if not id: id =	context.brush
@@ -63,9 +62,9 @@
 			split.template_ID(space, "pin_id")
 
 		if (not space.pin_id) and (	context.sculpt_object or \
-										context.vertex_paint_object or \
-										context.weight_paint_object or \
-										context.texture_paint_object \
+									context.vertex_paint_object or \
+									context.weight_paint_object or \
+									context.texture_paint_object \
 									):
 			split.itemR(space, "brush_texture", text="Brush", toggle=True)
 		
@@ -74,13 +73,10 @@
 		if tex:
 			split = layout.split(percentage=0.2)
 		
-			col = split.column()
-			col.itemL(text="Type:")
-			col = split.column()
-			col.itemR(tex, "type", text="")
+			split.itemL(text="Type:")
+			split.itemR(tex, "type", text="")
 
 class TEXTURE_PT_mapping(TextureButtonsPanel):
-	__idname__= "TEXTURE_PT_mapping"
 	__label__ = "Mapping"
 	
 	def poll(self, context):
@@ -88,6 +84,7 @@
 
 	def draw(self, context):
 		layout = self.layout
+		
 		ma = context.material
 		la = context.lamp
 		wo = context.world
@@ -121,10 +118,8 @@
 			
 		if ma:
 			split = layout.split(percentage=0.3)
-			col = split.column()
-			col.itemL(text="Projection:")
-			col = split.column()
-			col.itemR(tex, "mapping", text="")
+			split.itemL(text="Projection:")
+			split.itemR(tex, "mapping", text="")
 
 			split = layout.split()
 			
@@ -147,7 +142,6 @@
 		row.column().itemR(tex, "size")
 
 class TEXTURE_PT_influence(TextureButtonsPanel):
-	__idname__= "TEXTURE_PT_influence"
 	__label__ = "Influence"
 	
 	def poll(self, context):
@@ -174,7 +168,6 @@
 			split = layout.split()
 			
 			col = split.column()
-
 			col.itemL(text="Diffuse:")
 			factor_but(col, tex.map_diffuse, "map_diffuse", "diffuse_factor", "Intensity")
 			factor_but(col, tex.map_colordiff, "map_colordiff", "colordiff_factor", "Color")
@@ -198,15 +191,16 @@
 			factor_but(col, tex.map_warp, "map_warp", "warp_factor", "Warp")
 			factor_but(col, tex.map_displacement, "map_displacement", "displacement_factor", "Displace")
 
-			#colsub = col.column()
-			#colsub.active = tex.map_translucency or tex.map_emit or tex.map_alpha or tex.map_raymir or tex.map_hardness or tex.map_ambient or tex.map_specularity or tex.map_reflection or tex.map_mirror
-			#colsub.itemR(tex, "default_value", text="Amount", slider=True)
+			#sub = col.column()
+			#sub.active = tex.map_translucency or tex.map_emit or tex.map_alpha or tex.map_raymir or tex.map_hardness or tex.map_ambient or tex.map_specularity or tex.map_reflection or tex.map_mirror
+			#sub.itemR(tex, "default_value", text="Amount", slider=True)
 		elif la:
 			row = layout.row()
 			factor_but(row, tex.map_color, "map_color", "color_factor", "Color")
 			factor_but(row, tex.map_shadow, "map_shadow", "shadow_factor", "Shadow")
 		elif wo:
 			split = layout.split()
+			
 			col = split.column()
 			factor_but(col, tex.map_blend, "map_blend", "blend_factor", "Blend")
 			factor_but(col, tex.map_horizon, "map_horizon", "horizon_factor", "Horizon")
@@ -216,15 +210,15 @@
 			factor_but(col, tex.map_zenith_down, "map_zenith_down", "zenith_down_factor", "Zenith Down")
 
 		layout.itemS()
+		
 		split = layout.split()
 
 		col = split.column()
-
 		col.itemR(tex, "blend_type", text="Blend")
 		col.itemR(tex, "rgb_to_intensity")
-		colsub = col.column()
-		colsub.active = tex.rgb_to_intensity
-		colsub.itemR(tex, "color", text="")
+		sub = col.column()
+		sub.active = tex.rgb_to_intensity
+		sub.itemR(tex, "color", text="")
 
 		col = split.column()
 		col.itemR(tex, "negate", text="Negative")
@@ -233,12 +227,12 @@
 			col.itemR(tex, "default_value", text="DVar", slider=True)
 
 class TEXTURE_PT_colors(TextureButtonsPanel):
-	__idname__= "TEXTURE_PT_colors"
 	__label__ = "Colors"
 	__default_closed__ = True
 
 	def draw(self, context):
 		layout = self.layout
+		
 		tex = context.texture
 
 		layout.itemR(tex, "use_color_ramp", text="Ramp")
@@ -246,16 +240,17 @@
 			layout.template_color_ramp(tex.color_ramp, expand=True)
 
 		split = layout.split()
-		col = split.column()
-		col.itemR(tex, "rgb_factor", text="Multiply RGB")
+		
+		split.itemR(tex, "rgb_factor", text="Multiply RGB")
 
 		col = split.column()
 		col.itemL(text="Adjust:")
 		col.itemR(tex, "brightness")
 		col.itemR(tex, "contrast")
+		
+# Texture Type Panels #
 
 class TEXTURE_PT_clouds(TextureButtonsPanel):
-	__idname__= "TEXTURE_PT_clouds"
 	__label__ = "Clouds"
 	
 	def poll(self, context):
@@ -264,6 +259,7 @@
 
 	def draw(self, context):
 		layout = self.layout
+		
 		tex = context.texture
 		
 		layout.itemR(tex, "stype", expand=True)
@@ -271,13 +267,12 @@
 		layout.itemR(tex, "noise_type", text="Type", expand=True)
 		layout.itemR(tex, "noise_basis", text="Basis")
 		
-		col = layout.column_flow()
-		col.itemR(tex, "noise_size", text="Size")
-		col.itemR(tex, "noise_depth", text="Depth")
-		col.itemR(tex, "nabla", text="Nabla")
+		flow = layout.column_flow()
+		flow.itemR(tex, "noise_size", text="Size")
+		flow.itemR(tex, "noise_depth", text="Depth")
+		flow.itemR(tex, "nabla", text="Nabla")
 
 class TEXTURE_PT_wood(TextureButtonsPanel):
-	__idname__= "TEXTURE_PT_wood"
 	__label__ = "Wood"
 	
 	def poll(self, context):
@@ -286,6 +281,7 @@
 
 	def draw(self, context):
 		layout = self.layout
+		
 		tex = context.texture
 		
 		layout.itemR(tex, "noisebasis2", expand=True)
@@ -297,14 +293,13 @@
 		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")
+		flow = layout.column_flow()
+		flow.active = tex.stype in ('RINGNOISE', 'BANDNOISE')
+		flow.itemR(tex, "noise_size", text="Size")
+		flow.itemR(tex, "turbulence")
+		flow.itemR(tex, "nabla")
 		
 class TEXTURE_PT_marble(TextureButtonsPanel):
-	__idname__= "TEXTURE_PT_marble"
 	__label__ = "Marble"
 	
 	def poll(self, context):
@@ -313,6 +308,7 @@
 
 	def draw(self, context):
 		layout = self.layout
+		
 		tex = context.texture
 		
 		layout.itemR(tex, "stype", expand=True)
@@ -321,14 +317,13 @@
 		layout.itemR(tex, "noise_type", text="Type", expand=True)
 		layout.itemR(tex, "noise_basis", text="Basis")
 		
-		col = layout.column_flow()	
-		col.itemR(tex, "noise_size", text="Size")
-		col.itemR(tex, "noise_depth", text="Depth")
-		col.itemR(tex, "turbulence")
-		col.itemR(tex, "nabla")
+		flow = layout.column_flow()	
+		flow.itemR(tex, "noise_size", text="Size")
+		flow.itemR(tex, "noise_depth", text="Depth")
+		flow.itemR(tex, "turbulence")
+		flow.itemR(tex, "nabla")
 
 class TEXTURE_PT_magic(TextureButtonsPanel):
-	__idname__= "TEXTURE_PT_magic"
 	__label__ = "Magic"
 	
 	def poll(self, context):
@@ -337,6 +332,7 @@
 
 	def draw(self, context):
 		layout = self.layout
+		
 		tex = context.texture
 			
 		row = layout.row()
@@ -344,7 +340,6 @@
 		row.itemR(tex, "turbulence")
 
 class TEXTURE_PT_blend(TextureButtonsPanel):
-	__idname__= "TEXTURE_PT_blend"
 	__label__ = "Blend"
 	
 	def poll(self, context):
@@ -353,13 +348,13 @@
 
 	def draw(self, context):
 		layout = self.layout
+		
 		tex = context.texture
 
 		layout.itemR(tex, "progression")
 		layout.itemR(tex, "flip_axis")
 			

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list