diff options
author | Ton Roosendaal <ton@blender.org> | 2004-10-28 21:22:10 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2004-10-28 21:22:10 +0400 |
commit | e2f33871bee0c876f7dc418412b68f7316121d86 (patch) | |
tree | 0918caebda484a86dbc56e9a6771bdb22243efdb /source | |
parent | f7e899a19497e3fd3d9dda5a20d661692bfcecdc (diff) |
Duplicator object which is being deformed now gives deformed duplicates
too. Feat request & discovered by S68. :)
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/anim.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c index 96d6a307ce7..13c5f45b107 100644 --- a/source/blender/blenkernel/intern/anim.c +++ b/source/blender/blenkernel/intern/anim.c @@ -344,7 +344,8 @@ void vertex_duplilist(Scene *sce, Object *par) Base *base; MVert *mvert; Mesh *me; - float vec[3], pvec[3], pmat[4][4], mat[3][3], tmat[4][4]; + DispList *dl; + float *extverts=NULL, vec[3], pvec[3], pmat[4][4], mat[3][3], tmat[4][4]; float *q2; int lay, totvert, a; @@ -354,6 +355,9 @@ void vertex_duplilist(Scene *sce, Object *par) lay= G.scene->lay; + dl= find_displist(&par->disp, DL_VERTS); + if(dl) extverts= dl->verts; + base= sce->base.first; while(base) { @@ -378,7 +382,13 @@ void vertex_duplilist(Scene *sce, Object *par) for(a=0; a<totvert; a++, mvert++) { /* calc the extra offset for children (wrt. centre parent) */ - VECCOPY(vec, mvert->co); + if(extverts) { + VECCOPY(vec, extverts+3*a); + } + else { + VECCOPY(vec, mvert->co); + } + Mat4MulVecfl(pmat, vec); VecSubf(vec, vec, pmat[3]); VecAddf(vec, vec, ob->obmat[3]); |