diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-03-26 14:35:57 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-03-26 14:35:57 +0300 |
commit | 991f6f5998314635de8a096f78906715684aae7f (patch) | |
tree | e38446fb2a893cc1012c9dfc0b45b2f9d5ec7a05 /source | |
parent | b1475ae2c6e991ee4f9b1eb73f207f7b91a194c2 (diff) |
- game engine checking for autoexec was using the wrong global flag.
- 'Trusted Source' option was being overwritten on read making it usless.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 6 | ||||
-rw-r--r-- | source/creator/creator.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 2959bb4c179..f79b083857e 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -261,6 +261,7 @@ void WM_read_file(bContext *C, char *name, ReportList *reports) /* we didn't succeed, now try to read Blender file */ if (retval== 0) { + int G_f= G.f; ListBase wmbase; /* put aside screens to match with persistant windows later */ @@ -270,6 +271,11 @@ void WM_read_file(bContext *C, char *name, ReportList *reports) retval= BKE_read_file(C, name, NULL, reports); G.save_over = 1; + /* this flag is initialized by the operator but overwritten on read. + * need to re-enable it here else drivers + registered scripts wont work. */ + if(G_f & G_SCRIPT_AUTOEXEC) G.f |= G_SCRIPT_AUTOEXEC; + else G.f &= ~G_SCRIPT_AUTOEXEC; + /* match the read WM with current WM */ wm_window_match_do(C, &wmbase); WM_check(C); /* opens window(s), checks keymaps */ diff --git a/source/creator/creator.c b/source/creator/creator.c index aceef5ebef8..365d358b840 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -1062,7 +1062,7 @@ int main(int argc, char **argv) } else { - if((G.fileflags & G_FILE_AUTOPLAY) && (G.fileflags & G_SCRIPT_AUTOEXEC)) + if((G.fileflags & G_FILE_AUTOPLAY) && (G.f & G_SCRIPT_AUTOEXEC)) WM_init_game(C); else if(!G.file_loaded) |