Bug fix: Changing volume texture properties after render crashes (reported by mats...
authorJanne Karhu <jhkarh@gmail.com>
Wed, 16 Mar 2011 14:21:35 +0000 (14:21 +0000)
committerJanne Karhu <jhkarh@gmail.com>
Wed, 16 Mar 2011 14:21:35 +0000 (14:21 +0000)
* Preview render copied the volume texture, but not the actual volumedata, so normal render and preview render clashed.

source/blender/blenkernel/intern/texture.c

index 5199bbd0f063e250cb4666cb2b445ee160f6f5b4..1d5840765bcd8e29c891fdf3bf83576148f1d3e4 100644 (file)
@@ -790,7 +790,11 @@ Tex *localize_texture(Tex *tex)
        if(texn->coba) texn->coba= MEM_dupallocN(texn->coba);
        if(texn->env) texn->env= BKE_copy_envmap(texn->env);
        if(texn->pd) texn->pd= MEM_dupallocN(texn->pd);
-       if(texn->vd) texn->vd= MEM_dupallocN(texn->vd);
+       if(texn->vd) {
+               texn->vd= MEM_dupallocN(texn->vd);
+               if(texn->vd->dataset)
+                       texn->vd->dataset= MEM_dupallocN(texn->vd->dataset);
+       }
        
        texn->preview = NULL;