Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInes Almeida <britalmeida@gmail.com>2015-02-27 14:11:49 +0300
committerInes Almeida <britalmeida@gmail.com>2015-02-28 12:09:55 +0300
commit8bb3e2a3ea49fa9886897458720ac5acf299624e (patch)
tree4c97d9f0f12da05a55fa50f6ebd4ecfad8230c33 /release/scripts
parentb00fecc85da19a25be571c6541dd76ea268af19d (diff)
gameengine physics: moving collision filtering inside the collision panel and relabeling some parts
Diffstat (limited to 'release/scripts')
-rw-r--r--release/scripts/startup/bl_ui/properties_game.py28
1 files changed, 15 insertions, 13 deletions
diff --git a/release/scripts/startup/bl_ui/properties_game.py b/release/scripts/startup/bl_ui/properties_game.py
index 2b229a4cf4f..32a8e734ab6 100644
--- a/release/scripts/startup/bl_ui/properties_game.py
+++ b/release/scripts/startup/bl_ui/properties_game.py
@@ -180,7 +180,7 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, Panel):
col.prop(game, "use_actor", text="Detect Actors")
col.prop(ob, "hide_render", text="Invisible")
- elif physics_type in {'INVISIBLE', 'NO_COLLISION', 'OCCLUDE'}:
+ elif physics_type in {'INVISIBLE', 'NO_COLLISION', 'OCCLUDER'}:
layout.prop(ob, "hide_render", text="Invisible")
elif physics_type == 'NAVMESH':
@@ -192,15 +192,6 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, Panel):
layout.operator("mesh.navmesh_reset")
layout.operator("mesh.navmesh_clear")
- if physics_type not in {'NO_COLLISION', 'OCCLUDE'}:
- layout.separator()
- split = layout.split()
-
- col = split.column()
- col.prop(game, "collision_group")
- col = split.column()
- col.prop(game, "collision_mask")
-
class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel, Panel):
bl_label = "Collision Bounds"
@@ -210,7 +201,8 @@ class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel, 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', 'CHARACTER'}) and (rd.engine in cls.COMPAT_ENGINES)
+ return (rd.engine in cls.COMPAT_ENGINES) \
+ and (game.physics_type in {'SENSOR', 'STATIC', 'DYNAMIC', 'RIGID_BODY', 'CHARACTER', 'SOFT_BODY'})
def draw_header(self, context):
game = context.active_object.game
@@ -221,16 +213,25 @@ class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel, Panel):
layout = self.layout
game = context.active_object.game
-
layout.active = game.use_collision_bounds
+
layout.prop(game, "collision_bounds_type", text="Bounds")
row = layout.row()
row.prop(game, "collision_margin", text="Margin", slider=True)
+
sub = row.row()
sub.active = game.physics_type not in {'SOFT_BODY', 'CHARACTER'}
sub.prop(game, "use_collision_compound", text="Compound")
+ layout.separator()
+ split = layout.split()
+ col = split.column()
+ col.prop(game, "collision_group")
+ col = split.column()
+ col.prop(game, "collision_mask")
+
+
class PHYSICS_PT_game_obstacles(PhysicsButtonsPanel, Panel):
bl_label = "Create Obstacle"
COMPAT_ENGINES = {'BLENDER_GAME'}
@@ -239,7 +240,8 @@ class PHYSICS_PT_game_obstacles(PhysicsButtonsPanel, 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 (rd.engine in cls.COMPAT_ENGINES) \
+ and (game.physics_type in {'SENSOR', 'STATIC', 'DYNAMIC', 'RIGID_BODY', 'SOFT_BODY'})
def draw_header(self, context):
game = context.active_object.game