Revision: 20357
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20357
Author:   dingto
Date:     2009-05-23 13:19:18 +0200 (Sat, 23 May 2009)

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

* Some Modifier layout cleanup.
* For fun: Added icons to the Render Buttons.
* small RNA Typo's

Modified Paths:
--------------
    branches/blender2.5/blender/release/ui/buttons_data_modifier.py
    branches/blender2.5/blender/release/ui/buttons_scene.py
    branches/blender2.5/blender/source/blender/makesrna/intern/rna_modifier.c

Modified: branches/blender2.5/blender/release/ui/buttons_data_modifier.py
===================================================================
--- branches/blender2.5/blender/release/ui/buttons_data_modifier.py     
2009-05-23 09:36:18 UTC (rev 20356)
+++ branches/blender2.5/blender/release/ui/buttons_data_modifier.py     
2009-05-23 11:19:18 UTC (rev 20357)
@@ -94,8 +94,8 @@
                row.itemR(md, "vertex_group")
                row.itemR(md, "invert")
                flow = layout.column_flow()
-               flow.itemR(md, "use_vertex_groups")
-               flow.itemR(md, "use_bone_envelopes")
+               flow.itemR(md, "use_vertex_groups", text="Vertex Groups")
+               flow.itemR(md, "use_bone_envelopes", text="Bone Envelopes")
                flow.itemR(md, "quaternion")
                flow.itemR(md, "multi_modifier")
                
@@ -159,12 +159,13 @@
                        
        def cast(self, layout, md):
                layout.itemR(md, "cast_type")
-               layout.itemR(md, "x")
-               layout.itemR(md, "y")
-               layout.itemR(md, "z")
-               layout.itemR(md, "factor")
-               layout.itemR(md, "radius")
-               layout.itemR(md, "size")
+               col = layout.column_flow()
+               col.itemR(md, "x")
+               col.itemR(md, "y")
+               col.itemR(md, "z")
+               col.itemR(md, "factor")
+               col.itemR(md, "radius")
+               col.itemR(md, "size")
                layout.itemR(md, "vertex_group")
                #Missing: "OB" and "From Radius"
                
@@ -195,10 +196,10 @@
                        layout.itemR(md, "uv_layer")
        
        def edgesplit(self, layout, md):
-               layout.itemR(md, "use_edge_angle")
+               layout.itemR(md, "use_edge_angle", text="Edge Angle")
                if (md.use_edge_angle):
                        layout.itemR(md, "split_angle")
-               layout.itemR(md, "use_sharp")
+               layout.itemR(md, "use_sharp", text="Sharp Edges")
                
        def explode(self, layout, md):
                layout.itemR(md, "vertex_group")
@@ -208,7 +209,6 @@
                layout.itemR(md, "alive")
                layout.itemR(md, "dead")
                # Missing: "Refresh" and "Clear Vertex Group" ?
-               # Couldn't test due to crash. 
                
        def fluid(self, layout, md):
                layout.itemL(text="See Fluidsim panel.")
@@ -242,16 +242,18 @@
                
        def mirror(self, layout, md):
                layout.itemR(md, "merge_limit")
-               row = layout.row()
-               row.itemR(md, "x")
-               row.itemR(md, "y")
-               row.itemR(md, "z")
+               split = layout.split()
                
-               col = layout.column_flow()
-               col.itemR(md, "clip", text="Do Clipping")
-               col.itemR(md, "mirror_vertex_groups")
-               col.itemR(md, "mirror_u")
-               col.itemR(md, "mirror_v")
+               sub = split.column()
+               sub.itemR(md, "x")
+               sub.itemR(md, "y")
+               sub.itemR(md, "z")
+               sub = split.column()
+               sub.itemR(md, "mirror_u")
+               sub.itemR(md, "mirror_v")
+               sub = split.column()
+               sub.itemR(md, "clip", text="Do Clipping")
+               sub.itemR(md, "mirror_vertex_groups", text="Vertex Group")
                
                layout.itemR(md, "mirror_object")
                
@@ -311,13 +313,15 @@
                        layout.itemR(md, "lock_y_axis")
        
        def smooth(self, layout, md):
-               row = layout.row()
-               row.itemR(md, "x")
-               row.itemR(md, "y")
-               row.itemR(md, "z")
+               split = layout.split()
+               sub = split.column()
+               sub.itemR(md, "x")
+               sub.itemR(md, "y")
+               sub.itemR(md, "z")
+               sub = split.column()
+               sub.itemR(md, "factor")
+               sub.itemR(md, "repeat")
                
-               layout.itemR(md, "factor")
-               layout.itemR(md, "repeat")
                layout.itemR(md, "vertex_group")
                
        def softbody(self, layout, md):
@@ -325,10 +329,11 @@
        
        def subsurf(self, layout, md):
                layout.itemR(md, "subdivision_type")
-               layout.itemR(md, "levels")
-               layout.itemR(md, "render_levels")
-               layout.itemR(md, "optimal_draw")
-               layout.itemR(md, "subsurf_uv")
+               col = layout.column_flow()
+               col.itemR(md, "levels")
+               col.itemR(md, "render_levels")
+               col.itemR(md, "optimal_draw")
+               col.itemR(md, "subsurf_uv")
        
        def uvproject(self, layout, md):
                layout.itemR(md, "uv_layer")
@@ -340,16 +345,21 @@
                #"Projectors" don't work.
                
        def wave(self, layout, md):
-               row = layout.row()
-               row.itemR(md, "x")
-               row.itemR(md, "y")
-               row.itemR(md, "cyclic")
-               row = layout.row()
-               row.itemR(md, "normals")
-               row.itemR(md, "x_normal")
-               row.itemR(md, "y_normal")
-               row.itemR(md, "z_normal")
+               split = layout.split()
                
+               sub = split.column()
+               sub.itemL(text="Motion:")
+               sub.itemR(md, "x")
+               sub.itemR(md, "y")
+               sub.itemR(md, "cyclic")
+               
+               sub = split.column()
+               sub.itemR(md, "normals")
+               if md.normals:
+                       sub.itemR(md, "x_normal", text="X")
+                       sub.itemR(md, "y_normal", text="Y")
+                       sub.itemR(md, "z_normal", text="Z")
+               
                col = layout.column_flow()
                col.itemR(md, "time_offset")
                col.itemR(md, "lifetime")
@@ -362,8 +372,10 @@
                layout.itemR(md, "vertex_group")
                layout.itemR(md, "texture")
                layout.itemR(md, "texture_coordinates")
-               layout.itemR(md, "uv_layer")
-               layout.itemR(md, "texture_coordinates_object")
+               if md.texture_coordinates == 'MAP_UV':
+                       layout.itemR(md, "uv_layer")
+               if md.texture_coordinates == 'OBJECT':
+                       layout.itemR(md, "texture_coordinates_object")
                
                col = layout.column_flow()
                col.itemR(md, "speed", slider=True)

Modified: branches/blender2.5/blender/release/ui/buttons_scene.py
===================================================================
--- branches/blender2.5/blender/release/ui/buttons_scene.py     2009-05-23 
09:36:18 UTC (rev 20356)
+++ branches/blender2.5/blender/release/ui/buttons_scene.py     2009-05-23 
11:19:18 UTC (rev 20357)
@@ -105,8 +105,8 @@
                rd = scene.render_data
 
                row = layout.row()
-               row.itemO("SCREEN_OT_render", text="Render Still")
-               row.item_booleanO("SCREEN_OT_render", "anim", True, 
text="Render Animation")
+               row.itemO("SCREEN_OT_render", text="Render Still", icon=109)
+               row.item_booleanO("SCREEN_OT_render", "anim", True, 
text="Render Animation", icon=111)
                
                row = layout.row()
                row.itemR(rd, "do_composite")

Modified: 
branches/blender2.5/blender/source/blender/makesrna/intern/rna_modifier.c
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/intern/rna_modifier.c   
2009-05-23 09:36:18 UTC (rev 20356)
+++ branches/blender2.5/blender/source/blender/makesrna/intern/rna_modifier.c   
2009-05-23 11:19:18 UTC (rev 20357)
@@ -1257,12 +1257,12 @@
 
        prop= RNA_def_property(srna, "alive", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", eExplodeFlag_Alive);
-       RNA_def_property_ui_text(prop, "alive", "Show mesh when particles are 
alive.");
+       RNA_def_property_ui_text(prop, "Alive", "Show mesh when particles are 
alive.");
        RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, 
"rna_Modifier_update");
 
        prop= RNA_def_property(srna, "dead", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", eExplodeFlag_Dead);
-       RNA_def_property_ui_text(prop, "dead", "Show mesh when particles are 
dead.");
+       RNA_def_property_ui_text(prop, "Dead", "Show mesh when particles are 
dead.");
        RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, 
"rna_Modifier_update");
 }
 


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

Reply via email to