synched with trunk at revision 36569
[blender.git] / release / scripts / startup / bl_ui / properties_game.py
similarity index 93%
rename from release/scripts/ui/properties_game.py
rename to release/scripts/startup/bl_ui/properties_game.py
index 6093489..6952f3c 100644 (file)
@@ -47,7 +47,7 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, bpy.types.Panel):
         layout.separator()
 
         #if game.physics_type == 'DYNAMIC':
-        if game.physics_type in ('DYNAMIC', 'RIGID_BODY'):
+        if game.physics_type in {'DYNAMIC', 'RIGID_BODY'}:
             split = layout.split()
 
             col = split.column()
@@ -56,7 +56,7 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, bpy.types.Panel):
             col.prop(ob, "hide_render", text="Invisible")  # out of place but useful
 
             col = split.column()
-            col.prop(game, "use_material_physics")
+            col.prop(game, "use_material_physics_fh")
             col.prop(game, "use_rotate_from_normal")
             col.prop(game, "use_sleep")
 
@@ -163,7 +163,7 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, bpy.types.Panel):
             subsub.active = game.use_anisotropic_friction
             subsub.prop(game, "friction_coefficients", text="", slider=True)
 
-        elif game.physics_type in ('SENSOR', 'INVISIBLE', 'NO_COLLISION', 'OCCLUDE'):
+        elif game.physics_type in {'SENSOR', 'INVISIBLE', 'NO_COLLISION', 'OCCLUDE'}:
             layout.prop(ob, "hide_render", text="Invisible")
 
 
@@ -175,7 +175,7 @@ class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel, bpy.types.Panel):
     def poll(cls, context):
         game = context.object.game
         rd = context.scene.render
-        return (game.physics_type in ('DYNAMIC', 'RIGID_BODY', 'SENSOR', 'SOFT_BODY', 'STATIC')) and (rd.engine in cls.COMPAT_ENGINES)
+        return (game.physics_type in {'DYNAMIC', 'RIGID_BODY', 'SENSOR', 'SOFT_BODY', 'STATIC'}) and (rd.engine in cls.COMPAT_ENGINES)
 
     def draw_header(self, context):
         game = context.active_object.game
@@ -190,18 +190,14 @@ class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel, bpy.types.Panel):
         layout.active = game.use_collision_bounds
         layout.prop(game, "collision_bounds_type", text="Bounds")
 
-        split = layout.split()
-
-        col = split.column()
-        col.prop(game, "collision_margin", text="Margin", slider=True)
-
-        col = split.column()
-        col.prop(game, "use_collision_compound", text="Compound")
+        row = layout.row()
+        row.prop(game, "collision_margin", text="Margin", slider=True)
+        row.prop(game, "use_collision_compound", text="Compound")
 
 class PHYSICS_PT_game_obstacles(PhysicsButtonsPanel, bpy.types.Panel):
     bl_label = "Create obstacle"
     COMPAT_ENGINES = {'BLENDER_GAME'}
-
     @classmethod
     def poll(self, context):
         game = context.object.game
@@ -222,7 +218,7 @@ class PHYSICS_PT_game_obstacles(PhysicsButtonsPanel, bpy.types.Panel):
 
         split = layout.split()
         col = split.column()
-        col.prop(game, "obstacle_radius", text="Radius")
+        col.prop(game, "obstacle_radius", text="Radius")               
 
 class RenderButtonsPanel():
     bl_space_type = 'PROPERTIES'
@@ -352,6 +348,7 @@ class RENDER_PT_game_shading(RenderButtonsPanel, bpy.types.Panel):
             col.prop(gs, "use_glsl_lights", text="Lights")
             col.prop(gs, "use_glsl_shaders", text="Shaders")
             col.prop(gs, "use_glsl_shadows", text="Shadows")
+            col.prop(gs, "use_glsl_color_management", text="Color Management")
 
             col = split.column()
             col.prop(gs, "use_glsl_ramps", text="Ramps")
@@ -385,7 +382,7 @@ class RENDER_PT_game_display(RenderButtonsPanel, bpy.types.Panel):
         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")
+        flow.prop(gs, "show_mouse", text="Mouse Cursor")
 
 
 class RENDER_PT_game_sound(RenderButtonsPanel, bpy.types.Panel):
@@ -447,13 +444,9 @@ class WORLD_PT_game_world(WorldButtonsPanel, bpy.types.Panel):
 
         world = context.world
 
-        split = layout.split()
-
-        col = split.column()
-        col.prop(world, "horizon_color")
-
-        col = split.column()
-        col.prop(world, "ambient_color")
+        row = layout.row()
+        row.column().prop(world, "horizon_color")
+        row.column().prop(world, "ambient_color")
 
 
 class WORLD_PT_game_mist(WorldButtonsPanel, bpy.types.Panel):
@@ -476,13 +469,10 @@ class WORLD_PT_game_mist(WorldButtonsPanel, bpy.types.Panel):
         world = context.world
 
         layout.active = world.mist_settings.use_mist
-        split = layout.split()
-
-        col = split.column()
-        col.prop(world.mist_settings, "start")
 
-        col = split.column()
-        col.prop(world.mist_settings, "depth")
+        row = layout.row()
+        row.prop(world.mist_settings, "start")
+        row.prop(world.mist_settings, "depth")
 
 
 class WORLD_PT_game_physics(WorldButtonsPanel, bpy.types.Panel):
@@ -547,12 +537,5 @@ class WORLD_PT_game_physics_obstacles(WorldButtonsPanel, bpy.types.Panel):
             layout.prop(gs, "level_height")
             layout.prop(gs, "show_obstacle_simulation")
 
-def register():
+if __name__ == "__main__":  # only for live edit.
     bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()