Remove redundant file exists checks
This commit is contained in:
@@ -1886,9 +1886,6 @@ static PTCacheFile *ptcache_file_open(PTCacheID *pid, int mode, int cfra)
|
|||||||
ptcache_filename(pid, filename, cfra, 1, 1);
|
ptcache_filename(pid, filename, cfra, 1, 1);
|
||||||
|
|
||||||
if (mode==PTCACHE_FILE_READ) {
|
if (mode==PTCACHE_FILE_READ) {
|
||||||
if (!BLI_exists(filename)) {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
fp = BLI_fopen(filename, "rb");
|
fp = BLI_fopen(filename, "rb");
|
||||||
}
|
}
|
||||||
else if (mode==PTCACHE_FILE_WRITE) {
|
else if (mode==PTCACHE_FILE_WRITE) {
|
||||||
|
@@ -426,7 +426,6 @@ void cache_voxeldata(Tex *tex, int scene_frame)
|
|||||||
return;
|
return;
|
||||||
case TEX_VD_BLENDERVOXEL:
|
case TEX_VD_BLENDERVOXEL:
|
||||||
BLI_path_abs(path, G.main->name);
|
BLI_path_abs(path, G.main->name);
|
||||||
if (!BLI_exists(path)) return;
|
|
||||||
fp = BLI_fopen(path, "rb");
|
fp = BLI_fopen(path, "rb");
|
||||||
if (!fp) return;
|
if (!fp) return;
|
||||||
|
|
||||||
@@ -437,7 +436,6 @@ void cache_voxeldata(Tex *tex, int scene_frame)
|
|||||||
return;
|
return;
|
||||||
case TEX_VD_RAW_8BIT:
|
case TEX_VD_RAW_8BIT:
|
||||||
BLI_path_abs(path, G.main->name);
|
BLI_path_abs(path, G.main->name);
|
||||||
if (!BLI_exists(path)) return;
|
|
||||||
fp = BLI_fopen(path, "rb");
|
fp = BLI_fopen(path, "rb");
|
||||||
if (!fp) return;
|
if (!fp) return;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user