Recast & Detour UI:
authorThomas Dinges <blender@dingto.org>
Sat, 10 Sep 2011 08:43:11 +0000 (08:43 +0000)
committerThomas Dinges <blender@dingto.org>
Sat, 10 Sep 2011 08:43:11 +0000 (08:43 +0000)
* Panels showed up even if in non game engine mode, polls were missing!

release/scripts/startup/bl_ui/properties_game.py

index 711b51a5d5f097cc71fdeb5a60ff526965be75da..b06876637f7bcd3bf09797144236f3fd30d7cb2f 100644 (file)
@@ -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'}
     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
 
     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'}
 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
 
     def draw(self, context):
         layout = self.layout