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:
authorCampbell Barton <ideasman42@gmail.com>2015-10-06 11:49:58 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-10-06 11:49:58 +0300
commit359d1bd580c138c2b76b2afaed2a9069d5676707 (patch)
tree85d1403f1f4a08862387ff2eee9f9a917981d126 /source/blender/blenkernel/intern/movieclip.c
parent9f15bcb218ef32d5f15e1e13235d2d7fa667e04a (diff)
Cleanup: use BLI_path_basename
Diffstat (limited to 'source/blender/blenkernel/intern/movieclip.c')
-rw-r--r--source/blender/blenkernel/intern/movieclip.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c
index ed92c942b57..a23e9400b82 100644
--- a/source/blender/blenkernel/intern/movieclip.c
+++ b/source/blender/blenkernel/intern/movieclip.c
@@ -603,8 +603,7 @@ static void detect_clip_source(MovieClip *clip)
MovieClip *BKE_movieclip_file_add(Main *bmain, const char *name)
{
MovieClip *clip;
- int file, len;
- const char *libname;
+ int file;
char str[FILE_MAX];
BLI_strncpy(str, name, sizeof(str));
@@ -619,13 +618,7 @@ MovieClip *BKE_movieclip_file_add(Main *bmain, const char *name)
/* ** add new movieclip ** */
/* create a short library name */
- len = strlen(name);
-
- while (len > 0 && name[len - 1] != '/' && name[len - 1] != '\\')
- len--;
- libname = name + len;
-
- clip = movieclip_alloc(bmain, libname);
+ clip = movieclip_alloc(bmain, BLI_path_basename(name));
BLI_strncpy(clip->name, name, sizeof(clip->name));
detect_clip_source(clip);