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.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index c2c5b42dbb0..ae18f3289e4 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -1404,9 +1404,8 @@ static int ptcache_dynamicpaint_totpoint(void *sd, int UNUSED(cfra))
if (!surface->data) {
return 0;
}
- else {
- return surface->data->total_points;
- }
+
+ return surface->data->total_points;
}
static void ptcache_dynamicpaint_error(void *UNUSED(sd), const char *UNUSED(message))
@@ -2128,7 +2127,7 @@ static int ptcache_path(PTCacheID *pid, char *filename)
return BLI_path_slash_ensure(filename); /* new strlen() */
}
- else if (G.relbase_valid || lib) {
+ if (G.relbase_valid || lib) {
char file[MAX_PTCACHE_PATH]; /* we don't want the dir, only the file */
BLI_split_file_part(blendfilename, file, sizeof(file));
@@ -2521,9 +2520,8 @@ int BKE_ptcache_mem_index_find(PTCacheMem *pm, unsigned int index)
return -1;
}
- else {
- return (index < pm->totpoint ? index : -1);
- }
+
+ return (index < pm->totpoint ? index : -1);
}
void BKE_ptcache_mem_pointers_init(PTCacheMem *pm)
@@ -2627,10 +2625,10 @@ static int ptcache_old_elemsize(PTCacheID *pid)
if (pid->type == PTCACHE_TYPE_SOFTBODY) {
return 6 * sizeof(float);
}
- else if (pid->type == PTCACHE_TYPE_PARTICLES) {
+ if (pid->type == PTCACHE_TYPE_PARTICLES) {
return sizeof(ParticleKey);
}
- else if (pid->type == PTCACHE_TYPE_CLOTH) {
+ if (pid->type == PTCACHE_TYPE_CLOTH) {
return 9 * sizeof(float);
}
@@ -3585,16 +3583,15 @@ int BKE_ptcache_id_exist(PTCacheID *pid, int cfra)
return BLI_exists(filename);
}
- else {
- PTCacheMem *pm = pid->cache->mem_cache.first;
- for (; pm; pm = pm->next) {
- if (pm->frame == cfra) {
- return 1;
- }
+ PTCacheMem *pm = pid->cache->mem_cache.first;
+
+ for (; pm; pm = pm->next) {
+ if (pm->frame == cfra) {
+ return 1;
}
- return 0;
}
+ return 0;
}
void BKE_ptcache_id_time(
PTCacheID *pid, Scene *scene, float cfra, int *startframe, int *endframe, float *timescale)