diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-05-31 16:24:30 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-05-31 16:24:30 +0300 |
commit | b53d358261a26652d510d62565f1b43035a55e67 (patch) | |
tree | b952fa8fa04aee19d7ae6ebd6555e2220d2dbe31 /source/blender/blenkernel/intern/modifier.c | |
parent | 28369f725c10f167e504f0acd695a0f9d3c2a709 (diff) |
Cleanup: remove G.main from BKE modifier.
Diffstat (limited to 'source/blender/blenkernel/intern/modifier.c')
-rw-r--r-- | source/blender/blenkernel/intern/modifier.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index 19c0a083703..50923901a36 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -58,6 +58,7 @@ #include "BLT_translation.h" #include "BKE_appdir.h" +#include "BKE_global.h" #include "BKE_key.h" #include "BKE_library.h" #include "BKE_library_query.h" @@ -65,7 +66,6 @@ #include "BKE_DerivedMesh.h" /* may move these, only for modifier_path_relbase */ -#include "BKE_global.h" /* ugh, G.main->name only */ #include "BKE_main.h" /* end */ @@ -765,10 +765,10 @@ void test_object_modifiers(Object *ob) * - else if the file has been saved return the blend file path. * - else if the file isn't saved and the ID isn't from a library, return the temp dir. */ -const char *modifier_path_relbase(Object *ob) +const char *modifier_path_relbase(Main *bmain, Object *ob) { if (G.relbase_valid || ID_IS_LINKED(ob)) { - return ID_BLEND_PATH(G.main, &ob->id); + return ID_BLEND_PATH(bmain, &ob->id); } else { /* last resort, better then using "" which resolves to the current |