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/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)
{