forked from bartvdbraak/blender
baking normals could crash in rare cases because the intersection data wasn't copied when the lambda was bigger then the previous or initialized.
python baking script had a simple error.
This commit is contained in:
parent
08bc0efecb
commit
e7651c53c3
@ -531,7 +531,7 @@ def bakeToPlane(sce, ob_from, width, height, bakemodes, axis='z', margin=0):
|
||||
# New bake settings
|
||||
rend.bakeClear = True
|
||||
rend.bakeMargin = margin
|
||||
BACKUP_bakeToActive = True
|
||||
rend.bakeToActive = True
|
||||
|
||||
# Assume a mesh
|
||||
me_from = ob_from.getData(mesh=1)
|
||||
|
@ -1033,8 +1033,11 @@ static int testnode(Octree *oc, Isect *is, Node *no, OcVal ocval, RayCheckFunc c
|
||||
isect.ob= ob;
|
||||
isect.face= face;
|
||||
if(RE_ray_face_intersection(&isect, oc->transformfunc, oc->coordsfunc)) {
|
||||
if(isect.labda<is->labda) *is= isect;
|
||||
found= 1;
|
||||
if(isect.labda<is->labda) {
|
||||
*is= isect;
|
||||
found= 1;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
//else rejected++;
|
||||
|
Loading…
Reference in New Issue
Block a user