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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-03-17 19:52:05 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-03-17 23:53:13 +0300
commitdf96455c55110da00f0543c5895376ffbc66313b (patch)
treed1fc0a55f44d4b931362d84eea77a7662c1955a6 /release/scripts/startup/bl_ui/properties_data_light.py
parentf79ad428085edd8289f37027ba3d5ed3a52bce67 (diff)
UI: add light/world settings in shader node editor.
Material was already there. Implementation was changed so it's just a single line of code to adapt a panel to the node editor.
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_data_light.py')
-rw-r--r--release/scripts/startup/bl_ui/properties_data_light.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_light.py b/release/scripts/startup/bl_ui/properties_data_light.py
index d6f37245d96..acda015f8d4 100644
--- a/release/scripts/startup/bl_ui/properties_data_light.py
+++ b/release/scripts/startup/bl_ui/properties_data_light.py
@@ -69,7 +69,13 @@ class DATA_PT_light(DataButtonsPanel, Panel):
light = context.light
- layout.row().prop(light, "type", expand=True)
+ # Compact layout for node editor.
+ if self.bl_space_type == 'PROPERTIES':
+ layout.row().prop(light, "type", expand=True)
+ layout.use_property_split = True
+ else:
+ layout.use_property_split = True
+ layout.row().prop(light, "type")
class DATA_PT_EEVEE_light(DataButtonsPanel, Panel):
@@ -80,9 +86,13 @@ class DATA_PT_EEVEE_light(DataButtonsPanel, Panel):
layout = self.layout
light = context.light
- layout.row().prop(light, "type", expand=True)
-
- layout.use_property_split = True
+ # Compact layout for node editor.
+ if self.bl_space_type == 'PROPERTIES':
+ layout.row().prop(light, "type", expand=True)
+ layout.use_property_split = True
+ else:
+ layout.use_property_split = True
+ layout.row().prop(light, "type")
col = layout.column()
col.prop(light, "color")