diff options
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_game.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_game.py | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/release/scripts/startup/bl_ui/properties_game.py b/release/scripts/startup/bl_ui/properties_game.py index 7650e7b6ee1..0d104571e4b 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,18 @@ 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 physics_type == 'NAVMESH': + layout.operator("mesh.navmesh_face_copy") + layout.operator("mesh.navmesh_face_add") + + layout.separator() + + layout.operator("mesh.navmesh_reset") + layout.operator("mesh.navmesh_clear") + class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel, Panel): bl_label = "Collision Bounds" @@ -412,7 +422,7 @@ class SCENE_PT_game_navmesh(SceneButtonsPanel, bpy.types.Panel): rd = context.scene.game_settings.recast_data - layout.operator("mesh.create_navmesh", text='Build navigation mesh') + layout.operator("mesh.navmesh_make", text='Build navigation mesh') col = layout.column() col.label(text="Rasterization:") @@ -429,8 +439,8 @@ class SCENE_PT_game_navmesh(SceneButtonsPanel, bpy.types.Panel): col.prop(rd, "agent_radius", text="Radius") col = split.column() - col.prop(rd, "max_slope") - col.prop(rd, "max_climb") + col.prop(rd, "slope_max") + col.prop(rd, "climb_max") col = layout.column() col.label(text="Region:") |