diff options
author | Ton Roosendaal <ton@blender.org> | 2006-09-16 14:46:53 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-09-16 14:46:53 +0400 |
commit | b150f25c36eba0091a3159fed5eab265634a3f4c (patch) | |
tree | a3589e9db67c4b5a7ed72aad8ab24ea2c91776e4 /source/blender/blenkernel/intern/object.c | |
parent | c7d39e1a06bef22cb972f84808836dea0ff1e79f (diff) |
Enabling vertex-parenting to a Lattice didn't take deformed Lattices in
account...
Diffstat (limited to 'source/blender/blenkernel/intern/object.c')
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 0772f17d710..83db5c5e39f 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -1293,6 +1293,8 @@ static void give_parvert(Object *par, int nr, float *vec) else if(par->type==OB_LATTICE) { Lattice *latt= par->data; BPoint *bp; + DispList *dl = find_displist(&par->disp, DL_VERTS); + float *co = dl?dl->verts:NULL; if(par==G.obedit) latt= editLatt; @@ -1301,11 +1303,15 @@ static void give_parvert(Object *par, int nr, float *vec) bp= latt->def; while(a--) { if(count==nr) { - memcpy(vec, bp->vec, 12); + if(co) + memcpy(vec, co, 3*sizeof(float)); + else + memcpy(vec, bp->vec, 3*sizeof(float)); break; } count++; - bp++; + if(co) co+= 3; + else bp++; } } } |