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>2010-01-27 00:41:38 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-01-27 00:41:38 +0300
commit709b1a93e61e5c53f981819949641fb5db01d48e (patch)
tree7e2546594fa1ef5c5034d35b96efb69f301eb45a /source/blender/blenkernel/intern/writeffmpeg.c
parent586af8ca479ad22e59ef3a45694096f8a5e16405 (diff)
support for #'s for output animation paths
This was supported... image: /tmp/foo_###_bar --> /tmp/foo_001_bar.png But not this... anim: /tmp/foo_###_bar --> /tmp/foo_001_250_bar.avi
Diffstat (limited to 'source/blender/blenkernel/intern/writeffmpeg.c')
-rw-r--r--source/blender/blenkernel/intern/writeffmpeg.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
index 920ff255bcc..56924cb0dfa 100644
--- a/source/blender/blenkernel/intern/writeffmpeg.c
+++ b/source/blender/blenkernel/intern/writeffmpeg.c
@@ -772,15 +772,6 @@ static int start_ffmpeg_impl(struct RenderData *rd, int rectx, int recty, Report
/* Get the output filename-- similar to the other output formats */
void filepath_ffmpeg(char* string, RenderData* rd) {
-
- // XXX quick define, solve!
-#define FILE_MAXDIR 256
-#define FILE_MAXFILE 126
-
- char txt[FILE_MAXDIR+FILE_MAXFILE];
- // XXX
-#undef FILE_MAXDIR
-#undef FILE_MAXFILE
char autosplit[20];
const char ** exts = get_file_extensions(rd->ffcodecdata.type);
@@ -810,9 +801,13 @@ void filepath_ffmpeg(char* string, RenderData* rd) {
if (!*fe) {
strcat(string, autosplit);
- sprintf(txt, "%04d_%04d%s", (rd->sfra),
- (rd->efra), *exts);
- strcat(string, txt);
+
+ /* 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, *exts);
} else {
*(string + strlen(string) - strlen(*fe)) = 0;
strcat(string, autosplit);