[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46144] trunk/blender/release/scripts/ startup/bl_ui: Python UI Files:

Thomas Dinges blender at dingto.org
Tue May 1 13:09:06 CEST 2012


Revision: 46144
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46144
Author:   dingto
Date:     2012-05-01 11:09:05 +0000 (Tue, 01 May 2012)
Log Message:
-----------
Python UI Files:
* Panels only dedicated to the Game Engine, belong into properties_game.py.

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

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_data_lamp.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_data_lamp.py	2012-05-01 11:01:24 UTC (rev 46143)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_data_lamp.py	2012-05-01 11:09:05 UTC (rev 46144)
@@ -186,59 +186,8 @@
         sub = col.column(align=True)
         sub.prop(lamp, "atmosphere_inscattering", slider=True, text="Inscattering")
         sub.prop(lamp, "atmosphere_extinction", slider=True, text="Extinction")
-        
-class DATA_PT_shadow_game(DataButtonsPanel, bpy.types.Panel):
-    bl_label = "Shadow"
-    COMPAT_ENGINES = {'BLENDER_GAME'}
 
-    @classmethod
-    def poll(cls, context):
-        COMPAT_LIGHTS = {'SPOT', 'SUN'}
-        lamp = context.lamp
-        engine = context.scene.render.engine
-        return (lamp and lamp.type in COMPAT_LIGHTS) and (engine in cls.COMPAT_ENGINES)
-        
-    def draw_header(self, context):
-        lamp = context.lamp
-        
-        self.layout.prop(lamp, "use_shadow", text="")
 
-    def draw(self, context):
-        layout = self.layout
-
-        lamp = context.lamp
-        
-        split = layout.split()
-
-        col = split.column()
-        col.prop(lamp, "shadow_color", text="")
-
-        col = split.column()
-        col.prop(lamp, "use_shadow_layer", text="This Layer Only")
-        col.prop(lamp, "use_only_shadow")
-    
-        col = layout.column()
-        col.label("Buffer Type:")
-        col.prop(lamp, "ge_shadow_buffer_type", text="", toggle=True)
-        col.label("Quality:")
-        col = layout.column(align=True)
-        col.prop(lamp, "shadow_buffer_size", text="Size")
-        col.prop(lamp, "shadow_buffer_bias", text="Bias")
-        col.prop(lamp, "shadow_buffer_bleed_bias", text="Bleed Bias")
-		
-        
-        row = layout.row()
-        row.label("Clipping:")
-        row = layout.row(align=True)
-        row.prop(lamp, "shadow_buffer_clip_start", text="Clip Start")
-        row.prop(lamp, "shadow_buffer_clip_end", text="Clip End")
-
-        if lamp.type == 'SUN':
-            row = layout.row()
-            row.prop(lamp, "shadow_frustum_size", text="Frustum Size")
-        
-        layout.active = lamp.use_shadow
-
 class DATA_PT_shadow(DataButtonsPanel, Panel):
     bl_label = "Shadow"
     COMPAT_ENGINES = {'BLENDER_RENDER'}

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_game.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_game.py	2012-05-01 11:01:24 UTC (rev 46143)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_game.py	2012-05-01 11:09:05 UTC (rev 46144)
@@ -652,6 +652,64 @@
         if gs.obstacle_simulation != 'NONE':
             layout.prop(gs, "level_height")
             layout.prop(gs, "show_obstacle_simulation")
+            
+class DataButtonsPanel():
+    bl_space_type = 'PROPERTIES'
+    bl_region_type = 'WINDOW'
+    bl_context = "data"
+            
+            
+class DATA_PT_shadow_game(DataButtonsPanel, bpy.types.Panel):
+    bl_label = "Shadow"
+    COMPAT_ENGINES = {'BLENDER_GAME'}
 
+    @classmethod
+    def poll(cls, context):
+        COMPAT_LIGHTS = {'SPOT', 'SUN'}
+        lamp = context.lamp
+        engine = context.scene.render.engine
+        return (lamp and lamp.type in COMPAT_LIGHTS) and (engine in cls.COMPAT_ENGINES)
+        
+    def draw_header(self, context):
+        lamp = context.lamp
+        
+        self.layout.prop(lamp, "use_shadow", text="")
+
+    def draw(self, context):
+        layout = self.layout
+
+        lamp = context.lamp
+        
+        layout.active = lamp.use_shadow
+        
+        split = layout.split()
+
+        col = split.column()
+        col.prop(lamp, "shadow_color", text="")
+
+        col = split.column()
+        col.prop(lamp, "use_shadow_layer", text="This Layer Only")
+        col.prop(lamp, "use_only_shadow")
+    
+        col = layout.column()
+        col.label("Buffer Type:")
+        col.prop(lamp, "ge_shadow_buffer_type", text="", toggle=True)
+        col.label("Quality:")
+        col = layout.column(align=True)
+        col.prop(lamp, "shadow_buffer_size", text="Size")
+        col.prop(lamp, "shadow_buffer_bias", text="Bias")
+        col.prop(lamp, "shadow_buffer_bleed_bias", text="Bleed Bias")
+
+        row = layout.row()
+        row.label("Clipping:")
+        row = layout.row(align=True)
+        row.prop(lamp, "shadow_buffer_clip_start", text="Clip Start")
+        row.prop(lamp, "shadow_buffer_clip_end", text="Clip End")
+
+        if lamp.type == 'SUN':
+            row = layout.row()
+            row.prop(lamp, "shadow_frustum_size", text="Frustum Size")
+
+
 if __name__ == "__main__":  # only for live edit.
     bpy.utils.register_module(__name__)




More information about the Bf-blender-cvs mailing list