Remove checks for voxel data when texture type is known.

This commit is contained in:
Sergey Sharybin 2011-09-22 17:52:27 +00:00
parent 2eb1339e3f
commit bf7f88566c
2 changed files with 2 additions and 2 deletions

@ -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) {

@ -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;
}