Recast & Detour UI:
* Panels showed up even if in non game engine mode, polls were missing!
This commit is contained in:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user