diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-12-19 19:36:15 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-12-19 19:36:15 +0300 |
commit | 92b1d3f9461e6d122d6523955cc8124559e5f36e (patch) | |
tree | fd93ba4c70fb8b693aae3784ba1068d0f098e178 /source/blender/windowmanager | |
parent | 62a03ea1b6ef84ac80e40ab092393214c6032b88 (diff) |
2.5: blenloader/ cleaning:
- removed context usage, should not be in this module
- remove G.main usage, now is passed along
- still some globals in use here, goal is to get rid of those too,
so that it's possible to load/save blendfiles without having to
think about some global state.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index e26380ce220..baaba13a5dc 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -847,7 +847,7 @@ void WM_write_file(bContext *C, char *target) BKE_reports_init(&reports, RPT_STORE); - if (BLO_write_file(C, di, writeflags, &reports)) { + if (BLO_write_file(CTX_data_main(C), di, writeflags, &reports)) { strcpy(G.sce, di); G.relbase_valid = 1; strcpy(G.main->name, di); /* is guaranteed current file */ @@ -880,7 +880,7 @@ int WM_write_homefile(bContext *C, wmOperator *op) // XXX error reporting to the user BKE_reports_init(&reports, RPT_PRINT); - BLO_write_file(C, tstr, write_flags, &reports); + BLO_write_file(CTX_data_main(C), tstr, write_flags, &reports); BKE_reports_clear(&reports); return OPERATOR_FINISHED; @@ -898,7 +898,7 @@ void WM_write_autosave(bContext *C) write_flags = G.fileflags & ~(G_FILE_COMPRESS | G_FILE_LOCK | G_FILE_SIGN); BKE_reports_init(&reports, RPT_PRINT); - BLO_write_file(C, tstr, write_flags, &reports); + BLO_write_file(CTX_data_main(C), tstr, write_flags, &reports); BKE_reports_clear(&reports); } |