Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Dinges <blender@dingto.org>2009-06-14 01:22:21 +0400
committerThomas Dinges <blender@dingto.org>2009-06-14 01:22:21 +0400
commitc3c38155ad2aca369fa956b2251ed41c749942cc (patch)
tree7c522007b81b30989af91dcad1bb573b78c19da5 /release/ui/buttons_data_lamp.py
parent646d4041e2c3461f4494be126172cf10472914b7 (diff)
2.5 Buttons:
* Added more material buttons by William. Thanks. I made some minor adjustments and added Specular Shader Model RNA. * Code cleanup and some consistency tweaks of button files. Notes: Preview render now only shows up when there is an active world, material, texture or lamp. * Made sure initial panels with ID Datablocks are shown, even when no block is active.
Diffstat (limited to 'release/ui/buttons_data_lamp.py')
-rw-r--r--release/ui/buttons_data_lamp.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/release/ui/buttons_data_lamp.py b/release/ui/buttons_data_lamp.py
index f626eb45ed6..7328abc7c35 100644
--- a/release/ui/buttons_data_lamp.py
+++ b/release/ui/buttons_data_lamp.py
@@ -22,12 +22,16 @@ class DATA_PT_preview(DataButtonsPanel):
class DATA_PT_lamp(DataButtonsPanel):
__idname__ = "DATA_PT_lamp"
__label__ = "Lamp"
+
+ def poll(self, context):
+ return (context.object.type == 'LAMP')
def draw(self, context):
+ layout = self.layout
+
ob = context.object
lamp = context.lamp
space = context.space_data
- layout = self.layout
split = layout.split(percentage=0.65)
@@ -82,8 +86,8 @@ class DATA_PT_sunsky(DataButtonsPanel):
return (lamp and lamp.type == 'SUN')
def draw(self, context):
- lamp = context.lamp.sky
layout = self.layout
+ lamp = context.lamp.sky
row = layout.row()
row.itemR(lamp, "sky")
@@ -96,7 +100,6 @@ class DATA_PT_sunsky(DataButtonsPanel):
split = layout.split()
col = split.column()
-
sub = col.column()
sub.active = lamp.sky
sub.itemR(lamp, "sky_blend_type", text="Blend Type")
@@ -125,8 +128,8 @@ class DATA_PT_shadow(DataButtonsPanel):
return (lamp and lamp.type in ('POINT','SUN', 'SPOT', 'AREA'))
def draw(self, context):
- lamp = context.lamp
layout = self.layout
+ lamp = context.lamp
layout.itemR(lamp, "shadow_method", expand=True)
@@ -204,8 +207,8 @@ class DATA_PT_spot(DataButtonsPanel):
return (lamp and lamp.type == 'SPOT')
def draw(self, context):
- lamp = context.lamp
layout = self.layout
+ lamp = context.lamp
split = layout.split()
@@ -236,8 +239,8 @@ class DATA_PT_falloff_curve(DataButtonsPanel):
return False
def draw(self, context):
- lamp = context.lamp
layout = self.layout
+ lamp = context.lamp
layout.template_curve_mapping(lamp.falloff_curve)