=trunk=
[blender-staging.git] / source / blender / render / intern / source / volume_precache.c
index e75ee6ed469213b992f304a27a6b120267eb2b38..fc3280db771cfe1e3168b1a43269975c7578421e 100644 (file)
@@ -507,6 +507,9 @@ static void *vol_precache_part(void *data)
                        for (x=pa->minx; x < pa->maxx; x++) {
                                co[0] = pa->bbmin[0] + (pa->voxel[0] * (x + 0.5f));
                                
+                               if (pa->re->test_break && pa->re->test_break(pa->re->tbh))
+                                       break;
+                               
                                /* convert from world->camera space for shading */
                                mul_v3_m4v3(cco, pa->viewmat, co);
                                
@@ -604,6 +607,7 @@ static void precache_init_parts(Render *re, RayObject *tree, ShadeInput *shi, Ob
                                pa->done = 0;
                                pa->working = 0;
                                
+                               pa->re = re;
                                pa->num = i;
                                pa->tree = tree;
                                pa->shi = shi;