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/pointcache.c')
-rw-r--r--source/blender/blenkernel/intern/pointcache.c31
1 files changed, 12 insertions, 19 deletions
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index 2d42406520d..13d0f1adb84 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -2073,10 +2073,9 @@ static int ptcache_path(PTCacheID *pid, char *filename)
file[i - 6] = '\0';
}
- BLI_snprintf(filename,
- MAX_PTCACHE_PATH,
- "//" PTCACHE_PATH "%s",
- file); /* add blend file name to pointcache dir */
+ /* Add blend file name to pointcache dir. */
+ BLI_snprintf(filename, MAX_PTCACHE_PATH, "//" PTCACHE_PATH "%s", file);
+
BLI_path_abs(filename, blendfilename);
return BLI_add_slash(filename); /* new strlen() */
}
@@ -2130,24 +2129,17 @@ static int ptcache_filename(PTCacheID *pid, char *filename, int cfra, short do_p
if (pid->cache->flag & PTCACHE_EXTERNAL) {
if (pid->cache->index >= 0) {
- BLI_snprintf(newname,
- MAX_PTCACHE_FILE,
- "_%06d_%02u%s",
- cfra,
- pid->stack_index,
- ext); /* always 6 chars */
+ /* Always 6 chars. */
+ BLI_snprintf(newname, MAX_PTCACHE_FILE, "_%06d_%02u%s", cfra, pid->stack_index, ext);
}
else {
- BLI_snprintf(newname, MAX_PTCACHE_FILE, "_%06d%s", cfra, ext); /* always 6 chars */
+ /* Always 6 chars. */
+ BLI_snprintf(newname, MAX_PTCACHE_FILE, "_%06d%s", cfra, ext);
}
}
else {
- BLI_snprintf(newname,
- MAX_PTCACHE_FILE,
- "_%06d_%02u%s",
- cfra,
- pid->stack_index,
- ext); /* always 6 chars */
+ /* Always 6 chars. */
+ BLI_snprintf(newname, MAX_PTCACHE_FILE, "_%06d_%02u%s", cfra, pid->stack_index, ext);
}
len += 16;
}
@@ -2178,8 +2170,9 @@ static PTCacheFile *ptcache_file_open(PTCacheID *pid, int mode, int cfra)
fp = BLI_fopen(filename, "rb");
}
else if (mode == PTCACHE_FILE_WRITE) {
- BLI_make_existing_file(
- filename); /* will create the dir if needs be, same as //textures is created */
+ /* Will create the dir if needs be, same as "//textures" is created. */
+ BLI_make_existing_file(filename);
+
fp = BLI_fopen(filename, "wb");
}
else if (mode == PTCACHE_FILE_UPDATE) {