Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2006-02-02 22:54:42 +0300
committerTon Roosendaal <ton@blender.org>2006-02-02 22:54:42 +0300
commit15eebf614f8e7ba8d2632032cfa22453e0ad7def (patch)
tree50689c7b0b5e189ac15a58bbed82f4a761d9c16a /source
parent21e7a5f142b47f6eff3b9d221bae27391971bb3d (diff)
Duplicator bugfix: particle duplicators were not restoring the matrix for
the duplicated object correctly. This appeared like object disappeared. Note; to see this fix work on older files, you have to invoke a depsgraph call, like by grabbing the duplicated object.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/anim.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c
index 8ff5ca1d12b..afd56ffaabd 100644
--- a/source/blender/blenkernel/intern/anim.c
+++ b/source/blender/blenkernel/intern/anim.c
@@ -497,7 +497,10 @@ static void particle_duplilist(ListBase *lb, Scene *sce, Object *par, PartEff *p
}
VECCOPY(ob->obmat[3], vec);
- new_dupli_object(lb, ob, ob->obmat, par->lay);
+ /* put object back in original state, so it cam be restored OK */
+ Mat4CpyMat4(tmat, ob->obmat);
+ Mat4CpyMat4(ob->obmat, copyob.obmat);
+ new_dupli_object(lb, ob, tmat, par->lay);
}
}
else { // non static particles
@@ -523,7 +526,11 @@ static void particle_duplilist(ListBase *lb, Scene *sce, Object *par, PartEff *p
}
VECCOPY(ob->obmat[3], vec);
- new_dupli_object(lb, ob, ob->obmat, par->lay);
+
+ /* put object back in original state, so it cam be restored OK */
+ Mat4CpyMat4(tmat, ob->obmat);
+ Mat4CpyMat4(ob->obmat, copyob.obmat);
+ new_dupli_object(lb, ob, tmat, par->lay);
}
}
/* temp copy, to have ipos etc to work OK */