synched with trunk at revision 34793
[blender-staging.git] / release / scripts / ui / properties_game.py
index f8f88586bdd4ebe23d0f9505dbe9395d76cdb023..60934891b7f11446fbcdb32c62c4dcbe685898e3 100644 (file)
@@ -72,7 +72,6 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, bpy.types.Panel):
 
             col = split.column()
             sub = col.column()
 
             col = split.column()
             sub = col.column()
-            sub.active = (game.physics_type == 'RIGID_BODY')
             sub.prop(game, "use_anisotropic_friction")
             subsub = sub.column()
             subsub.active = game.use_anisotropic_friction
             sub.prop(game, "use_anisotropic_friction")
             subsub = sub.column()
             subsub.active = game.use_anisotropic_friction
@@ -149,6 +148,21 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, bpy.types.Panel):
             col.prop(game, "use_ghost")
             col.prop(ob, "hide_render", text="Invisible")
 
             col.prop(game, "use_ghost")
             col.prop(ob, "hide_render", text="Invisible")
 
+            layout.separator()
+
+            split = layout.split()
+
+            col = split.column()
+            col.label(text="Attributes:")
+            col.prop(game, "radius")
+
+            col = split.column()
+            sub = col.column()
+            sub.prop(game, "use_anisotropic_friction")
+            subsub = sub.column()
+            subsub.active = game.use_anisotropic_friction
+            subsub.prop(game, "friction_coefficients", text="", slider=True)
+
         elif game.physics_type in ('SENSOR', 'INVISIBLE', 'NO_COLLISION', 'OCCLUDE'):
             layout.prop(ob, "hide_render", text="Invisible")
 
         elif game.physics_type in ('SENSOR', 'INVISIBLE', 'NO_COLLISION', 'OCCLUDE'):
             layout.prop(ob, "hide_render", text="Invisible")
 
@@ -353,21 +367,25 @@ class RENDER_PT_game_performance(RenderButtonsPanel, bpy.types.Panel):
         layout = self.layout
 
         gs = context.scene.game_settings
         layout = self.layout
 
         gs = context.scene.game_settings
+        row = layout.row()
+        row.prop(gs, "use_frame_rate")
+        row.prop(gs, "use_display_lists")
 
 
-        split = layout.split()
 
 
-        col = split.column()
-        col.label(text="Show:")
-        col.prop(gs, "show_debug_properties", text="Debug Properties")
-        col.prop(gs, "show_framerate_profile", text="Framerate and Profile")
-        col.prop(gs, "show_physics_visualization", text="Physics Visualization")
-        col.prop(gs, "use_deprecation_warnings")
+class RENDER_PT_game_display(RenderButtonsPanel, bpy.types.Panel):
+    bl_label = "Display"
+    COMPAT_ENGINES = {'BLENDER_GAME'}
 
 
-        col = split.column()
+    def draw(self, context):
+        layout = self.layout
 
 
-        col.label(text="Render:")
-        col.prop(gs, "use_frame_rate")
-        col.prop(gs, "use_display_lists")
+        gs = context.scene.game_settings
+        flow = layout.column_flow()
+        flow.prop(gs, "show_debug_properties", text="Debug Properties")
+        flow.prop(gs, "show_framerate_profile", text="Framerate and Profile")
+        flow.prop(gs, "show_physics_visualization", text="Physics Visualization")
+        flow.prop(gs, "use_deprecation_warnings")
+        flow.prop(gs, "show_mouse")
 
 
 class RENDER_PT_game_sound(RenderButtonsPanel, bpy.types.Panel):
 
 
 class RENDER_PT_game_sound(RenderButtonsPanel, bpy.types.Panel):
@@ -530,11 +548,11 @@ class WORLD_PT_game_physics_obstacles(WorldButtonsPanel, bpy.types.Panel):
             layout.prop(gs, "show_obstacle_simulation")
 
 def register():
             layout.prop(gs, "show_obstacle_simulation")
 
 def register():
-    pass
+    bpy.utils.register_module(__name__)
 
 
 def unregister():
 
 
 def unregister():
-    pass
+    bpy.utils.unregister_module(__name__)
 
 if __name__ == "__main__":
     register()
 
 if __name__ == "__main__":
     register()