diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-03-17 19:52:05 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-03-17 23:53:13 +0300 |
commit | df96455c55110da00f0543c5895376ffbc66313b (patch) | |
tree | d1fc0a55f44d4b931362d84eea77a7662c1955a6 /release/scripts/startup/bl_ui/properties_data_light.py | |
parent | f79ad428085edd8289f37027ba3d5ed3a52bce67 (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.py | 18 |
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") |