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:
Diffstat (limited to 'source/blender/blenloader/intern/readfile.c')
-rw-r--r--source/blender/blenloader/intern/readfile.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index d172dd685eb..937853463a2 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -4501,12 +4501,12 @@ static void lib_link_mesh(FileData *fd, Main *main)
if (me->totface && !me->totpoly) {
/* temporarily switch main so that reading from
* external CustomData works */
- Main *gmain = G.main;
- G.main = main;
+ Main *gmain = G_MAIN;
+ G_MAIN = main;
BKE_mesh_do_versions_convert_mfaces_to_mpolys(me);
- G.main = gmain;
+ G_MAIN = gmain;
}
/*
@@ -8447,17 +8447,18 @@ static void convert_tface_mt(FileData *fd, Main *main)
/* this is a delayed do_version (so it can create new materials) */
if (main->versionfile < 259 || (main->versionfile == 259 && main->subversionfile < 3)) {
- //XXX hack, material.c uses G.main all over the place, instead of main
- // temporarily set G.main to the current main
- gmain = G.main;
- G.main = main;
+ //XXX hack, material.c uses G_MAIN all over the place, instead of main
+ /* XXX NOTE: this hack should not beneeded anymore... but will check/remove this in 2.8 code rather */
+ // temporarily set G_MAIN to the current main
+ gmain = G_MAIN;
+ G_MAIN = main;
if (!(do_version_tface(main))) {
BKE_report(fd->reports, RPT_WARNING, "Texface conversion problem (see error in console)");
}
- //XXX hack, material.c uses G.main allover the place, instead of main
- G.main = gmain;
+ //XXX hack, material.c uses G_MAIN allover the place, instead of main
+ G_MAIN = gmain;
}
}
@@ -10324,7 +10325,7 @@ static Main *library_link_begin(Main *mainvar, FileData **fd, const char *filepa
/**
* Initialize the BlendHandle for linking library data.
*
- * \param mainvar The current main database, e.g. G.main or CTX_data_main(C).
+ * \param mainvar The current main database, e.g. G_MAIN or CTX_data_main(C).
* \param bh A blender file handle as returned by \a BLO_blendhandle_from_file or \a BLO_blendhandle_from_memory.
* \param filepath Used for relative linking, copied to the \a lib->name.
* \return the library Main, to be passed to \a BLO_library_append_named_part as \a mainl.