UI layouts
authorWilliam Reynish <william@reynish.com>
Mon, 20 Jul 2009 21:31:32 +0000 (21:31 +0000)
committerWilliam Reynish <william@reynish.com>
Mon, 20 Jul 2009 21:31:32 +0000 (21:31 +0000)
Changed order of panels in scene buttons to better follow order of importance, putting the post-processing options further down.

Cleaned up game physics properties

release/ui/buttons_game.py
release/ui/buttons_physics_field.py
release/ui/buttons_scene.py

index 01937caf5a7640d15e2830c1080650eac38954ef..356b7913217ff60e771cac6ef01f6ec6af599415 100644 (file)
@@ -42,45 +42,57 @@ class GAME_PT_physics(GameButtonsPanel):
                
                game = ob.game
 
-               flow = layout.column_flow()
-               flow.active = True
-               flow.itemR(game, "physics_type")
-               flow.itemR(game, "actor")
+               layout.itemR(game, "physics_type")
+               layout.itemS()
                
-               row = layout.row()
-               row.itemR(game, "ghost")
-               row.itemR(ob, "restrict_render", text="Invisible") # out of place but useful
+               split = layout.split()
+               col = split.column()
                
-               flow = layout.column_flow()
-               flow.itemR(game, "mass")
-               flow.itemR(game, "radius")
-               flow.itemR(game, "no_sleeping")
-               flow.itemR(game, "damping")
-               flow.itemR(game, "rotation_damping")
-               flow.itemR(game, "minimum_velocity")
-               flow.itemR(game, "maximum_velocity")
+               col.itemR(game, "actor")
                
-               row = layout.row()
-               row.itemR(game, "do_fh")
-               row.itemR(game, "rotation_fh")
+               col.itemR(game, "ghost")
+               col.itemR(ob, "restrict_render", text="Invisible") # out of place but useful
+               col = split.column()
+               col.itemR(game, "do_fh", text="Use Material Physics")
+               col.itemR(game, "rotation_fh", text="Rotate From Normal")
                
-               flow = layout.column_flow()
-               flow.itemR(game, "form_factor")
-               flow.itemR(game, "anisotropic_friction")
+               layout.itemS()
+               split = layout.split()
+               col = split.column()
+
+               col.itemR(game, "mass")
+               col.itemR(game, "radius")
+               col.itemR(game, "no_sleeping")
+               col.itemR(game, "form_factor")
+               col.itemS()
+               col.itemL(text="Damping:")
+               col.itemR(game, "damping", text="Translation", slider=True)
+               col.itemR(game, "rotation_damping", text="Rotation", slider=True)
                
-               flow = layout.column_flow()
-               flow.active = game.anisotropic_friction
-               flow.itemR(game, "friction_coefficients")
+               col = split.column()
+               
+               col.itemL(text="Velocity:")
+               col.itemR(game, "minimum_velocity", text="Minimum")
+               col.itemR(game, "maximum_velocity", text="Maximum")
+               col.itemS()
+               col.itemR(game, "anisotropic_friction")
                
+               colsub = col.column()
+               colsub.active = game.anisotropic_friction
+               colsub.itemR(game, "friction_coefficients", text="", slider=True)
+               
+               layout.itemS()
                split = layout.split()
                sub = split.column()
-               sub.itemR(game, "lock_x_axis")
-               sub.itemR(game, "lock_y_axis")
-               sub.itemR(game, "lock_z_axis")
+               sub.itemL(text="Lock Translation:")
+               sub.itemR(game, "lock_x_axis", text="X")
+               sub.itemR(game, "lock_y_axis", text="Y")
+               sub.itemR(game, "lock_z_axis", text="Z")
                sub = split.column()
-               sub.itemR(game, "lock_x_rot_axis")
-               sub.itemR(game, "lock_y_rot_axis")
-               sub.itemR(game, "lock_z_rot_axis")
+               sub.itemL(text="Lock Rotation:")
+               sub.itemR(game, "lock_x_rot_axis", text="X")
+               sub.itemR(game, "lock_y_rot_axis", text="Y")
+               sub.itemR(game, "lock_z_rot_axis", text="Z")
 
 
 class GAME_PT_collision_bounds(GameButtonsPanel):
@@ -111,7 +123,6 @@ class GAME_PT_collision_bounds(GameButtonsPanel):
                flow.itemR(game, "collision_margin")
 
 
-
 bpy.types.register(GAME_PT_context_game)
 bpy.types.register(GAME_PT_data)
 bpy.types.register(GAME_PT_physics)
index c2ee744c08bd7d48e4767c300d896933a7ebb16c..3a9622b06574875b1b54feb9c6b79cfef49c36a7 100644 (file)
@@ -86,6 +86,7 @@ class PHYSICS_PT_field(PhysicButtonsPanel):
                        row.itemR(field, "falloff_power", text="Power")
                        row.itemR(field, "positive_z", text="Positive Z")
                        
+                       layout.itemS()  
                        split = layout.split()
                        sub = split.column()
                        
index a73b42b88e466ae608cbd8a1700d06e5845553f7..2b47003e970ac66b68218a93aab5a29f60a60bd4 100644 (file)
@@ -412,13 +412,13 @@ class RENDER_PT_stamp(RenderButtonsPanel):
                rowsub.itemR(rd, "stamp_note_text", text="")
 
 bpy.types.register(RENDER_PT_render)
+bpy.types.register(RENDER_PT_layers)
 bpy.types.register(RENDER_PT_dimensions)
 bpy.types.register(RENDER_PT_antialiasing)
-bpy.types.register(RENDER_PT_layers)
 bpy.types.register(RENDER_PT_shading)
-bpy.types.register(RENDER_PT_post_processing)
-bpy.types.register(RENDER_PT_performance)
 bpy.types.register(RENDER_PT_output)
 bpy.types.register(RENDER_PT_encoding)
+bpy.types.register(RENDER_PT_performance)
+bpy.types.register(RENDER_PT_post_processing)
 bpy.types.register(RENDER_PT_stamp)