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/blenlib/intern/path_util.c')
-rw-r--r--source/blender/blenlib/intern/path_util.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
index 301b981cdc7..f91c38b8271 100644
--- a/source/blender/blenlib/intern/path_util.c
+++ b/source/blender/blenlib/intern/path_util.c
@@ -1172,6 +1172,12 @@ void BLI_join_dirfile(char *string, const char *dir, const char *file)
}
}
+/* like pythons os.path.basename( ) */
+char *BLI_path_basename(char *path)
+{
+ const char *filename= BLI_last_slash(path);
+ return filename ? filename + 1 : path;
+}
/*
Produce image export path.