diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-10-10 01:43:13 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-10-10 01:43:13 +0400 |
commit | 17b66b46ad3a09e948ec8143e394d1d9df6df6d6 (patch) | |
tree | f10fe07c2d8682be27dc6487324125395716878e /release/scripts/startup/bl_ui/properties_game.py | |
parent | 7306eb84f07c92a5bced22f7f38dd7de1770c425 (diff) |
fix crash for recent navmesh edits when setting a non-mesh object to a navmesh.
also minor cleanup.
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_game.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_game.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/release/scripts/startup/bl_ui/properties_game.py b/release/scripts/startup/bl_ui/properties_game.py index 6925836c5a2..55ab3313579 100644 --- a/release/scripts/startup/bl_ui/properties_game.py +++ b/release/scripts/startup/bl_ui/properties_game.py @@ -47,8 +47,9 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, Panel): layout.prop(game, "physics_type") layout.separator() - #if game.physics_type == 'DYNAMIC': - if game.physics_type in {'DYNAMIC', 'RIGID_BODY'}: + physics_type = game.physics_type + + if physics_type in {'DYNAMIC', 'RIGID_BODY'}: split = layout.split() col = split.column() @@ -108,7 +109,7 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, Panel): col.prop(game, "lock_rotation_y", text="Y") col.prop(game, "lock_rotation_z", text="Z") - elif game.physics_type == 'SOFT_BODY': + elif physics_type == 'SOFT_BODY': col = layout.column() col.prop(game, "use_actor") col.prop(game, "use_ghost") @@ -143,7 +144,7 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, Panel): sub.active = (soft.use_cluster_rigid_to_softbody or soft.use_cluster_soft_to_softbody) sub.prop(soft, "cluster_iterations", text="Iterations") - elif game.physics_type == 'STATIC': + elif physics_type == 'STATIC': col = layout.column() col.prop(game, "use_actor") col.prop(game, "use_ghost") @@ -164,9 +165,10 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, 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 physics_type in {'SENSOR', 'INVISIBLE', 'NO_COLLISION', 'OCCLUDE'}: layout.prop(ob, "hide_render", text="Invisible") - elif game.physics_type == 'NAVMESH': + + elif physics_type == 'NAVMESH': layout.operator("mesh.assign_navpolygon") layout.operator("mesh.assign_new_navpolygon") |