diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-07-03 21:19:44 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-07-03 21:19:44 +0400 |
commit | 7a495a12e1c367f8f1dbe14586c3798db5982171 (patch) | |
tree | 4b98c81759fd0c224e9121ee76319c6823bc892f /source/blender/blenkernel/intern | |
parent | 37b4e2af7714fc98fb2a7f274bb1197b5226bb4b (diff) |
Fix for layer restoring with duplis, could be wrong sometimes
when there with multiple instances and recursion.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/anim.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c index 6044cfa7692..fa0ddc5f1d3 100644 --- a/source/blender/blenkernel/intern/anim.c +++ b/source/blender/blenkernel/intern/anim.c @@ -1532,7 +1532,10 @@ void free_object_duplilist(ListBase *lb) { DupliObject *dob; - for(dob= lb->first; dob; dob= dob->next) { + /* loop in reverse order, if object is instanced multiple times + the original layer may not really be original otherwise, proper + solution is more complicated */ + for(dob= lb->last; dob; dob= dob->prev) { dob->ob->lay= dob->origlay; copy_m4_m4(dob->ob->obmat, dob->omat); } |