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-09 16:18:21 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-06-09 16:18:21 +0300
commit70f8eaf1b769c402ec61d86f25237d6b64186861 (patch)
tree035d1da0dc7ca1ff1cfefad013181dc0ce3084ed /source/blender/blenkernel/intern/modifier.c
parent2ca8230f67db3d6c4693d0a2e0997dfd5de43091 (diff)
parent638de722775fc43c3543a30aaa888372fe93fe98 (diff)
Merge branch 'master' into blender2.8
Conflicts: source/blender/editors/space_view3d/drawobject.c
Diffstat (limited to 'source/blender/blenkernel/intern/modifier.c')
-rw-r--r--source/blender/blenkernel/intern/modifier.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c
index bd9cd684548..0b904caf375 100644
--- a/source/blender/blenkernel/intern/modifier.c
+++ b/source/blender/blenkernel/intern/modifier.c
@@ -809,6 +809,18 @@ const char *modifier_path_relbase(Main *bmain, Object *ob)
}
}
+const char *modifier_path_relbase_from_global(Object *ob)
+{
+ if (G.relbase_valid || ID_IS_LINKED(ob)) {
+ return ID_BLEND_PATH_FROM_GLOBAL(&ob->id);
+ }
+ else {
+ /* last resort, better then using "" which resolves to the current
+ * working directory */
+ return BKE_tempdir_session();
+ }
+}
+
/* initializes the path with either */
void modifier_path_init(char *path, int path_maxlen, const char *name)
{