diff options
author | Ton Roosendaal <ton@blender.org> | 2004-10-14 12:52:12 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2004-10-14 12:52:12 +0400 |
commit | 652427c856be3995ae692c4b6aaeddb1794a58be (patch) | |
tree | 75b3366b077bf6a20c39e0e0e0cd96bfb523694b /source/blender/src/editobject.c | |
parent | ea114bbc708b40fda11ceb7235c3c6add9deb3a1 (diff) |
Three fixes;
- bug #1307; copy full scene didn't update links in constraints
(was an oldie bug!)
- also fixed same for Hooks, which even't didn't duplicate yet
- HOME in outliner (show hierarchy) now only does current scene
Diffstat (limited to 'source/blender/src/editobject.c')
-rw-r--r-- | source/blender/src/editobject.c | 45 |
1 files changed, 25 insertions, 20 deletions
diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c index 0746d0288ee..6aa74bf8ac9 100644 --- a/source/blender/src/editobject.c +++ b/source/blender/src/editobject.c @@ -6706,6 +6706,21 @@ void single_object_users(int flag) if(ob->id.lib==0) { if( (base->flag & flag)==flag) { + relink_constraints(&base->object->constraints); + bPoseChannel *chan; + if (base->object->pose){ + for (chan = base->object->pose->chanbase.first; chan; chan=chan->next){ + relink_constraints(&chan->constraints); + } + } + if(base->object->hooks.first) { + ObHook *hook= base->object->hooks.first; + while(hook) { + ID_NEW(hook->parent); + hook= hook->next; + } + } + ID_NEW(ob->parent); ID_NEW(ob->track); @@ -7247,8 +7262,6 @@ void adduplicate(float *dtrans) { Base *base, *basen; Object *ob, *obn; - Ika *ika; - Deform *def; Material ***matarar, *ma, *mao; ID *id; bConstraintChannel *chan; @@ -7436,30 +7449,22 @@ void adduplicate(float *dtrans) while(base) { if TESTBASELIB(base) { - { + if (base->object->pose){ bPoseChannel *chan; - - relink_constraints(&base->object->constraints); - if (base->object->pose){ - for (chan = base->object->pose->chanbase.first; chan; chan=chan->next){ - relink_constraints(&chan->constraints); - } + for (chan = base->object->pose->chanbase.first; chan; chan=chan->next){ + relink_constraints(&chan->constraints); + } + } + if(base->object->hooks.first) { + ObHook *hook= base->object->hooks.first; + while(hook) { + ID_NEW(hook->parent); + hook= hook->next; } } ID_NEW(base->object->parent); ID_NEW(base->object->track); - if(base->object->type==OB_IKA) { - ika= base->object->data; - ID_NEW(ika->parent); - - a= ika->totdef; - def= ika->def; - while(a--) { - ID_NEW(def->ob); - def++; - } - } } base= base->next; } |