2.5 Various fixes:
authorThomas Dinges <blender@dingto.org>
Sun, 26 Jul 2009 08:53:23 +0000 (08:53 +0000)
committerThomas Dinges <blender@dingto.org>
Sun, 26 Jul 2009 08:53:23 +0000 (08:53 +0000)
* Small code and layout cleanup in 3DView Side Panels.
* Added missing redraw notifier for changing world datablock and cursor location.

release/ui/space_view3d.py
release/ui/space_view3d_toolbar.py
source/blender/makesrna/intern/rna_scene.c

index 0d1a8fd7bc548901ee3a34f9925d41b626d5353e..fc550982afabf9194ea273ba1af1dfb17fe856fe 100644 (file)
@@ -187,13 +187,14 @@ class VIEW3D_PT_background_image(bpy.types.Panel):
                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")
 
index acc2590132e3f18a5319c0e85663c468d79119bd..0a9b1090f9e789abd3299692f3076dc5c9d22152 100644 (file)
@@ -319,9 +319,10 @@ class VIEW3D_PT_tools_brush(PaintPanel):
                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 @@ class VIEW3D_PT_tools_brush(PaintPanel):
                                        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 @@ class VIEW3D_PT_tools_brush(PaintPanel):
                        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 @@ class VIEW3D_PT_tools_brush_curve(PaintPanel):
                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_vertex_paint_options)
 bpy.types.register(VIEW3D_PT_weight_paint_options)
 bpy.types.register(VIEW3D_PT_tools_texture_paint)
 bpy.types.register(VIEW3D_PT_tools_particle_edit)
-
index 22f6bff2cc479bfa54e2094cc3d8650f7ef94859..2066ebe18a9984af3c958d695809ea984fab4f24 100644 (file)
@@ -1639,11 +1639,13 @@ void RNA_def_scene(BlenderRNA *brna)
        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);