[#19029] Baking selected to active with nearby dupliframes objects crashes blender
authorCampbell Barton <ideasman42@gmail.com>
Mon, 24 Aug 2009 10:16:39 +0000 (10:16 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 24 Aug 2009 10:16:39 +0000 (10:16 +0000)
from Jorge Hodge (watcom)

Confirmed the crash. baking didn't account for RE_RAY_TRANSFORM_OFFS in R.objectinstance.

source/blender/render/intern/source/rendercore.c

index 2793e23..6b6a736 100644 (file)
@@ -2241,7 +2241,7 @@ static int bake_check_intersect(Isect *is, int ob, RayFace *face)
        /* no direction checking for now, doesn't always improve the result
         * (INPR(shi->facenor, bs->dir) > 0.0f); */
 
-       return (R.objectinstance[ob].obr->ob != bs->actob);
+       return (R.objectinstance[ob & ~RE_RAY_TRANSFORM_OFFS].obr->ob != bs->actob);
 }
 
 static int bake_intersect_tree(RayTree* raytree, Isect* isect, float *start, float *dir, float sign, float *hitco, float *dist)