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:
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_game.py')
-rw-r--r--release/scripts/startup/bl_ui/properties_game.py49
1 files changed, 42 insertions, 7 deletions
diff --git a/release/scripts/startup/bl_ui/properties_game.py b/release/scripts/startup/bl_ui/properties_game.py
index 32a8e734ab6..fa57bf2115f 100644
--- a/release/scripts/startup/bl_ui/properties_game.py
+++ b/release/scripts/startup/bl_ui/properties_game.py
@@ -89,10 +89,14 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.label(text="Velocity:")
+ col.label(text="Linear velocity:")
sub = col.column(align=True)
sub.prop(game, "velocity_min", text="Minimum")
sub.prop(game, "velocity_max", text="Maximum")
+ col.label(text="Angular velocity:")
+ sub = col.column(align=True)
+ sub.prop(game, "angular_velocity_min", text="Minimum")
+ sub.prop(game, "angular_velocity_max", text="Maximum")
col = split.column()
col.label(text="Damping:")
@@ -100,7 +104,6 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, Panel):
sub.prop(game, "damping", text="Translation", slider=True)
sub.prop(game, "rotation_damping", text="Rotation", slider=True)
- if physics_type == 'RIGID_BODY':
layout.separator()
split = layout.split()
@@ -111,6 +114,7 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, Panel):
col.prop(game, "lock_location_y", text="Y")
col.prop(game, "lock_location_z", text="Z")
+ if physics_type == 'RIGID_BODY':
col = split.column()
col.label(text="Lock Rotation:")
col.prop(game, "lock_rotation_x", text="X")
@@ -213,15 +217,17 @@ class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel, Panel):
layout = self.layout
game = context.active_object.game
- layout.active = game.use_collision_bounds
+ split = layout.split()
+ split.active = game.use_collision_bounds
- layout.prop(game, "collision_bounds_type", text="Bounds")
+ col = split.column()
+ col.prop(game, "collision_bounds_type", text="Bounds")
- row = layout.row()
+ row = col.row()
row.prop(game, "collision_margin", text="Margin", slider=True)
sub = row.row()
- sub.active = game.physics_type not in {'SOFT_BODY', 'CHARACTER'}
+ sub.active = game.physics_type not in {'SOFT_BODY', 'CHARACTER'}
sub.prop(game, "use_collision_compound", text="Compound")
layout.separator()
@@ -397,7 +403,6 @@ class RENDER_PT_game_shading(RenderButtonsPanel, 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")
@@ -523,6 +528,26 @@ class SCENE_PT_game_navmesh(SceneButtonsPanel, Panel):
row.prop(rd, "sample_max_error")
+class SCENE_PT_game_hysteresis(SceneButtonsPanel, Panel):
+ bl_label = "Level of Detail"
+ COMPAT_ENGINES = {'BLENDER_GAME'}
+
+ @classmethod
+ def poll(cls, context):
+ scene = context.scene
+ return (scene and scene.render.engine in cls.COMPAT_ENGINES)
+
+ def draw(self, context):
+ layout = self.layout
+ gs = context.scene.game_settings
+
+ row = layout.row()
+ row.prop(gs, "use_scene_hysteresis", text="Hysteresis")
+ row = layout.row()
+ row.active = gs.use_scene_hysteresis
+ row.prop(gs, "scene_hysteresis_percentage", text="")
+
+
class WorldButtonsPanel:
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
@@ -712,6 +737,8 @@ class DATA_PT_shadow_game(DataButtonsPanel, Panel):
col = split.column()
col.prop(lamp, "shadow_color", text="")
+ if lamp.type == 'SUN':
+ col.prop(lamp, "show_shadow_box")
col = split.column()
col.prop(lamp, "use_shadow_layer", text="This Layer Only")
@@ -765,6 +792,7 @@ class OBJECT_PT_levels_of_detail(ObjectButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
ob = context.object
+ gs = context.scene.game_settings
col = layout.column()
@@ -782,6 +810,13 @@ class OBJECT_PT_levels_of_detail(ObjectButtonsPanel, Panel):
row.prop(level, "use_mesh", text="")
row.prop(level, "use_material", text="")
+ row = box.row()
+ row.active = gs.use_scene_hysteresis
+ row.prop(level, "use_object_hysteresis", text="Hysteresis Override")
+ row = box.row()
+ row.active = gs.use_scene_hysteresis and level.use_object_hysteresis
+ row.prop(level, "object_hysteresis_percentage", text="")
+
row = col.row(align=True)
row.operator("object.lod_add", text="Add", icon='ZOOMIN')
row.menu("OBJECT_MT_lod_tools", text="", icon='TRIA_DOWN')