diff options
author | Thomas Dinges <blender@dingto.org> | 2010-02-15 04:42:51 +0300 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2010-02-15 04:42:51 +0300 |
commit | 9f7a4125118c19e39dd80828db041283599d2189 (patch) | |
tree | 3679bca1bc9c5a59ab220996216d52019d53c4b5 /release | |
parent | d8203226800b4aa8cc4fe4f76306189501970475 (diff) |
File > Open recent raised an error when there was no .Blog file. Now it prints an info.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/ui/space_info.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/release/scripts/ui/space_info.py b/release/scripts/ui/space_info.py index 24b080d80df..f1f3201770c 100644 --- a/release/scripts/ui/space_info.py +++ b/release/scripts/ui/space_info.py @@ -123,11 +123,14 @@ class INFO_MT_file_open_recent(bpy.types.Menu): import os layout = self.layout layout.operator_context = 'EXEC_AREA' - file = open(os.path.join(bpy.app.home, ".Blog"), "rU") - for line in file: - line = line.rstrip() - layout.operator("wm.open_mainfile", text=line, icon='FILE_BLEND').path = line - file.close() + try: + file = open(os.path.join(bpy.app.home, ".Blog"), "rU") + for line in file: + line = line.rstrip() + layout.operator("wm.open_mainfile", text=line, icon='FILE_BLEND').path = line + file.close() + except: + layout.label(text='No recent files') class INFO_MT_file_import(bpy.types.Menu): |