diff options
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_game.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_game.py | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_ui/properties_game.py b/release/scripts/startup/bl_ui/properties_game.py index 32a8e734ab6..8ef9a083104 100644 --- a/release/scripts/startup/bl_ui/properties_game.py +++ b/release/scripts/startup/bl_ui/properties_game.py @@ -523,7 +523,27 @@ class SCENE_PT_game_navmesh(SceneButtonsPanel, Panel): row.prop(rd, "sample_max_error") -class WorldButtonsPanel: +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' bl_context = "world" @@ -765,6 +785,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 +803,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') |