diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2018-08-12 14:52:49 +0300 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2018-08-12 14:52:49 +0300 |
commit | dc2d841b7c50565302af2986d62ddbd29c332acd (patch) | |
tree | 324f234e56fde77fb80dfdef0c7c21f01968f71b /release/scripts/startup/bl_operators/wm.py | |
parent | 27b28e437d974ebbafa234205941c07aa0ab546c (diff) | |
parent | 4b6fa4d897a0bb3252b16383492b526d2cef3920 (diff) |
Merge branch 'blender2.8' into hair_guideshair_guides
Diffstat (limited to 'release/scripts/startup/bl_operators/wm.py')
-rw-r--r-- | release/scripts/startup/bl_operators/wm.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py index cfbc96696d6..0ccdd3cf5c6 100644 --- a/release/scripts/startup/bl_operators/wm.py +++ b/release/scripts/startup/bl_operators/wm.py @@ -2440,9 +2440,9 @@ class WM_OT_studiolight_install(Operator): ) orientation: EnumProperty( items=( - ("MATCAP", "MatCap", ""), - ("WORLD", "World", ""), - ("CAMERA", "Camera", ""), + ('MATCAP', "MatCap", ""), + ('WORLD', "World", ""), + ('CAMERA', "Camera", ""), ) ) @@ -2499,9 +2499,12 @@ class WM_OT_studiolight_uninstall(Operator): userpref = context.user_preferences for studio_light in userpref.studio_lights: if studio_light.index == self.index: - self._remove_path(pathlib.Path(studio_light.path)) - self._remove_path(pathlib.Path(studio_light.path_irr_cache)) - self._remove_path(pathlib.Path(studio_light.path_sh_cache)) + if len(studio_light.path) > 0: + self._remove_path(pathlib.Path(studio_light.path)) + if len(studio_light.path_irr_cache) > 0: + self._remove_path(pathlib.Path(studio_light.path_irr_cache)) + if len(studio_light.path_sh_cache) > 0: + self._remove_path(pathlib.Path(studio_light.path_sh_cache)) userpref.studio_lights.remove(studio_light) return {'FINISHED'} return {'CANCELLED'} |