== filebrowser ==

When loading .blend file (F1) open the filebrowser with the most recently used .blend file. Another lost feature from 2.49 back ;)
This commit is contained in:
Andrea Weikert
2010-11-11 18:53:10 +00:00
parent df487be82f
commit c0da754d8d

View File

@@ -1460,7 +1460,15 @@ static void open_set_use_scripts(wmOperator *op)
static int wm_open_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
RNA_string_set(op->ptr, "filepath", G.main->name);
const char *openname= G.main->name;
/* if possible, get the name of the most recently used .blend file */
if (G.recent_files.first) {
struct RecentFile *recent = G.recent_files.first;
openname = recent->filepath;
}
RNA_string_set(op->ptr, "filepath", openname);
open_set_load_ui(op);
open_set_use_scripts(op);