From 253de0ed86f273d0032acbbd0b8237a358b35cbd Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 30 Mar 2010 12:01:17 +0000 Subject: * Assign weight from bones in weight paint mode now respects paint face mask, also avoid making vertex groups if they will not be filled. * Add back image pin option in image editor header. * Fix deep shadow not respecting Cast Buffer Shadows option. * Tangent space normal map baking should work again now. * Fix a problem with particle duplis, due to own bugfix for #20350, the problem for that seems to be in dupliverts, not particles. * Fix external multires data link getting lost on exiting editmode. (commits 27776,27777,27830,27840,27841,27862 by Brecht from render25 branch) --- source/blender/render/intern/raytrace/rayobject.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'source/blender/render/intern/raytrace') diff --git a/source/blender/render/intern/raytrace/rayobject.cpp b/source/blender/render/intern/raytrace/rayobject.cpp index 19e41b0f92a..024577e9f1f 100644 --- a/source/blender/render/intern/raytrace/rayobject.cpp +++ b/source/blender/render/intern/raytrace/rayobject.cpp @@ -165,6 +165,11 @@ static inline int vlr_check_intersect_solid(Isect *is, ObjectInstanceRen* obi, V return 0; } +static inline int vlr_check_bake(Isect *is, ObjectInstanceRen* obi, VlakRen *vlr) +{ + return (obi->obr->ob != is->userdata); +} + static inline int rayface_check_cullface(RayFace *face, Isect *is) { float nor[3]; @@ -189,17 +194,24 @@ static int intersect_rayface(RayObject *hit_obj, RayFace *face, Isect *is) if(is->orig.ob == face->ob && is->orig.face == face->face) return 0; - + /* check if we should intersect this face */ if(is->skip & RE_SKIP_VLR_RENDER_CHECK) { if(vlr_check_intersect(is, (ObjectInstanceRen*)face->ob, (VlakRen*)face->face ) == 0) return 0; } - if(is->skip & RE_SKIP_VLR_NON_SOLID_MATERIAL) + else if(is->skip & RE_SKIP_VLR_NON_SOLID_MATERIAL) { + if(vlr_check_intersect(is, (ObjectInstanceRen*)face->ob, (VlakRen*)face->face ) == 0) + return 0; if(vlr_check_intersect_solid(is, (ObjectInstanceRen*)face->ob, (VlakRen*)face->face) == 0) return 0; } + else if(is->skip & RE_SKIP_VLR_BAKE_CHECK) { + if(vlr_check_bake(is, (ObjectInstanceRen*)face->ob, (VlakRen*)face->face ) == 0) + return 0; + } + if(is->skip & RE_SKIP_CULLFACE) { if(rayface_check_cullface(face, is) == 0) -- cgit v1.2.3