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:
authorPablo Vazquez <venomgfx@gmail.com>2018-11-28 18:24:55 +0300
committerPablo Vazquez <venomgfx@gmail.com>2018-11-28 18:24:55 +0300
commite392e0335431346eebd3d1e7cc330cd6845bdeb3 (patch)
treedd2c4816066a00514bb0eabbe703515263e83d05 /release/scripts/startup/bl_ui/space_userpref.py
parent2d720f51cd786f3e0924602efb6ec89ef8ed077f (diff)
UI: Layout tweaks to Studio Lights panel in Preferences.
Move Studio Lights panel first, and use single-column layout.
Diffstat (limited to 'release/scripts/startup/bl_ui/space_userpref.py')
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py30
1 files changed, 15 insertions, 15 deletions
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 8ace0b8164e..4d961ef347a 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -1540,31 +1540,27 @@ class USERPREF_PT_studiolight_lights(Panel, StudioLightPanelMixin):
userpref = context.user_preferences
return (userpref.active_section == 'LIGHTS')
- def opengl_light_buttons(self, column, light):
- split = column.split()
+ def opengl_light_buttons(self, layout, light):
- col = split.column()
- col.prop(light, "use", text="Use", icon='OUTLINER_OB_LIGHT' if light.use else 'LIGHT_DATA')
+ col = layout.column()
+ col.active = light.use
- sub = col.column()
- sub.active = light.use
- sub.prop(light, "diffuse_color")
- sub.prop(light, "specular_color")
- sub.prop(light, "smooth")
+ col.prop(light, "use", text="Use Light")
+ col.prop(light, "diffuse_color", text="Diffuse")
+ col.prop(light, "specular_color", text="Specular")
+ col.prop(light, "smooth")
+ col.prop(light, "direction")
- col = split.column()
- col.active = light.use
- col.prop(light, "direction", text="")
def draw(self, context):
layout = self.layout
+
+ layout.use_property_split = True
column = layout.split()
userpref = context.user_preferences
system = userpref.system
- layout.prop(system, "light_ambient")
-
light = system.solid_lights[0]
colsplit = column.split(factor=0.85)
self.opengl_light_buttons(colsplit, light)
@@ -1576,6 +1572,10 @@ class USERPREF_PT_studiolight_lights(Panel, StudioLightPanelMixin):
light = system.solid_lights[2]
self.opengl_light_buttons(column, light)
+ layout.separator()
+
+ layout.prop(system, "light_ambient")
+
classes = (
USERPREF_HT_header,
USERPREF_PT_navigation,
@@ -1590,10 +1590,10 @@ classes = (
USERPREF_PT_input,
USERPREF_MT_addons_online_resources,
USERPREF_PT_addons,
+ USERPREF_PT_studiolight_lights,
USERPREF_PT_studiolight_matcaps,
USERPREF_PT_studiolight_world,
USERPREF_PT_studiolight_camera,
- USERPREF_PT_studiolight_lights,
)
if __name__ == "__main__": # only for live edit.