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/writeavi.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/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");
}
}