patch [#34103] path_util_split_dirstring.patch, path_util_split_dirstring_2.patch...
[blender.git] / source / blender / blenkernel / intern / texture.c
index 2ae76ea6d1cc700792fe5f84f9d6550f637eafa6..665e3cb494146dcb2b8f3529bddc0cf667d66ca3 100644 (file)
@@ -911,8 +911,7 @@ void autotexname(Tex *tex)
                else if (tex->type == TEX_IMAGE) {
                        ima = tex->ima;
                        if (ima) {
-                               BLI_strncpy(di, ima->name, sizeof(di));
-                               BLI_splitdirstring(di, fi);
+                               BLI_split_file_part(ima->name, fi, sizeof(fi));
                                strcpy(di, "I.");
                                strcat(di, fi);
                                new_id(&bmain->tex, (ID *)tex, di);