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/writeavi.c')
-rw-r--r--source/blender/blenkernel/intern/writeavi.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/writeavi.c b/source/blender/blenkernel/intern/writeavi.c
index 9ff5ee00bfb..0d057525f38 100644
--- a/source/blender/blenkernel/intern/writeavi.c
+++ b/source/blender/blenkernel/intern/writeavi.c
@@ -121,18 +121,20 @@ static int sframe;
static void filepath_avi (char *string, RenderData *rd)
{
- char txt[64];
-
- if (string==0) return;
+ if (string==NULL) return;
strcpy(string, rd->pic);
BLI_convertstringcode(string, G.sce);
BLI_make_existing_file(string);
- if (BLI_strcasecmp(string + strlen(string) - 4, ".avi")) {
- sprintf(txt, "%04d_%04d.avi", (rd->sfra) , (rd->efra) );
- strcat(string, txt);
+ if (!BLI_testextensie(string, ".avi")) {
+ /* if we dont have any #'s to insert numbers into, use 4 numbers by default */
+ if (strchr(string, '#')==NULL)
+ strcat(string, "####"); /* 4 numbers */
+
+ BLI_convertstringframe_range(string, rd->sfra, rd->efra);
+ strcat(string, ".avi");
}
}