diff options
author | Tim Stullich <tstullich> | 2019-05-15 15:45:33 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-05-15 17:07:50 +0300 |
commit | 5ba1a6bee0426e77a01cec8c89999ee4d15ced63 (patch) | |
tree | 3f6fa2deef19c31f93c9d68d54814fa85bf5d52a /release | |
parent | 2497ee31ec89560a9b72a070a70735caa6655b9e (diff) |
Lights: change sun light size to be specified as angle
This is the angular diameter as seen from earth, which is between 0.526° and
0.545° in reality. Sharing the size with other light types did not make much
sense and meant the unit was unclear.
Differential Revision: https://developer.blender.org/D4819
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_data_light.py | 4 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 9 |
2 files changed, 11 insertions, 2 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_light.py b/release/scripts/startup/bl_ui/properties_data_light.py index 3d78b3a664d..376b7561739 100644 --- a/release/scripts/startup/bl_ui/properties_data_light.py +++ b/release/scripts/startup/bl_ui/properties_data_light.py @@ -101,8 +101,10 @@ class DATA_PT_EEVEE_light(DataButtonsPanel, Panel): col.separator() - if light.type in {'POINT', 'SPOT', 'SUN'}: + if light.type in {'POINT', 'SPOT'}: col.prop(light, "shadow_soft_size", text="Radius") + elif light.type == 'SUN': + col.prop(light, "angle") elif light.type == 'AREA': col.prop(light, "shape") diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 1b833d0a8c3..35b37475f17 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -2312,12 +2312,19 @@ class VIEW3D_MT_object_context_menu(Menu): props.data_path_item = "data.size_y" props.header_text = "Light Size Y: %.3f" - elif light.type in {'SPOT', 'POINT', 'SUN'}: + elif light.type in {'SPOT', 'POINT'}: props = layout.operator("wm.context_modal_mouse", text="Radius") props.data_path_iter = "selected_editable_objects" props.data_path_item = "data.shadow_soft_size" props.header_text = "Light Radius: %.3f" + elif light.type == 'SUN': + props = layout.operator("wm.context_modal_mouse", text="Angle") + props.data_path_iter = "selected_editable_objects" + props.data_path_item = "data.angle" + props.header_text = "Light Angle: %.3f" + + if light.type == 'SPOT': layout.separator() |