2.5 Buttons:
authorThomas Dinges <blender@dingto.org>
Sat, 23 May 2009 11:19:18 +0000 (11:19 +0000)
committerThomas Dinges <blender@dingto.org>
Sat, 23 May 2009 11:19:18 +0000 (11:19 +0000)
* Some Modifier layout cleanup.
* For fun: Added icons to the Render Buttons.
* small RNA Typo's

release/ui/buttons_data_modifier.py
release/ui/buttons_scene.py
source/blender/makesrna/intern/rna_modifier.c

index 359c7554c53a74b5a57b2111af406eb7ec059d24..7167727ea530c1c7520532357e3c33c0f3abfae1 100644 (file)
@@ -94,8 +94,8 @@ class DATA_PT_modifiers(DataButtonsPanel):
                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 @@ class DATA_PT_modifiers(DataButtonsPanel):
                        
        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 @@ class DATA_PT_modifiers(DataButtonsPanel):
                        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 @@ class DATA_PT_modifiers(DataButtonsPanel):
                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 @@ class DATA_PT_modifiers(DataButtonsPanel):
                
        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 @@ class DATA_PT_modifiers(DataButtonsPanel):
                        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 @@ class DATA_PT_modifiers(DataButtonsPanel):
        
        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,15 +345,20 @@ class DATA_PT_modifiers(DataButtonsPanel):
                #"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")
@@ -362,8 +372,10 @@ class DATA_PT_modifiers(DataButtonsPanel):
                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)
index c8275b862f121801f4408de0b3b33ff201e9fba0..9682eabbccf441afd91daf9ca5837f826efdc0e4 100644 (file)
@@ -105,8 +105,8 @@ class RENDER_PT_render(RenderButtonsPanel):
                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")
index 2451645330c32613a9aad9c3847c496e7ef6b6c8..7fc9f0a689e7e5244f352595f5bda945c07484a0 100644 (file)
@@ -1257,12 +1257,12 @@ static void rna_def_modifier_explode(BlenderRNA *brna)
 
        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");
 }