diff options
author | Daniel Stokes <kupomail@gmail.com> | 2012-05-01 06:50:17 +0400 |
---|---|---|
committer | Daniel Stokes <kupomail@gmail.com> | 2012-05-01 06:50:17 +0400 |
commit | ae4fda82b026ae6e2b003c1105f329b7e76582b0 (patch) | |
tree | 1dfe2a3f3e1dd3dabe22c51a96ffdc07575f1bc5 /release/scripts/startup/bl_ui/properties_data_lamp.py | |
parent | 7cb037db8628c0522fb8c143d461e2054b616771 (diff) |
Merging phase 1 of the BGE Harmony branch:
* Shadow color now usable in the BGE
* Simplified the shadow panel while "Blender Game" renderer is active
* Added variance shadow maps for the BGE
* Buffered shadows on sun lamps in the BGE (orthographic)
* Light textures in the BGE
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_data_lamp.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_data_lamp.py | 53 |
1 files changed, 52 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_lamp.py b/release/scripts/startup/bl_ui/properties_data_lamp.py index 974924be46c..567833c4988 100644 --- a/release/scripts/startup/bl_ui/properties_data_lamp.py +++ b/release/scripts/startup/bl_ui/properties_data_lamp.py @@ -186,11 +186,62 @@ class DATA_PT_sunsky(DataButtonsPanel, Panel): 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', 'BLENDER_GAME'} + COMPAT_ENGINES = {'BLENDER_RENDER'} @classmethod def poll(cls, context): |