diff options
Diffstat (limited to 'release/scripts/ui/properties_data_lamp.py')
-rw-r--r-- | release/scripts/ui/properties_data_lamp.py | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/release/scripts/ui/properties_data_lamp.py b/release/scripts/ui/properties_data_lamp.py index a5ac3bd62ae..55781434763 100644 --- a/release/scripts/ui/properties_data_lamp.py +++ b/release/scripts/ui/properties_data_lamp.py @@ -64,6 +64,7 @@ class DATA_PT_context_lamp(DataButtonsPanel, bpy.types.Panel): if texture_count != 0: split.label(text=str(texture_count), icon='TEXTURE') + class DATA_PT_preview(DataButtonsPanel, bpy.types.Panel): bl_label = "Preview" COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} @@ -133,6 +134,7 @@ class DATA_PT_sunsky(DataButtonsPanel, bpy.types.Panel): row.prop(lamp, "use_sky") row.menu("LAMP_MT_sunsky_presets", text=bpy.types.LAMP_MT_sunsky_presets.bl_label) row.operator("lamp.sunsky_preset_add", text="", icon="ZOOMIN") + row.operator("lamp.sunsky_preset_add", text="", icon="ZOOMOUT").remove_active = True row = layout.row() row.active = lamp.use_sky or lamp.use_atmosphere @@ -205,10 +207,10 @@ class DATA_PT_shadow(DataButtonsPanel, bpy.types.Panel): if lamp.shadow_method == 'NOSHADOW' and lamp.type == 'AREA': split = layout.split() - col= split.column() + col = split.column() col.label(text="Form factor sampling:") - - sub=col.row(align=True) + + sub = col.row(align=True) if lamp.shape == 'SQUARE': sub.prop(lamp, "shadow_ray_samples_x", text="Samples") @@ -228,19 +230,19 @@ class DATA_PT_shadow(DataButtonsPanel, bpy.types.Panel): if lamp.shadow_method == 'RAY_SHADOW': split = layout.split() - + col = split.column() col.label(text="Sampling:") - + if lamp.type in ('POINT', 'SUN', 'SPOT'): sub = col.row() - + sub.prop(lamp, "shadow_ray_samples", text="Samples") sub.prop(lamp, "shadow_soft_size", text="Soft Size") - + elif lamp.type == 'AREA': sub = col.row(align=True) - + if lamp.shape == 'SQUARE': sub.prop(lamp, "shadow_ray_samples_x", text="Samples") elif lamp.shape == 'RECTANGLE': @@ -251,11 +253,11 @@ class DATA_PT_shadow(DataButtonsPanel, bpy.types.Panel): split = layout.split() col = split.column() - + if lamp.shadow_ray_sample_method == 'ADAPTIVE_QMC': col.prop(lamp, "shadow_adaptive_threshold", text="Threshold") col = split.column() - + if lamp.type == 'AREA' and lamp.shadow_ray_sample_method == 'CONSTANT_JITTERED': col = split.column() col = split.column() @@ -322,7 +324,7 @@ class DATA_PT_area(DataButtonsPanel, bpy.types.Panel): split = layout.split() col = split.column() - + col.row().prop(lamp, "shape", expand=True) sub = col.row(align=True) @@ -388,14 +390,15 @@ class DATA_PT_falloff_curve(DataButtonsPanel, bpy.types.Panel): class DATA_PT_custom_props_lamp(DataButtonsPanel, PropertyPanel, bpy.types.Panel): COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} _context_path = "object.data" + _property_type = bpy.types.Lamp def register(): - pass + bpy.utils.register_module(__name__) def unregister(): - pass + bpy.utils.unregister_module(__name__) if __name__ == "__main__": register() |