pep8 cleanup & default select axis to negative (artist requst, make sense if you model the RHS and spend most time looping at the models front)

This commit is contained in:
Campbell Barton
2009-11-21 00:05:43 +00:00
parent d91e6e2160
commit 6073bc9bc3
18 changed files with 157 additions and 161 deletions

View File

@@ -21,6 +21,7 @@ import bpy
narrowui = 180
class PhysicsButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
@@ -186,14 +187,14 @@ class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel):
layout.itemR(game, "collision_bounds", text="")
split = layout.split()
col = split.column()
col.itemR(game, "collision_margin", text="Margin", slider=True)
if wide_ui:
col = split.column()
col.itemR(game, "collision_compound", text="Compound")
bpy.types.register(PHYSICS_PT_game_physics)
bpy.types.register(PHYSICS_PT_game_collision_bounds)
@@ -302,7 +303,7 @@ class RENDER_PT_game_stereo(RenderButtonsPanel):
elif dome_type == 'PANORAM_SPH':
col = split.column()
col.itemR(gs, "dome_buffer_resolution", text="Resolution", slider=True)
if wide_ui:
col = split.column()
@@ -325,7 +326,7 @@ class RENDER_PT_game_shading(RenderButtonsPanel):
gs = context.scene.game_data
wide_ui = context.region.width > narrowui
if wide_ui:
layout.itemR(gs, "material_mode", expand=True)
else:
@@ -353,7 +354,7 @@ class RENDER_PT_game_performance(RenderButtonsPanel):
gs = context.scene.game_data
wide_ui = context.region.width > narrowui
split = layout.split()
col = split.column()
@@ -426,12 +427,13 @@ class WORLD_PT_game_context_world(WorldButtonsPanel):
split.template_ID(scene, "world", new="world.new")
elif world:
split.template_ID(space, "pin_id")
else:
else:
if scene:
layout.template_ID(scene, "world", new="world.new")
elif world:
layout.template_ID(space, "pin_id")
class WORLD_PT_game_world(WorldButtonsPanel):
bl_label = "World"
@@ -442,38 +444,40 @@ class WORLD_PT_game_world(WorldButtonsPanel):
wide_ui = context.region.width > narrowui
split = layout.split()
col = split.column()
col.itemR(world, "horizon_color")
if wide_ui:
col = split.column()
col.itemR(world, "ambient_color")
class WORLD_PT_game_mist(WorldButtonsPanel):
bl_label = "Mist"
def draw_header(self, context):
world = context.world
self.layout.itemR(world.mist, "enabled", text="")
def draw(self, context):
layout = self.layout
world = context.world
wide_ui = context.region.width > narrowui
layout.active = world.mist.enabled
split = layout.split()
col = split.column()
col.itemR(world.mist, "start")
if wide_ui:
col = split.column()
col.itemR(world.mist, "depth")
class WORLD_PT_game_physics(WorldButtonsPanel):
bl_label = "Physics"
@@ -521,4 +525,4 @@ class WORLD_PT_game_physics(WorldButtonsPanel):
bpy.types.register(WORLD_PT_game_context_world)
bpy.types.register(WORLD_PT_game_world)
bpy.types.register(WORLD_PT_game_mist)
bpy.types.register(WORLD_PT_game_physics)
bpy.types.register(WORLD_PT_game_physics)