[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [29396] trunk/blender/release/scripts/ui/ properties_game.py: create COMPAT_ENGINE in game panels to allow external game engines - patch from Xavier Thomas (xat)
Dalai Felinto
dfelinto at gmail.com
Fri Jun 11 01:53:14 CEST 2010
Revision: 29396
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=29396
Author: dfelinto
Date: 2010-06-11 01:53:13 +0200 (Fri, 11 Jun 2010)
Log Message:
-----------
create COMPAT_ENGINE in game panels to allow external game engines - patch from Xavier Thomas(xat)
Modified Paths:
--------------
trunk/blender/release/scripts/ui/properties_game.py
Modified: trunk/blender/release/scripts/ui/properties_game.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_game.py 2010-06-10 22:11:41 UTC (rev 29395)
+++ trunk/blender/release/scripts/ui/properties_game.py 2010-06-10 23:53:13 UTC (rev 29396)
@@ -30,11 +30,12 @@
def poll(self, context):
ob = context.active_object
rd = context.scene.render
- return ob and ob.game and (rd.engine == 'BLENDER_GAME')
+ return ob and ob.game and (rd.engine in self.COMPAT_ENGINES)
class PHYSICS_PT_game_physics(PhysicsButtonsPanel):
bl_label = "Physics"
+ COMPAT_ENGINES = {'BLENDER_GAME'}
def draw(self, context):
layout = self.layout
@@ -163,11 +164,12 @@
class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel):
bl_label = "Collision Bounds"
+ COMPAT_ENGINES = {'BLENDER_GAME'}
def poll(self, context):
game = context.object.game
rd = context.scene.render
- return (game.physics_type in ('DYNAMIC', 'RIGID_BODY', 'SENSOR', 'SOFT_BODY', 'STATIC')) and (rd.engine == 'BLENDER_GAME')
+ return (game.physics_type in ('DYNAMIC', 'RIGID_BODY', 'SENSOR', 'SOFT_BODY', 'STATIC')) and (rd.engine in self.COMPAT_ENGINES)
def draw_header(self, context):
game = context.active_object.game
@@ -203,11 +205,12 @@
def poll(self, context):
rd = context.scene.render
- return (rd.engine == 'BLENDER_GAME')
+ return (rd.engine in self.COMPAT_ENGINES)
class RENDER_PT_game(RenderButtonsPanel):
bl_label = "Game"
+ COMPAT_ENGINES = {'BLENDER_GAME'}
def draw(self, context):
layout = self.layout
@@ -219,6 +222,7 @@
class RENDER_PT_game_player(RenderButtonsPanel):
bl_label = "Standalone Player"
+ COMPAT_ENGINES = {'BLENDER_GAME'}
def draw(self, context):
layout = self.layout
@@ -256,6 +260,7 @@
class RENDER_PT_game_stereo(RenderButtonsPanel):
bl_label = "Stereo"
+ COMPAT_ENGINES = {'BLENDER_GAME'}
def draw(self, context):
layout = self.layout
@@ -315,6 +320,7 @@
class RENDER_PT_game_shading(RenderButtonsPanel):
bl_label = "Shading"
+ COMPAT_ENGINES = {'BLENDER_GAME'}
def draw(self, context):
layout = self.layout
@@ -343,6 +349,7 @@
class RENDER_PT_game_performance(RenderButtonsPanel):
bl_label = "Performance"
+ COMPAT_ENGINES = {'BLENDER_GAME'}
def draw(self, context):
layout = self.layout
@@ -368,6 +375,7 @@
class RENDER_PT_game_sound(RenderButtonsPanel):
bl_label = "Sound"
+ COMPAT_ENGINES = {'BLENDER_GAME'}
def draw(self, context):
layout = self.layout
@@ -390,12 +398,13 @@
def poll(self, context):
scene = context.scene
- return (scene.render.engine == 'BLENDER_GAME') and (scene.world is not None)
+ return (scene.render.engine in self.COMPAT_ENGINES) and (scene.world is not None)
class WORLD_PT_game_context_world(WorldButtonsPanel):
bl_label = ""
bl_show_header = False
+ COMPAT_ENGINES = {'BLENDER_GAME'}
def poll(self, context):
rd = context.scene.render
@@ -424,6 +433,7 @@
class WORLD_PT_game_world(WorldButtonsPanel):
bl_label = "World"
+ COMPAT_ENGINES = {'BLENDER_GAME'}
def draw(self, context):
layout = self.layout
@@ -443,6 +453,7 @@
class WORLD_PT_game_mist(WorldButtonsPanel):
bl_label = "Mist"
+ COMPAT_ENGINES = {'BLENDER_GAME'}
def draw_header(self, context):
world = context.world
@@ -468,6 +479,7 @@
class WORLD_PT_game_physics(WorldButtonsPanel):
bl_label = "Physics"
+ COMPAT_ENGINES = {'BLENDER_GAME'}
def draw(self, context):
layout = self.layout
More information about the Bf-blender-cvs
mailing list