[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [20293] branches/blender2.5/blender: Assorted UI tweaks/cleanups

Matt Ebb matt at mke3.net
Wed May 20 15:56:26 CEST 2009


Revision: 20293
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20293
Author:   broken
Date:     2009-05-20 15:56:22 +0200 (Wed, 20 May 2009)

Log Message:
-----------
Assorted UI tweaks/cleanups

Modified Paths:
--------------
    branches/blender2.5/blender/release/ui/buttons_data_armature.py
    branches/blender2.5/blender/release/ui/buttons_data_camera.py
    branches/blender2.5/blender/release/ui/buttons_scene.py
    branches/blender2.5/blender/release/ui/buttons_world.py
    branches/blender2.5/blender/source/blender/editors/interface/interface.c
    branches/blender2.5/blender/source/blender/editors/interface/interface_style.c
    branches/blender2.5/blender/source/blender/editors/interface/interface_widgets.c
    branches/blender2.5/blender/source/blender/makesrna/intern/rna_world.c

Modified: branches/blender2.5/blender/release/ui/buttons_data_armature.py
===================================================================
--- branches/blender2.5/blender/release/ui/buttons_data_armature.py	2009-05-20 13:34:04 UTC (rev 20292)
+++ branches/blender2.5/blender/release/ui/buttons_data_armature.py	2009-05-20 13:56:22 UTC (rev 20293)
@@ -14,7 +14,7 @@
 	__label__ = "Skeleton"
 
 	def draw(self, context):
-		arm = context.main.armatures[0]
+		arm = context.active_object.data
 		layout = self.layout
 		
 		row = layout.row()
@@ -44,7 +44,7 @@
 	__label__ = "Display"
 	
 	def draw(self, context):
-		arm = context.main.armatures[0]
+		arm = context.active_object.data
 		layout = self.layout
 
 		split = layout.split()
@@ -65,7 +65,7 @@
 	__label__ = "Paths"
 
 	def draw(self, context):
-		arm = context.main.armatures[0]
+		arm = context.active_object.data
 		layout = self.layout
 
 		split = layout.split()
@@ -95,7 +95,7 @@
 	__label__ = "Ghost"
 
 	def draw(self, context):
-		arm = context.main.armatures[0]
+		arm = context.active_object.data
 		layout = self.layout
 
 		split = layout.split()

Modified: branches/blender2.5/blender/release/ui/buttons_data_camera.py
===================================================================
--- branches/blender2.5/blender/release/ui/buttons_data_camera.py	2009-05-20 13:34:04 UTC (rev 20292)
+++ branches/blender2.5/blender/release/ui/buttons_data_camera.py	2009-05-20 13:56:22 UTC (rev 20293)
@@ -72,7 +72,7 @@
 		sub = split.column()
 		sub.itemR(cam, "show_passepartout", text="Passepartout")
 		if (cam.show_passepartout):
-			sub.itemR(cam, "passepartout_alpha", text="Alpha")
+			sub.itemR(cam, "passepartout_alpha", text="Alpha", slider="True")
 		sub.itemR(cam, "draw_size", text="Size")
 		
 bpy.types.register(DATA_PT_cameralens)

Modified: branches/blender2.5/blender/release/ui/buttons_scene.py
===================================================================
--- branches/blender2.5/blender/release/ui/buttons_scene.py	2009-05-20 13:34:04 UTC (rev 20292)
+++ branches/blender2.5/blender/release/ui/buttons_scene.py	2009-05-20 13:56:22 UTC (rev 20293)
@@ -103,23 +103,9 @@
 		rd = scene.render_data
 
 		row = layout.row()
-		row.itemO("SCREEN_OT_render", text="RENDER", icon=0) # ICON_SCENE
-		row.item_booleanO("SCREEN_OT_render", "anim", True, text="ANIM", icon=0)
+		row.itemO("SCREEN_OT_render", text="Render Still")
+		row.item_booleanO("SCREEN_OT_render", "anim", True, text="Render Animation")
 		
-		split = layout.split()
-		
-		sub = split.column(align=True)
-		sub.itemR(scene, "start_frame", text="Start")
-		sub.itemR(scene, "end_frame", text="End")
-		
-		sub = split.column(align=True)
-		sub.itemR(rd, "fps")
-		sub.itemR(rd, "fps_base",text="/")
-		
-		sub = split.column(align=True)
-		sub.itemR(scene, "current_frame", text="Frame")
-		sub.itemR(scene, "frame_step", text="Step")
-
 		row = layout.row()
 		row.itemR(rd, "do_composite")
 		row.itemR(rd, "do_sequence")
@@ -156,27 +142,32 @@
 
 		rd = scene.render_data
 		
-		row = layout.row()
-		row.itemL(text="Resolution:")
-		row.itemL(text="Aspect Ratio:")
-		
 		split = layout.split()
-
+		
 		col = split.column(align=True)
+		col.itemL(text="Resolution:")
 		col.itemR(rd, "resolution_x", text="X")
 		col.itemR(rd, "resolution_y", text="Y")
 		col.itemR(rd, "resolution_percentage", text="")
 		
-		col = split.column()
-		sub = col.column(align=True)
-		sub.itemR(rd, "pixel_aspect_x", text="X")
-		sub.itemR(rd, "pixel_aspect_y", text="Y")
+		col.itemL(text="Aspect Ratio:")
+		col.itemR(rd, "pixel_aspect_x", text="X")
+		col.itemR(rd, "pixel_aspect_y", text="Y")
 		
-		sub = col.column()
-		sub.itemR(rd, "border", text="Border")
+		col.itemR(rd, "border", text="Border")
 		if rd.border:
-			sub.itemR(rd, "crop_to_border")
+			col.itemR(rd, "crop_to_border")
 
+		col = split.column(align=True)
+		col.itemL(text="Frame Range:")
+		col.itemR(scene, "start_frame", text="Start")
+		col.itemR(scene, "end_frame", text="End")
+		col.itemR(scene, "frame_step", text="Step")
+		
+		col.itemL(text="Frame Rate:")
+		col.itemR(rd, "fps")
+		col.itemR(rd, "fps_base",text="/")
+		
 bpy.types.register(RENDER_PT_render)
 bpy.types.register(RENDER_PT_dimensions)
 bpy.types.register(RENDER_PT_antialiasing)

Modified: branches/blender2.5/blender/release/ui/buttons_world.py
===================================================================
--- branches/blender2.5/blender/release/ui/buttons_world.py	2009-05-20 13:34:04 UTC (rev 20292)
+++ branches/blender2.5/blender/release/ui/buttons_world.py	2009-05-20 13:56:22 UTC (rev 20293)
@@ -46,16 +46,15 @@
 
 		row = layout.row()
 		row.itemR(world.mist, "enabled", text="Enable")
-		if (world.mist.enabled):
-	
-			flow = layout.column_flow()
-			flow.itemR(world.mist, "start")
-			flow.itemR(world.mist, "depth")
-			flow.itemR(world.mist, "height")
-			flow.itemR(world.mist, "intensity")
-			col = layout.column()
-			col.itemL(text="Fallof:")
-			col.row().itemR(world.mist, "falloff", expand=True)
+
+		flow = layout.column_flow()
+		flow.itemR(world.mist, "start")
+		flow.itemR(world.mist, "depth")
+		flow.itemR(world.mist, "height")
+		flow.itemR(world.mist, "intensity")
+		col = layout.column()
+		col.itemL(text="Fallof:")
+		col.row().itemR(world.mist, "falloff", expand=True)
 		
 class WORLD_PT_stars(WorldButtonsPanel):
 	__label__ = "Stars"
@@ -66,13 +65,12 @@
 
 		row = layout.row()
 		row.itemR(world.stars, "enabled", text="Enable")
-		if (world.stars.enabled):
 
-			flow = layout.column_flow()
-			flow.itemR(world.stars, "size")
-			flow.itemR(world.stars, "min_distance", text="MinDist")
-			flow.itemR(world.stars, "average_separation", text="StarDist")
-			flow.itemR(world.stars, "color_randomization", text="Colnoise")
+		flow = layout.column_flow()
+		flow.itemR(world.stars, "size")
+		flow.itemR(world.stars, "min_distance", text="Min. Dist")
+		flow.itemR(world.stars, "average_separation", text="Separation")
+		flow.itemR(world.stars, "color_randomization", text="Random:")
 		
 class WORLD_PT_ambient_occlusion(WorldButtonsPanel):
 	__label__ = "Ambient Occlusion"
@@ -85,51 +83,49 @@
 		
 		row = layout.row()
 		row.itemR(ao, "enabled", text="Enable")
-		if (ao.enabled):
-
+		row = layout.row()
+		row.itemR(ao, "gather_method", expand=True)
+		
+		if ao.gather_method == 'RAYTRACE':
 			row = layout.row()
-			row.itemR(ao, "gather_method", expand=True)
+			row.itemR(ao, "samples")
+			row.itemR(ao, "distance")
 			
-			if ao.gather_method == 'RAYTRACE':
+			row = layout.row()
+			row.itemR(ao, "sample_method")
+			if ao.sample_method == 'ADAPTIVE_QMC':
 				row = layout.row()
-				row.itemR(ao, "samples")
-				row.itemR(ao, "distance")
+				row.itemR(ao, "threshold")
+				row.itemR(ao, "adapt_to_speed")
 				
+			if ao.sample_method == 'CONSTANT_JITTERED':
 				row = layout.row()
-				row.itemR(ao, "sample_method")
-				if ao.sample_method == 'ADAPTIVE_QMC':
-					row = layout.row()
-					row.itemR(ao, "threshold")
-					row.itemR(ao, "adapt_to_speed")
-					
-				if ao.sample_method == 'CONSTANT_JITTERED':
-					row = layout.row()
-					row.itemR(ao, "bias")
-							
-			if ao.gather_method == 'APPROXIMATE':
-				row = layout.row()
-				row.itemR(ao, "passes")
-				row.itemR(ao, "error_tolerance")
-				
-				row = layout.row()
-				row.itemR(ao, "correction")
-				row.itemR(ao, "pixel_cache")
-
+				row.itemR(ao, "bias")
+						
+		if ao.gather_method == 'APPROXIMATE':
 			row = layout.row()
-			row.itemS()
-				
+			row.itemR(ao, "passes")
+			row.itemR(ao, "error_tolerance", text="Error")
+			
 			row = layout.row()
-			row.itemR(ao, "falloff")	
-			row.itemR(ao, "strength")
+			row.itemR(ao, "correction")
+			row.itemR(ao, "pixel_cache")
+
+		row = layout.row()
+		row.itemS()
 			
-			col = layout.column()
-			col.row().itemR(ao, "blend_mode", expand=True)
-			col.row().itemR(ao, "color", expand=True)
-			col.itemR(ao, "energy")
+		row = layout.row()
+		row.itemR(ao, "falloff")	
+		row.itemR(ao, "strength")
+		
+		col = layout.column()
+		col.row().itemR(ao, "blend_mode", expand=True)
+		col.row().itemR(ao, "color", expand=True)
+		col.itemR(ao, "energy")
 	
 bpy.types.register(WORLD_PT_world)
+bpy.types.register(WORLD_PT_ambient_occlusion)
 bpy.types.register(WORLD_PT_mist)
 bpy.types.register(WORLD_PT_stars)
-bpy.types.register(WORLD_PT_ambient_occlusion)
 bpy.types.register(WORLD_PT_color_correction)
 

Modified: branches/blender2.5/blender/source/blender/editors/interface/interface.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/interface/interface.c	2009-05-20 13:34:04 UTC (rev 20292)
+++ branches/blender2.5/blender/source/blender/editors/interface/interface.c	2009-05-20 13:56:22 UTC (rev 20293)
@@ -1986,7 +1986,7 @@
 
 int ui_but_can_align(uiBut *but)
 {
-	return !ELEM(but->type, LABEL, ROUNDBOX);
+	return !ELEM3(but->type, LABEL, ROUNDBOX, TOG);
 }
 
 static void ui_block_do_align_but(uiBlock *block, uiBut *first, int nr)

Modified: branches/blender2.5/blender/source/blender/editors/interface/interface_style.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/interface/interface_style.c	2009-05-20 13:34:04 UTC (rev 20292)
+++ branches/blender2.5/blender/source/blender/editors/interface/interface_style.c	2009-05-20 13:56:22 UTC (rev 20293)
@@ -90,7 +90,7 @@
 	BLI_strncpy(style->name, name, MAX_STYLE_NAME);
 	
 	style->paneltitle.uifont_id= UIFONT_DEFAULT;
-	style->paneltitle.points= 14;
+	style->paneltitle.points= 13;
 	style->paneltitle.shadow= 5;
 	style->paneltitle.shadx= 2;
 	style->paneltitle.shady= -2;

Modified: branches/blender2.5/blender/source/blender/editors/interface/interface_widgets.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/interface/interface_widgets.c	2009-05-20 13:34:04 UTC (rev 20292)
+++ branches/blender2.5/blender/source/blender/editors/interface/interface_widgets.c	2009-05-20 13:56:22 UTC (rev 20293)
@@ -1378,6 +1378,7 @@
 	double value;
 	float offs, fac;
 	char outline[3];
+	int slideralign;
 	
 	widget_init(&wtb);
 	widget_init(&wtb1);
@@ -1395,10 +1396,12 @@
 	rect1= *rect;
 	
 	value= ui_get_but_val(but);
-	fac= (value-but->softmin)*(rect1.xmax - rect1.xmin - 2.0f*offs)/(but->softmax - but->softmin);
+	fac= (value-but->softmin)*(rect1.xmax - rect1.xmin - offs)/(but->softmax - but->softmin);
 	
-	rect1.xmax= rect1.xmin + fac + 2.0f*offs;

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list