[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [40091] trunk/blender/release/scripts/ startup/bl_ui/properties_game.py: Recast & Detour UI:

Thomas Dinges blender at dingto.org
Sat Sep 10 10:43:11 CEST 2011


Revision: 40091
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40091
Author:   dingto
Date:     2011-09-10 08:43:11 +0000 (Sat, 10 Sep 2011)
Log Message:
-----------
Recast & Detour UI:
* Panels showed up even if in non game engine mode, polls were missing! 

Modified Paths:
--------------
    trunk/blender/release/scripts/startup/bl_ui/properties_game.py

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_game.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_game.py	2011-09-10 08:29:50 UTC (rev 40090)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_game.py	2011-09-10 08:43:11 UTC (rev 40091)
@@ -397,6 +397,11 @@
     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_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




More information about the Bf-blender-cvs mailing list