Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2008-12-19 19:36:15 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2008-12-19 19:36:15 +0300
commit92b1d3f9461e6d122d6523955cc8124559e5f36e (patch)
treefd93ba4c70fb8b693aae3784ba1068d0f098e178 /source/blender/blenkernel/intern/blender.c
parent62a03ea1b6ef84ac80e40ab092393214c6032b88 (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/blenkernel/intern/blender.c')
-rw-r--r--source/blender/blenkernel/intern/blender.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c
index ed2b8238dae..2ab12c12ab8 100644
--- a/source/blender/blenkernel/intern/blender.c
+++ b/source/blender/blenkernel/intern/blender.c
@@ -486,7 +486,7 @@ int BKE_read_file_from_memfile(bContext *C, MemFile *memfile)
BKE_reports_init(&reports, RPT_STORE);
- bfd= BLO_read_from_memfile(G.sce, memfile, &reports);
+ bfd= BLO_read_from_memfile(CTX_data_main(C), G.sce, memfile, &reports);
if (bfd) {
setup_app_data(C, bfd, "<memory1>");
} else {
@@ -594,7 +594,7 @@ void BKE_write_undo(bContext *C, char *name)
BLI_make_file_string("/", tstr, btempdir, numstr);
BKE_reports_init(&reports, 0);
- success= BLO_write_file(C, tstr, G.fileflags, &reports);
+ success= BLO_write_file(CTX_data_main(C), tstr, G.fileflags, &reports);
BKE_reports_clear(&reports);
strcpy(curundo->str, tstr);
@@ -607,7 +607,7 @@ void BKE_write_undo(bContext *C, char *name)
memused= MEM_get_memory_in_use();
BKE_reports_init(&reports, 0);
- success= BLO_write_file_mem(C, prevfile, &curundo->memfile, G.fileflags, &reports);
+ success= BLO_write_file_mem(CTX_data_main(C), prevfile, &curundo->memfile, G.fileflags, &reports);
BKE_reports_clear(&reports);
curundo->undosize= MEM_get_memory_in_use() - memused;
}