Orange bugfix:
On duplicating an object with material ipos that has drivers, the new ipos (if material and ipos were copied) didn't get the correct pointer to the new driver object (if that was copied!)
This commit is contained in:
@@ -4424,20 +4424,6 @@ void adduplicate(int mode, int dupflag)
|
||||
base= base->next;
|
||||
}
|
||||
|
||||
/* ipos */
|
||||
ipo= G.main->ipo.first;
|
||||
while(ipo) {
|
||||
if(ipo->id.lib==NULL && ipo->id.newid) {
|
||||
IpoCurve *icu;
|
||||
for(icu= ipo->curve.first; icu; icu= icu->next) {
|
||||
if(icu->driver) {
|
||||
ID_NEW(icu->driver->ob);
|
||||
}
|
||||
}
|
||||
}
|
||||
ipo= ipo->id.next;
|
||||
}
|
||||
|
||||
/* materials */
|
||||
if( dupflag & USER_DUP_MAT) {
|
||||
mao= G.main->mat.first;
|
||||
@@ -4469,6 +4455,23 @@ void adduplicate(int mode, int dupflag)
|
||||
}
|
||||
}
|
||||
|
||||
/* ipos */
|
||||
ipo= G.main->ipo.first;
|
||||
while(ipo) {
|
||||
if(ipo->id.lib==NULL && ipo->id.newid) {
|
||||
Ipo *ipon= (Ipo *)ipo->id.newid;
|
||||
IpoCurve *icu;
|
||||
for(icu= ipon->curve.first; icu; icu= icu->next) {
|
||||
if(icu->driver) {
|
||||
ID_NEW(icu->driver->ob);
|
||||
}
|
||||
}
|
||||
}
|
||||
ipo= ipo->id.next;
|
||||
}
|
||||
|
||||
|
||||
|
||||
DAG_scene_sort(G.scene);
|
||||
DAG_scene_flush_update(G.scene, screen_view3d_layers());
|
||||
set_sca_new_poins();
|
||||
|
||||
Reference in New Issue
Block a user