From bdef14bf81ef896ea0774df752fd606d763632b3 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Mon, 9 Jan 2006 15:56:47 +0000 Subject: [PATCH] Orange fix: Lamp ipos were also not duplicated when indicated... old stuff here! :) --- source/blender/src/editobject.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c index dcf2769c8d5..abc4f826e24 100644 --- a/source/blender/src/editobject.c +++ b/source/blender/src/editobject.c @@ -4455,7 +4455,24 @@ void adduplicate(int mode, int dupflag) } } - /* ipos */ + /* lamps */ + if( dupflag & USER_DUP_IPO) { + Lamp *la= G.main->lamp.first; + while(la) { + if(la->id.newid) { + Lamp *lan= (Lamp *)la->id.newid; + id= (ID *)lan->ipo; + if(id) { + ID_NEW_US(lan->ipo) + else lan->ipo= copy_ipo(lan->ipo); + id->us--; + } + } + la= la->id.next; + } + } + +/* ipos */ ipo= G.main->ipo.first; while(ipo) { if(ipo->id.lib==NULL && ipo->id.newid) {