Fix for layer restoring with duplis, could be wrong sometimes

when there with multiple instances and recursion.
This commit is contained in:
Brecht Van Lommel 2010-07-03 17:19:44 +00:00
parent 37b4e2af77
commit 7a495a12e1

View File

@ -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);
}