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:
authorBastien Montagne <montagne29@wanadoo.fr>2018-06-13 17:29:12 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-06-13 17:29:12 +0300
commitf61c30f804e36bf00e7124514f02bbee42e0197d (patch)
tree0f947a35c7814cb15ce7cfa1b5a2c1eb01d910d7 /source/blender/blenloader/intern
parent5ff1d845ead05ac6ef952782ebd3ed98277ef6c5 (diff)
Cleanup: get rid of last G.main in BMesh code.
Diffstat (limited to 'source/blender/blenloader/intern')
-rw-r--r--source/blender/blenloader/intern/readfile.c21
-rw-r--r--source/blender/blenloader/intern/writefile.c4
2 files changed, 13 insertions, 12 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.
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 288d42f6398..88e6cbc8d24 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -4140,7 +4140,7 @@ bool BLO_write_file(
if (G.relbase_valid) {
/* blend may not have been saved before. Tn this case
* we should not have any relative paths, but if there
- * is somehow, an invalid or empty G.main->name it will
+ * is somehow, an invalid or empty G_MAIN->name it will
* print an error, don't try make the absolute in this case. */
BKE_bpath_absolute_convert(mainvar, BKE_main_blendfile_path_from_global(), NULL);
}
@@ -4148,7 +4148,7 @@ bool BLO_write_file(
}
if (write_flags & G_FILE_RELATIVE_REMAP) {
- /* note, making relative to something OTHER then G.main->name */
+ /* note, making relative to something OTHER then G_MAIN->name */
BKE_bpath_relative_convert(mainvar, filepath, NULL);
}