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>2019-01-02 18:01:28 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-01-02 18:13:00 +0300
commitae50a7df037e63863815b54ca53b4dbf3cda2799 (patch)
tree1236d43cce43d3c529c916744d2405751e149225 /release/scripts/startup/bl_ui/space_userpref.py
parent72e2a0cfb6f8e4d21b33982bbd572f10c20e947c (diff)
Fixes and edits to studio light operators
- Remove pathlib use (was converting to/from string with no real advantage). - Use user_resource(..., create=True) to ensure the path exists. - Pass full path to BKE_studiolight_create, don't add extension after. - Fix 'sl' filtering glob and move from ui code to operator. - Fix string copy length.
Diffstat (limited to 'release/scripts/startup/bl_ui/space_userpref.py')
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 73d34fdb380..7dacb8d9db6 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -45,11 +45,9 @@ class USERPREF_HT_header(Header):
layout.operator("wm.addon_refresh", icon='FILE_REFRESH')
layout.menu("USERPREF_MT_addons_online_resources")
elif prefs.active_section == 'LIGHTS':
- layout.operator("wm.studiolight_install", text="Add MatCap").type = 'MATCAP'
- layout.operator("wm.studiolight_install", text="Add LookDev HDRI").type = 'WORLD'
- op = layout.operator("wm.studiolight_install", text="Add Studio Light")
- op.type = 'STUDIO'
- op.filter_glob = ".sl"
+ layout.operator("wm.studiolight_install", text="Install MatCap").type = 'MATCAP'
+ layout.operator("wm.studiolight_install", text="Install LookDev HDRI").type = 'WORLD'
+ layout.operator("wm.studiolight_install", text="Install Studio Light").type = 'STUDIO'
elif prefs.active_section == 'THEMES':
layout.operator("wm.theme_install", icon='FILEBROWSER')
layout.operator("ui.reset_default_theme", icon='LOOP_BACK')