diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-09-22 21:52:27 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-09-22 21:52:27 +0400 |
commit | bf7f88566cd6a23d2b180995210d20d433605555 (patch) | |
tree | 8cb6193ea057d1fc595d584fb2539515d93f7b78 /source/blender | |
parent | 2eb1339e3f53d83f960bf5c07341d91a806bbcc3 (diff) |
Remove checks for voxel data when texture type is known.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 2 | ||||
-rw-r--r-- | source/blender/render/intern/source/voxeldata.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index e92ec5dbe6e..cbc312a75e9 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -1787,7 +1787,7 @@ static void write_textures(WriteData *wd, ListBase *idbase) if(tex->pd->coba) writestruct(wd, DATA, "ColorBand", 1, tex->pd->coba); if(tex->pd->falloff_curve) write_curvemapping(wd, tex->pd->falloff_curve); } - if(tex->type == TEX_VOXELDATA && tex->vd) writestruct(wd, DATA, "VoxelData", 1, tex->vd); + if(tex->type == TEX_VOXELDATA) writestruct(wd, DATA, "VoxelData", 1, tex->vd); /* nodetree is integral part of texture, no libdata */ if(tex->nodetree) { diff --git a/source/blender/render/intern/source/voxeldata.c b/source/blender/render/intern/source/voxeldata.c index b63ece80119..464cbf72326 100644 --- a/source/blender/render/intern/source/voxeldata.c +++ b/source/blender/render/intern/source/voxeldata.c @@ -389,7 +389,7 @@ int voxeldatatex(struct Tex *tex, const float texvec[3], struct TexResult *texre VoxelData *vd = tex->vd; float co[3], offset[3] = {0.5, 0.5, 0.5}; - if ((!vd) || (vd->dataset==NULL)) { + if (vd->dataset==NULL) { texres->tin = 0.0f; return 0; } |