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:
authorClément Foucault <foucault.clem@gmail.com>2018-11-30 17:40:46 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-11-30 17:40:57 +0300
commitfe2855489801d8e87038b8b5884fc9d26efb1bf2 (patch)
treed84575ed71847fdbff214afd0656bab715c83ea3 /release/scripts/startup/bl_ui/space_userpref.py
parent4251ab467542ca611acb6b5275dffbb61464e739 (diff)
StudioLight Editor: Add copy settings and overwrite prompt
Copy settings let users create variations more easily. Ovewrite prompt is there to be able to edit already existing studiolight.
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, 6 insertions, 24 deletions
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 56accc902f4..ae1fe42b3d7 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -1516,9 +1516,14 @@ class StudioLightPanelMixin():
row = box.row()
row.template_icon(layout.icon(studio_light), scale=6.0)
- op = row.operator('wm.studiolight_uninstall', text="", icon='REMOVE')
+ col = row.column()
+ op = col.operator('wm.studiolight_uninstall', text="", icon='REMOVE')
op.index = studio_light.index
+ if studio_light.type == 'STUDIO':
+ op = col.operator('wm.studiolight_copy_settings', text="", icon='IMPORT')
+ op.index = studio_light.index
+
box.label(text=studio_light.name)
@@ -1536,29 +1541,6 @@ class USERPREF_PT_studiolight_lights(Panel, StudioLightPanelMixin):
bl_label = "Studio Lights"
sl_type = 'STUDIO'
- @classmethod
- def poll(cls, context):
- userpref = context.user_preferences
- return (userpref.active_section == 'LIGHTS')
-
- def opengl_light_buttons(self, layout, light):
-
- col = layout.column()
- col.active = light.use
-
- 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")
-
- def draw(self, context):
- userpref = context.user_preferences
- lights = self._get_lights(userpref)
- layout = self.layout
-
- self.draw_light_list(layout, lights)
-
class USERPREF_PT_studiolight_light_editor(Panel):
bl_label = "Studio Light Editor"