Revision: 20495
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20495
Author:   dingto
Date:     2009-05-29 11:53:46 +0200 (Fri, 29 May 2009)

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

* More greying out tweaks by William Reynish and myself. 

Modified Paths:
--------------
    branches/blender2.5/blender/release/ui/buttons_data_camera.py
    branches/blender2.5/blender/release/ui/buttons_data_curve.py
    branches/blender2.5/blender/release/ui/buttons_data_lamp.py
    branches/blender2.5/blender/release/ui/buttons_data_mesh.py
    branches/blender2.5/blender/release/ui/buttons_data_modifier.py
    branches/blender2.5/blender/release/ui/buttons_material.py
    branches/blender2.5/blender/release/ui/buttons_physic_cloth.py
    branches/blender2.5/blender/release/ui/buttons_scene.py

Modified: branches/blender2.5/blender/release/ui/buttons_data_camera.py
===================================================================
--- branches/blender2.5/blender/release/ui/buttons_data_camera.py       
2009-05-29 09:27:48 UTC (rev 20494)
+++ branches/blender2.5/blender/release/ui/buttons_data_camera.py       
2009-05-29 09:53:46 UTC (rev 20495)
@@ -63,11 +63,12 @@
                sub.itemR(cam, "show_title_safe", text="Title Safe")
                sub.itemR(cam, "show_name", text="Name")
                        
-               sub = split.column()
-               sub.itemR(cam, "show_passepartout", text="Passepartout")
-               if (cam.show_passepartout):
-                       sub.itemR(cam, "passepartout_alpha", text="Alpha", 
slider=True)
-               sub.itemR(cam, "draw_size", text="Size")
+               col = split.column()
+               col.itemR(cam, "show_passepartout", text="Passepartout")
+               colsub = col.column()
+               colsub.active = cam.show_passepartout
+               colsub.itemR(cam, "passepartout_alpha", text="Alpha", 
slider=True)
+               col.itemR(cam, "draw_size", text="Size")
                
 bpy.types.register(DATA_PT_cameralens)
 bpy.types.register(DATA_PT_cameradisplay)
\ No newline at end of file

Modified: branches/blender2.5/blender/release/ui/buttons_data_curve.py
===================================================================
--- branches/blender2.5/blender/release/ui/buttons_data_curve.py        
2009-05-29 09:27:48 UTC (rev 20494)
+++ branches/blender2.5/blender/release/ui/buttons_data_curve.py        
2009-05-29 09:53:46 UTC (rev 20495)
@@ -22,14 +22,16 @@
                                                        
                        split = layout.split()
                
-                       sub = split.column()
-                       sub.itemL(text="Caps:")
-                       sub.itemR(curve, "front")
-                       sub.itemR(curve, "back")
+                       col = split.column()
+                       colsub = col.column()
+                       colsub.active = curve.curve_2d
+                       colsub.itemL(text="Caps:")
+                       colsub.itemR(curve, "front")
+                       colsub.itemR(curve, "back")
                        
-                       sub.itemL(text="Textures:")
-                       sub.itemR(curve, "uv_orco")
-                       sub.itemR(curve, "auto_texspace")
+                       col.itemL(text="Textures:")
+                       col.itemR(curve, "uv_orco")
+                       col.itemR(curve, "auto_texspace")
                        
                        sub = split.column()    
                        sub.itemL(text="Resolution:")
@@ -68,12 +70,17 @@
 class DATA_PT_pathanim(DataButtonsPanel):
                __idname__ = "DATA_PT_pathanim"
                __label__ = "Path Animation"
+               
+               def draw_header(self, context):
+                       curve = context.active_object.data
 
+                       layout = self.layout
+                       layout.itemR(curve, "path", text="")
+
                def draw(self, context):
                        curve = context.active_object.data
                        layout = self.layout
-
-                       layout.itemR(curve, "path", text="Enable")
+                       layout.active = curve.path      
                        
                        split = layout.split()          
                        
@@ -102,9 +109,6 @@
                        sub.itemL(text="Order:")
                        sub.itemR(currentcurve, "order_u", text="U")
                        sub.itemR(currentcurve, "order_v", text="V")
-                       sub.itemL(text="Point Count:")                  
-                       sub.itemR(currentcurve, "point_count_u", text="U")
-                       sub.itemR(currentcurve, "point_count_v", text="V")
                        sub.itemL(text="Endpoints:")
                        sub.itemR(currentcurve, "endpoint_u", text="U")
                        sub.itemR(currentcurve, "endpoint_v", text="V")

Modified: branches/blender2.5/blender/release/ui/buttons_data_lamp.py
===================================================================
--- branches/blender2.5/blender/release/ui/buttons_data_lamp.py 2009-05-29 
09:27:48 UTC (rev 20494)
+++ branches/blender2.5/blender/release/ui/buttons_data_lamp.py 2009-05-29 
09:53:46 UTC (rev 20495)
@@ -67,33 +67,33 @@
                row.itemR(lamp, "sky")
                row.itemR(lamp, "atmosphere")
                
-               if lamp.sky or lamp.atmosphere:
-                       layout.itemR(lamp, "atmosphere_turbidity", 
text="Turbidity")
+               row = layout.row()
+               row.active = lamp.sky or lamp.atmosphere
+               row.itemR(lamp, "atmosphere_turbidity", text="Turbidity")
                        
-                       split = layout.split()
-                       
-                       col = split.column()
-                       if lamp.sky:
-                               sub = col.column()
-                               sub.itemR(lamp, "sky_blend_type", text="Blend 
Type")
-                               sub.itemR(lamp, "sky_blend")
-                               sub.itemR(lamp, "sky_color_space", text="Color 
Space")
-                               sub.itemR(lamp, "sky_exposure")
+               split = layout.split()
+
+               col = split.column()
+               
+               sub = col.column()
+               sub.active = lamp.sky
+               sub.itemR(lamp, "sky_blend_type", text="Blend Type")
+               sub.itemR(lamp, "sky_blend")
+               sub.itemR(lamp, "sky_color_space", text="Color Space")
+               sub.itemR(lamp, "sky_exposure")
+               sub.itemR(lamp, "horizon_brightness", text="Hor Bright")
+               sub.itemR(lamp, "spread", text="Hor Spread")
+               sub.itemR(lamp, "sun_brightness", text="Sun Bright")
+               sub.itemR(lamp, "sun_size")
+               sub.itemR(lamp, "backscattered_light", text="Back Light")
                                
-                               sub = col.column()
-                               sub.itemR(lamp, "horizon_brightness", text="Hor 
Bright")
-                               sub.itemR(lamp, "spread", text="Hor Spread")
-                               sub.itemR(lamp, "sun_brightness", text="Sun 
Bright")
-                               sub.itemR(lamp, "sun_size")
-                               sub.itemR(lamp, "backscattered_light", 
text="Back Light")
+               sub = split.column()
+               sub.active = lamp.atmosphere
+               sub.itemR(lamp, "sun_intensity", text="Sun Intens")
+               sub.itemR(lamp, "atmosphere_inscattering", text="Inscattering")
+               sub.itemR(lamp, "atmosphere_extinction", text="Extinction")
+               sub.itemR(lamp, "atmosphere_distance_factor", text="Distance")
                                
-                       sub = split.column()
-                       if lamp.atmosphere:
-                               sub.itemR(lamp, "sun_intensity", text="Sun 
Intens")
-                               sub.itemR(lamp, "atmosphere_inscattering", 
text="Inscattering")
-                               sub.itemR(lamp, "atmosphere_extinction", 
text="Extinction")
-                               sub.itemR(lamp, "atmosphere_distance_factor", 
text="Distance")
-                               
 class DATA_PT_shadow(DataButtonsPanel):
        __idname__ = "DATA_PT_shadow"
        __label__ = "Shadow"
@@ -192,12 +192,13 @@
                sub.itemR(lamp, "spot_blend", text="Blend")
                sub.itemR(lamp, "square")
                
-               sub = split.column()
-               sub.itemR(lamp, "halo")
-               if lamp.halo:
-                       sub.itemR(lamp, "halo_intensity", text="Intensity")
-                       if lamp.shadow_method == 'BUFFER_SHADOW':
-                               sub.itemR(lamp, "halo_step", text="Step")
+               col = split.column()
+               col.itemR(lamp, "halo")
+               colsub = col.column()
+               colsub.active = lamp.halo
+               colsub.itemR(lamp, "halo_intensity", text="Intensity")
+               if lamp.shadow_method == 'BUFFER_SHADOW':
+                       colsub.itemR(lamp, "halo_step", text="Step")
 
 bpy.types.register(DATA_PT_lamp)
 bpy.types.register(DATA_PT_shadow)

Modified: branches/blender2.5/blender/release/ui/buttons_data_mesh.py
===================================================================
--- branches/blender2.5/blender/release/ui/buttons_data_mesh.py 2009-05-29 
09:27:48 UTC (rev 20494)
+++ branches/blender2.5/blender/release/ui/buttons_data_mesh.py 2009-05-29 
09:53:46 UTC (rev 20495)
@@ -1,4 +1,4 @@
-               
+
 import bpy
 
 class DataButtonsPanel(bpy.types.Panel):
@@ -12,7 +12,7 @@
 
 class DATA_PT_surface(DataButtonsPanel):
                __idname__ = "DATA_PT_surface"
-               __label__ = "Surface"
+               __label__ = "Mesh"
 
                def draw(self, context):
                        mesh = context.active_object.data
@@ -20,13 +20,15 @@
 
                        split = layout.split()
                
+                       col = split.column()
+                       col.itemR(mesh, "autosmooth")
+                       colsub = col.column()
+                       colsub.active = mesh.autosmooth
+                       colsub.itemR(mesh, "autosmooth_angle", text="Angle")
                        sub = split.column()
-                       sub.itemR(mesh, "autosmooth")
-                       sub.itemR(mesh, "autosmooth_angle", text="Angle")
-                       sub = split.column()
                        sub.itemR(mesh, "vertex_normal_flip")
                        sub.itemR(mesh, "double_sided")
                        
                        layout.itemR(mesh, "texco_mesh")                        
                                                
-bpy.types.register(DATA_PT_surface)            
\ No newline at end of file
+bpy.types.register(DATA_PT_surface)
\ No newline at end of file

Modified: branches/blender2.5/blender/release/ui/buttons_data_modifier.py
===================================================================
--- branches/blender2.5/blender/release/ui/buttons_data_modifier.py     
2009-05-29 09:27:48 UTC (rev 20494)
+++ branches/blender2.5/blender/release/ui/buttons_data_modifier.py     
2009-05-29 09:53:46 UTC (rev 20495)
@@ -151,10 +151,10 @@
                layout.itemR(md, "start")
                layout.itemR(md, "length")
 
+               layout.itemR(md, "randomize")
                row = layout.row()
-               row.itemR(md, "randomize")
-               if md.randomize:
-                       row.itemR(md, "seed")
+               row.active = md.randomize
+               row.itemR(md, "seed")
                        
        def cast(self, layout, md):
                layout.itemR(md, "cast_type")
@@ -196,8 +196,9 @@
        
        def edgesplit(self, layout, md):
                layout.itemR(md, "use_edge_angle", text="Edge Angle")
-               if (md.use_edge_angle):
-                       layout.itemR(md, "split_angle")
+               row = layout.row()
+               row.active = md.use_edge_angle
+               row.itemR(md, "split_angle")
                layout.itemR(md, "use_sharp", text="Sharp Edges")
                
        def explode(self, layout, md):
@@ -353,13 +354,13 @@
                sub.itemR(md, "y")
                sub.itemR(md, "cyclic")
                
-               sub = split.column()
-               sub.itemR(md, "normals")
-               if md.normals:
-                       row = sub.row(align=True)
-                       row.itemR(md, "x_normal", text="X", toggle=True)
-                       row.itemR(md, "y_normal", text="Y", toggle=True)
-                       row.itemR(md, "z_normal", text="Z", toggle=True)
+               col = split.column()
+               col.itemR(md, "normals")
+               colsub = col.row(align=True)
+               colsub.active = md.normals
+               colsub.itemR(md, "x_normal", text="X", toggle=True)
+               colsub.itemR(md, "y_normal", text="Y", toggle=True)
+               colsub.itemR(md, "z_normal", text="Z", toggle=True)
                
                col = layout.column_flow()
                col.itemR(md, "time_offset")
@@ -384,5 +385,4 @@
                col.itemR(md, "width", slider=True)
                col.itemR(md, "narrowness", slider=True)
 
-bpy.types.register(DATA_PT_modifiers)
-
+bpy.types.register(DATA_PT_modifiers)
\ No newline at end of file

Modified: branches/blender2.5/blender/release/ui/buttons_material.py
===================================================================
--- branches/blender2.5/blender/release/ui/buttons_material.py  2009-05-29 
09:27:48 UTC (rev 20494)
+++ branches/blender2.5/blender/release/ui/buttons_material.py  2009-05-29 
09:53:46 UTC (rev 20495)
@@ -54,6 +54,7 @@
        def draw(self, context):
                layout = self.layout
                sss = 
context.active_object.active_material.subsurface_scattering
+               layout.active = sss.enabled     
                
                flow = layout.column_flow()
                flow.itemR(sss, "error_tolerance")
@@ -87,7 +88,7 @@
        def draw(self, context):
                layout = self.layout
                raym = context.active_object.active_material.raytrace_mirror
-
+               layout.active = raym.enabled    
                split = layout.split()
                
                sub = split.column()
@@ -124,6 +125,7 @@
        def draw(self, context):
                layout = self.layout
                rayt = 
context.active_object.active_material.raytrace_transparency
+               layout.active = rayt.enabled    
                
                split = layout.split()
                
@@ -173,35 +175,31 @@
                col.itemR(halo, "soft")
 
                col = split.column()
-               sub = col.column(align=True)
-               sub.itemL(text="Elements:")
-               sub.itemR(halo, "ring")
-               sub.itemR(halo, "lines")
-               sub.itemR(halo, "star")

@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to