[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [21916] branches/blender2.5/blender: 2. 5 Various fixes:

Thomas Dinges dingto at gmx.de
Sun Jul 26 10:53:24 CEST 2009


Revision: 21916
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=21916
Author:   dingto
Date:     2009-07-26 10:53:23 +0200 (Sun, 26 Jul 2009)

Log Message:
-----------
2.5 Various fixes:

* Small code and layout cleanup in 3DView Side Panels.
* Added missing redraw notifier for changing world datablock and cursor location. 

Modified Paths:
--------------
    branches/blender2.5/blender/release/ui/space_view3d.py
    branches/blender2.5/blender/release/ui/space_view3d_toolbar.py
    branches/blender2.5/blender/source/blender/makesrna/intern/rna_scene.c

Modified: branches/blender2.5/blender/release/ui/space_view3d.py
===================================================================
--- branches/blender2.5/blender/release/ui/space_view3d.py	2009-07-26 07:45:11 UTC (rev 21915)
+++ branches/blender2.5/blender/release/ui/space_view3d.py	2009-07-26 08:53:23 UTC (rev 21916)
@@ -187,13 +187,14 @@
 		if bg:
 			layout.active = view.display_background_image
 
-			split = layout.split()
-			col = split.column()
+			col = layout.column()
 			col.itemR(bg, "image", text="")
 			#col.itemR(bg, "image_user")
 			col.itemR(bg, "size")
 			col.itemR(bg, "transparency", slider=True)
 			col.itemL(text="Offset:")
+			
+			col = layout.column(align=True)
 			col.itemR(bg, "x_offset", text="X")
 			col.itemR(bg, "y_offset", text="Y")
 

Modified: branches/blender2.5/blender/release/ui/space_view3d_toolbar.py
===================================================================
--- branches/blender2.5/blender/release/ui/space_view3d_toolbar.py	2009-07-26 07:45:11 UTC (rev 21915)
+++ branches/blender2.5/blender/release/ui/space_view3d_toolbar.py	2009-07-26 08:53:23 UTC (rev 21916)
@@ -319,9 +319,10 @@
 		return self.paint_settings(context)
 
 	def draw(self, context):
+		layout = self.layout
+		
 		settings = self.paint_settings(context)
 		brush = settings.brush
-		layout = self.layout
 
 		if context.particle_edit_object:
 			layout.column().itemR(settings, "tool", expand=True)
@@ -340,10 +341,8 @@
 					col.item_enumR(settings, "tool", "CLONE")
 				else:
 					col.item_enumR(settings, "tool", "SMEAR")
-
-			split = layout.split()
 			
-			col = split.column()
+			col = layout.column()
 			row = col.row(align=True)
 			row.itemR(brush, "size", slider=True)
 			row.itemR(brush, "size_pressure", toggle=True, icon='ICON_BRUSH_DATA', text="")
@@ -368,8 +367,7 @@
 			rowsub.itemR(brush, "spacing", text="Spacing", slider=True)
 			rowsub.itemR(brush, "spacing_pressure", toggle=True, icon='ICON_BRUSH_DATA', text="")
 
-			split = layout.split()
-			col = split.column()
+			col = layout.column()
 			col.itemR(brush, "airbrush")
 			col.itemR(brush, "anchored")
 			col.itemR(brush, "rake")
@@ -386,8 +384,7 @@
 		brush = settings.brush
 		layout = self.layout
 
-		split = layout.split()
-		split.template_curve_mapping(brush.curve)
+		layout.template_curve_mapping(brush.curve)
 		
 class VIEW3D_PT_sculpt_options(PaintPanel):
 	__label__ = "Options"
@@ -537,4 +534,3 @@
 bpy.types.register(VIEW3D_PT_weight_paint_options)
 bpy.types.register(VIEW3D_PT_tools_texture_paint)
 bpy.types.register(VIEW3D_PT_tools_particle_edit)
-

Modified: branches/blender2.5/blender/source/blender/makesrna/intern/rna_scene.c
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/intern/rna_scene.c	2009-07-26 07:45:11 UTC (rev 21915)
+++ branches/blender2.5/blender/source/blender/makesrna/intern/rna_scene.c	2009-07-26 08:53:23 UTC (rev 21916)
@@ -1639,11 +1639,13 @@
 	prop= RNA_def_property(srna, "world", PROP_POINTER, PROP_NONE);
 	RNA_def_property_flag(prop, PROP_EDITABLE);
 	RNA_def_property_ui_text(prop, "World", "World used for rendering the scene.");
+	RNA_def_property_update(prop, NC_WORLD, NULL);
 
 	prop= RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_VECTOR);
 	RNA_def_property_float_sdna(prop, NULL, "cursor");
 	RNA_def_property_ui_text(prop, "Cursor Location", "3D cursor location.");
 	RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 4);
+	RNA_def_property_update(prop, NC_WINDOW, NULL);
 	
 	/* Bases/Objects */
 	prop= RNA_def_property(srna, "objects", PROP_COLLECTION, PROP_NONE);





More information about the Bf-blender-cvs mailing list