[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47614] trunk/blender/release/scripts/ startup/bl_ui: Don't show physics properties in game engine conext

Sergej Reich sergej.reich at googlemail.com
Fri Jun 8 17:24:29 CEST 2012


Revision: 47614
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47614
Author:   sergof
Date:     2012-06-08 15:24:28 +0000 (Fri, 08 Jun 2012)
Log Message:
-----------
Don't show physics properties in game engine conext

Also rename fluid panels to be more consistent with other simulations

Modified Paths:
--------------
    trunk/blender/release/scripts/startup/bl_ui/properties_physics_cloth.py
    trunk/blender/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
    trunk/blender/release/scripts/startup/bl_ui/properties_physics_fluid.py
    trunk/blender/release/scripts/startup/bl_ui/properties_physics_smoke.py
    trunk/blender/release/scripts/startup/bl_ui/properties_physics_softbody.py

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_physics_cloth.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_physics_cloth.py	2012-06-08 15:14:45 UTC (rev 47613)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_physics_cloth.py	2012-06-08 15:24:28 UTC (rev 47614)
@@ -117,10 +117,6 @@
     bl_label = "Cloth Cache"
     bl_options = {'DEFAULT_CLOSED'}
 
-    @classmethod
-    def poll(cls, context):
-        return context.cloth
-
     def draw(self, context):
         md = context.cloth
         point_cache_ui(self, context, md.point_cache, cloth_panel_enabled(md), 'CLOTH')
@@ -130,10 +126,6 @@
     bl_label = "Cloth Collision"
     bl_options = {'DEFAULT_CLOSED'}
 
-    @classmethod
-    def poll(cls, context):
-        return context.cloth
-
     def draw_header(self, context):
         cloth = context.cloth.collision_settings
 
@@ -173,10 +165,6 @@
     bl_label = "Cloth Stiffness Scaling"
     bl_options = {'DEFAULT_CLOSED'}
 
-    @classmethod
-    def poll(cls, context):
-        return context.cloth
-
     def draw_header(self, context):
         cloth = context.cloth.settings
 
@@ -209,10 +197,6 @@
     bl_label = "Cloth Field Weights"
     bl_options = {'DEFAULT_CLOSED'}
 
-    @classmethod
-    def poll(cls, context):
-        return (context.cloth)
-
     def draw(self, context):
         cloth = context.cloth.settings
         effector_weights_ui(self, context, cloth.effector_weights)

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py	2012-06-08 15:14:45 UTC (rev 47613)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py	2012-06-08 15:24:28 UTC (rev 47614)
@@ -120,7 +120,8 @@
     @classmethod
     def poll(cls, context):
         md = context.dynamic_paint
-        return md and md.ui_type == 'CANVAS' and md.canvas_settings and md.canvas_settings.canvas_surfaces.active
+        rd = context.scene.render
+        return md and md.ui_type == 'CANVAS' and md.canvas_settings and md.canvas_settings.canvas_surfaces.active and (not rd.use_game_engine)
 
     def draw(self, context):
         layout = self.layout
@@ -194,10 +195,13 @@
     @classmethod
     def poll(cls, context):
         md = context.dynamic_paint
+        rd = context.scene.render
         if not (md and md.ui_type == 'CANVAS' and md.canvas_settings):
             return 0
         surface = context.dynamic_paint.canvas_settings.canvas_surfaces.active
-        return surface and not (surface.surface_format == 'VERTEX' and (surface.surface_type in {'DISPLACE', 'WAVE'}))
+        return (surface and
+                (not (surface.surface_format == 'VERTEX' and (surface.surface_type in {'DISPLACE', 'WAVE'}))) and
+                (not rd.use_game_engine))
 
     def draw(self, context):
         layout = self.layout
@@ -284,10 +288,11 @@
     @classmethod
     def poll(cls, context):
         md = context.dynamic_paint
+        rd = context.scene.render
         if not (md and md.ui_type == 'CANVAS' and md.canvas_settings):
             return 0
         surface = context.dynamic_paint.canvas_settings.canvas_surfaces.active
-        return (surface and surface.surface_type == 'PAINT')
+        return (surface and surface.surface_type == 'PAINT') and (not rd.use_game_engine)
 
     def draw(self, context):
         layout = self.layout
@@ -318,10 +323,11 @@
     @classmethod
     def poll(cls, context):
         md = context.dynamic_paint
+        rd = context.scene.render
         if not (md and md.ui_type == 'CANVAS' and md.canvas_settings):
             return False
         surface = context.dynamic_paint.canvas_settings.canvas_surfaces.active
-        return (surface and surface.surface_type == 'PAINT')
+        return (surface and surface.surface_type == 'PAINT') and (not rd.use_game_engine)
 
     def draw(self, context):
         layout = self.layout
@@ -366,11 +372,13 @@
     @classmethod
     def poll(cls, context):
         md = context.dynamic_paint
+        rd = context.scene.render
         return (md and
                 md.ui_type == 'CANVAS' and
                 md.canvas_settings and
                 md.canvas_settings.canvas_surfaces.active and
-                md.canvas_settings.canvas_surfaces.active.is_cache_user)
+                md.canvas_settings.canvas_surfaces.active.is_cache_user and
+                (not rd.use_game_engine))
 
     def draw(self, context):
         surface = context.dynamic_paint.canvas_settings.canvas_surfaces.active
@@ -385,7 +393,8 @@
     @classmethod
     def poll(cls, context):
         md = context.dynamic_paint
-        return md and md.ui_type == 'BRUSH' and md.brush_settings
+        rd = context.scene.render
+        return md and md.ui_type == 'BRUSH' and md.brush_settings and (not rd.use_game_engine)
 
     def draw(self, context):
         layout = self.layout
@@ -437,7 +446,8 @@
     @classmethod
     def poll(cls, context):
         md = context.dynamic_paint
-        return md and md.ui_type == 'BRUSH' and md.brush_settings
+        rd = context.scene.render
+        return md and md.ui_type == 'BRUSH' and md.brush_settings and (not rd.use_game_engine)
 
     def draw(self, context):
         layout = self.layout
@@ -472,7 +482,8 @@
     @classmethod
     def poll(cls, context):
         md = context.dynamic_paint
-        return md and md.ui_type == 'BRUSH' and md.brush_settings
+        rd = context.scene.render
+        return md and md.ui_type == 'BRUSH' and md.brush_settings and (not rd.use_game_engine)
 
     def draw(self, context):
         layout = self.layout

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_physics_fluid.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_physics_fluid.py	2012-06-08 15:14:45 UTC (rev 47613)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_physics_fluid.py	2012-06-08 15:24:28 UTC (rev 47614)
@@ -192,13 +192,14 @@
 
 
 class PHYSICS_PT_domain_gravity(PhysicButtonsPanel, Panel):
-    bl_label = "Domain World"
+    bl_label = "Fluid World"
     bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
         md = context.fluid
-        return md and md.settings and (md.settings.type == 'DOMAIN')
+        rd = context.scene.render
+        return md and md.settings and (md.settings.type == 'DOMAIN') and (not rd.use_game_engine)
 
     def draw(self, context):
         layout = self.layout
@@ -244,13 +245,14 @@
 
 
 class PHYSICS_PT_domain_boundary(PhysicButtonsPanel, Panel):
-    bl_label = "Domain Boundary"
+    bl_label = "Fluid Boundary"
     bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
         md = context.fluid
-        return md and md.settings and (md.settings.type == 'DOMAIN')
+        rd = context.scene.render
+        return md and md.settings and (md.settings.type == 'DOMAIN') and (not rd.use_game_engine)
 
     def draw(self, context):
         layout = self.layout
@@ -273,13 +275,14 @@
 
 
 class PHYSICS_PT_domain_particles(PhysicButtonsPanel, Panel):
-    bl_label = "Domain Particles"
+    bl_label = "Fluid Particles"
     bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
         md = context.fluid
-        return md and md.settings and (md.settings.type == 'DOMAIN')
+        rd = context.scene.render
+        return md and md.settings and (md.settings.type == 'DOMAIN') and (not rd.use_game_engine)
 
     def draw(self, context):
         layout = self.layout

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_physics_smoke.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_physics_smoke.py	2012-06-08 15:14:45 UTC (rev 47613)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_physics_smoke.py	2012-06-08 15:24:28 UTC (rev 47614)
@@ -117,7 +117,8 @@
     @classmethod
     def poll(cls, context):
         md = context.smoke
-        return md and (md.smoke_type == 'DOMAIN')
+        rd = context.scene.render
+        return md and (md.smoke_type == 'DOMAIN') and (not rd.use_game_engine)
 
     def draw(self, context):
         layout = self.layout
@@ -145,7 +146,8 @@
     @classmethod
     def poll(cls, context):
         md = context.smoke
-        return md and (md.smoke_type == 'DOMAIN')
+        rd = context.scene.render
+        return md and (md.smoke_type == 'DOMAIN') and (not rd.use_game_engine)
 
     def draw_header(self, context):
         md = context.smoke.domain_settings
@@ -182,7 +184,8 @@
     @classmethod
     def poll(cls, context):
         md = context.smoke
-        return md and (md.smoke_type == 'DOMAIN')
+        rd = context.scene.render
+        return md and (md.smoke_type == 'DOMAIN') and (not rd.use_game_engine)
 
     def draw(self, context):
         layout = self.layout
@@ -202,8 +205,9 @@
 
     @classmethod
     def poll(cls, context):
-        smoke = context.smoke
-        return (smoke and smoke.smoke_type == 'DOMAIN')
+        md = context.smoke
+        rd = context.scene.render
+        return md and (md.smoke_type == 'DOMAIN') and (not rd.use_game_engine)
 
     def draw(self, context):
         domain = context.smoke.domain_settings

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_physics_softbody.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_physics_softbody.py	2012-06-08 15:14:45 UTC (rev 47613)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_physics_softbody.py	2012-06-08 15:24:28 UTC (rev 47614)
@@ -72,10 +72,6 @@
     bl_label = "Soft Body Cache"
     bl_options = {'DEFAULT_CLOSED'}
 
-    @classmethod
-    def poll(cls, context):
-        return context.soft_body
-
     def draw(self, context):
         md = context.soft_body
         point_cache_ui(self, context, md.point_cache, softbody_panel_enabled(md), 'SOFTBODY')
@@ -85,10 +81,6 @@
     bl_label = "Soft Body Goal"
     bl_options = {'DEFAULT_CLOSED'}
 
-    @classmethod
-    def poll(cls, context):
-        return context.soft_body
-
     def draw_header(self, context):

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list