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>2008-04-11 19:47:21 +0400
committerCampbell Barton <ideasman42@gmail.com>2008-04-11 19:47:21 +0400
commitf057a38e985fe4db1c57f48864624985a31c9235 (patch)
treec9383d4b2727434e3971096ac8ea4101a84ac89b /source/blender/blenkernel
parenta02937d86ccb30f0cc08ef451634595fb45726c6 (diff)
Changed BLI_convertstringcode to replace any number of hashes with the frame number.
somefile_##.png -> somefile_01.png somefile_########-image.png -> somefile_00000001-image.png Before, A hash at the end of the string would be replaced by a number with 4 characters. This is still default if no #'s are in the string, so nothing has changed. To use this function from the python api use scene.render.getFrameFilename()
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/DerivedMesh.c4
-rw-r--r--source/blender/blenkernel/intern/effect.c2
-rw-r--r--source/blender/blenkernel/intern/image.c18
-rw-r--r--source/blender/blenkernel/intern/particle_system.c2
4 files changed, 9 insertions, 17 deletions
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c
index 7624ca04984..464f851b683 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.c
+++ b/source/blender/blenkernel/intern/DerivedMesh.c
@@ -3312,9 +3312,9 @@ void loadFluidsimMesh(Object *srcob, int useRenderParams)
srcob->data = srcob->fluidsimSettings->orgMesh;
return;
} else if(displaymode==2) {
- strcat(targetDir,"fluidsurface_preview_#");
+ strcat(targetDir,"fluidsurface_preview_####");
} else { // 3
- strcat(targetDir,"fluidsurface_final_#");
+ strcat(targetDir,"fluidsurface_final_####");
}
BLI_convertstringcode(targetDir, G.sce, curFrame); // fixed #frame-no
strcpy(targetFile,targetDir);
diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c
index bb228a67381..f07326f995f 100644
--- a/source/blender/blenkernel/intern/effect.c
+++ b/source/blender/blenkernel/intern/effect.c
@@ -1711,7 +1711,7 @@ void build_particle_system(Object *ob)
if( (1) && (ob->fluidsimFlag & OB_FLUIDSIM_ENABLE) && // broken, disabled for now!
(ob->fluidsimSettings) &&
(ob->fluidsimSettings->type == OB_FLUIDSIM_PARTICLE)) {
- char *suffix = "fluidsurface_particles_#";
+ char *suffix = "fluidsurface_particles_####";
char *suffix2 = ".gz";
char filename[256];
char debugStrBuffer[256];
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 195f4aa4bbf..3f885017f95 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -1236,24 +1236,16 @@ int BKE_write_ibuf(ImBuf *ibuf, char *name, int imtype, int subimtype, int quali
void BKE_makepicstring(char *string, char *base, int frame, int imtype)
{
- short i, len, digits= 4; /* digits in G.scene? */
- char num[10];
-
if (string==NULL) return;
BLI_strncpy(string, base, FILE_MAX - 10); /* weak assumption */
+
+ /* if we dont have any #'s to insert numbers into, use 4 numbers by default */
+ if (strchr(string, '#')==NULL)
+ strcat(string, "####"); /* 4 numbers */
+
BLI_convertstringcode(string, G.sce, frame);
- len= strlen(string);
-
- i= digits - sprintf(num, "%d", frame);
- for(; i>0; i--){
- string[len]= '0';
- len++;
- }
- string[len]= 0;
- strcat(string, num);
-
if(G.scene->r.scemode & R_EXTENSION)
BKE_add_image_extension(string, imtype);
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index ebde51d4c3d..602c13008df 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -4552,7 +4552,7 @@ static void particles_fluid_step(Object *ob, ParticleSystem *psys, int cfra)
(ob->fluidsimSettings)) {
ParticleSettings *part = psys->part;
ParticleData *pa=0;
- char *suffix = "fluidsurface_particles_#";
+ char *suffix = "fluidsurface_particles_####";
char *suffix2 = ".gz";
char filename[256];
char debugStrBuffer[256];