From 129452ebab3192415ab6329dd5c6acf438d2f18c Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Sat, 10 Sep 2011 08:43:11 +0000 Subject: Recast & Detour UI: * Panels showed up even if in non game engine mode, polls were missing! --- release/scripts/startup/bl_ui/properties_game.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'release/scripts') diff --git a/release/scripts/startup/bl_ui/properties_game.py b/release/scripts/startup/bl_ui/properties_game.py index 711b51a5d5f..b06876637f7 100644 --- a/release/scripts/startup/bl_ui/properties_game.py +++ b/release/scripts/startup/bl_ui/properties_game.py @@ -397,6 +397,11 @@ class SCENE_PT_game_navmesh(SceneButtonsPanel, bpy.types.Panel): bl_label = "Navigation mesh" bl_default_closed = True 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 @@ -572,6 +577,11 @@ class WORLD_PT_game_physics(WorldButtonsPanel, Panel): class WORLD_PT_game_physics_obstacles(WorldButtonsPanel, Panel): bl_label = "Obstacle simulation" COMPAT_ENGINES = {'BLENDER_GAME'} + + @classmethod + def poll(cls, context): + scene = context.scene + return (scene.world and scene.render.engine in cls.COMPAT_ENGINES) def draw(self, context): layout = self.layout -- cgit v1.2.3