Recast & Detour UI:

* Panels showed up even if in non game engine mode, polls were missing!
This commit is contained in:
Thomas Dinges
2011-09-10 08:43:11 +00:00
parent e9c645c727
commit 129452ebab

View File

@@ -398,6 +398,11 @@ class SCENE_PT_game_navmesh(SceneButtonsPanel, bpy.types.Panel):
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
@@ -573,6 +578,11 @@ 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