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:
authorCampbell Barton <ideasman42@gmail.com>2013-06-18 10:23:30 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-06-18 10:23:30 +0400
commitb0872918ea9938f83a9e9c52184fa1e335bff0f4 (patch)
tree18c16496523c953186eb54d89c74c232a26ffdc3 /release
parent1f785cc196632d0c1fea48507d44fb1b5843ae5d (diff)
fix [#35771] "Specials" ->"Size Y" doesn't work for Cycles area lamp
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py20
1 files changed, 12 insertions, 8 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index b8cbd058063..e0449931fc9 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -966,26 +966,30 @@ class VIEW3D_MT_object_specials(Menu):
if scene.render.use_shading_nodes:
try:
value = lamp.node_tree.nodes["Emission"].inputs["Strength"].default_value
+ except AttributeError:
+ value = None
+ if value is not None:
props = layout.operator("wm.context_modal_mouse", text="Strength")
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "data.node_tree.nodes[\"Emission\"].inputs[\"Strength\"].default_value"
props.header_text = "Lamp Strength: %.3f"
props.input_scale = 0.1
- except AttributeError:
- pass
+ del value
- if lamp.type == 'AREA' and lamp.shape == 'RECTANGLE':
+ if lamp.type == 'AREA':
props = layout.operator("wm.context_modal_mouse", text="Size X")
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "data.size"
props.header_text = "Lamp Size X: %.3f"
- props = layout.operator("wm.context_modal_mouse", text="Size Y")
- props.data_path_iter = "selected_editable_objects"
- props.data_path_item = "data.size"
- props.header_text = "Lamp Size Y: %.3f"
- elif lamp.type in {'SPOT', 'AREA', 'POINT', 'SUN'}:
+ if lamp.shape == 'RECTANGLE':
+ props = layout.operator("wm.context_modal_mouse", text="Size Y")
+ props.data_path_iter = "selected_editable_objects"
+ props.data_path_item = "data.size_y"
+ props.header_text = "Lamp Size Y: %.3f"
+
+ elif lamp.type in {'SPOT', 'POINT', 'SUN'}:
props = layout.operator("wm.context_modal_mouse", text="Size")
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "data.shadow_soft_size"