[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [22051] branches/blender2.5/blender/ release/ui/buttons_data_lamp.py: * More lamp tweaks, meant to commit this last night
Matt Ebb
matt at mke3.net
Thu Jul 30 15:56:39 CEST 2009
Revision: 22051
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=22051
Author: broken
Date: 2009-07-30 15:56:39 +0200 (Thu, 30 Jul 2009)
Log Message:
-----------
* More lamp tweaks, meant to commit this last night
Modified Paths:
--------------
branches/blender2.5/blender/release/ui/buttons_data_lamp.py
Modified: branches/blender2.5/blender/release/ui/buttons_data_lamp.py
===================================================================
--- branches/blender2.5/blender/release/ui/buttons_data_lamp.py 2009-07-30 13:35:32 UTC (rev 22050)
+++ branches/blender2.5/blender/release/ui/buttons_data_lamp.py 2009-07-30 13:56:39 UTC (rev 22051)
@@ -54,7 +54,8 @@
sub.itemR(lamp, "energy")
if lamp.type in ('POINT', 'SPOT'):
- sub.itemR(lamp, "falloff_type", text="Falloff")
+ sub.itemL(text="Falloff:")
+ sub.itemR(lamp, "falloff_type", text="")
sub.itemR(lamp, "distance")
if lamp.falloff_type == 'LINEAR_QUADRATIC_WEIGHTED':
@@ -68,15 +69,8 @@
if lamp.type == 'AREA':
col.itemR(lamp, "distance")
col.itemR(lamp, "gamma")
- col.itemR(lamp, "shape")
+
- sub = col.column(align=True)
- if (lamp.shape == 'SQUARE'):
- sub.itemR(lamp, "size")
- elif (lamp.shape == 'RECTANGLE'):
- sub.itemR(lamp, "size", text="Size X")
- sub.itemR(lamp, "size_y", text="Size Y")
-
col = split.column()
col.itemR(lamp, "negative")
col.itemR(lamp, "layer", text="This Layer Only")
@@ -180,13 +174,13 @@
if lamp.type in ('POINT', 'SUN', 'SPOT'):
split = layout.split()
- col = split.column(align=True)
+ col = split.column()
col.itemR(lamp, "shadow_soft_size", text="Soft Size")
- col = split.column(align=True)
col.itemR(lamp, "shadow_ray_samples", text="Samples")
if lamp.shadow_ray_sampling_method == 'ADAPTIVE_QMC':
col.itemR(lamp, "shadow_adaptive_threshold", text="Threshold")
+ col = split.column()
elif lamp.type == 'AREA':
split = layout.split()
@@ -194,18 +188,18 @@
col = split.column()
sub = split.column(align=True)
if lamp.shape == 'SQUARE':
- sub.itemR(lamp, "shadow_ray_samples_x", text="Samples")
+ col.itemR(lamp, "shadow_ray_samples_x", text="Samples")
elif lamp.shape == 'RECTANGLE':
- sub.itemR(lamp, "shadow_ray_samples_x", text="Samples X")
- sub.itemR(lamp, "shadow_ray_samples_y", text="Samples Y")
+ col.itemR(lamp, "shadow_ray_samples_x", text="Samples X")
+ col.itemR(lamp, "shadow_ray_samples_y", text="Samples Y")
if lamp.shadow_ray_sampling_method == 'ADAPTIVE_QMC':
- sub.itemR(lamp, "shadow_adaptive_threshold", text="Threshold")
+ col.itemR(lamp, "shadow_adaptive_threshold", text="Threshold")
elif lamp.shadow_ray_sampling_method == 'CONSTANT_JITTERED':
- col.itemR(lamp, "umbra")
- col.itemR(lamp, "dither")
- col.itemR(lamp, "jitter")
+ sub.itemR(lamp, "umbra")
+ sub.itemR(lamp, "dither")
+ sub.itemR(lamp, "jitter")
if lamp.shadow_method == 'BUFFER_SHADOW':
col = layout.column()
@@ -244,8 +238,34 @@
sub.active = not lamp.auto_clip_end
sub.itemR(lamp, "shadow_buffer_clip_end", text=" Clip End")
+class DATA_PT_area(DataButtonsPanel):
+ __label__ = "Area Shape"
+
+ def poll(self, context):
+ lamp = context.lamp
+ return (lamp and lamp.type == 'AREA')
+
+ def draw(self, context):
+ layout = self.layout
+
+ lamp = context.lamp
+
+ split = layout.split()
+
+ col = split.column()
+ col.itemR(lamp, "shape", text="")
+
+ sub = col.column(align=True)
+ if (lamp.shape == 'SQUARE'):
+ sub.itemR(lamp, "size")
+ elif (lamp.shape == 'RECTANGLE'):
+ sub.itemR(lamp, "size", text="Size X")
+ sub.itemR(lamp, "size_y", text="Size Y")
+
+ col = split.column()
+
class DATA_PT_spot(DataButtonsPanel):
- __label__ = "Spot"
+ __label__ = "Spot Shape"
def poll(self, context):
lamp = context.lamp
@@ -296,6 +316,7 @@
bpy.types.register(DATA_PT_preview)
bpy.types.register(DATA_PT_lamp)
bpy.types.register(DATA_PT_falloff_curve)
+bpy.types.register(DATA_PT_area)
bpy.types.register(DATA_PT_spot)
bpy.types.register(DATA_PT_shadow)
bpy.types.register(DATA_PT_sunsky)
\ No newline at end of file
More information about the Bf-blender-cvs
mailing list