diff options
Diffstat (limited to 'source/blender/blenlib/intern/util.c')
-rw-r--r-- | source/blender/blenlib/intern/util.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/util.c b/source/blender/blenlib/intern/util.c index 7c94cc80847..1888da6fbd6 100644 --- a/source/blender/blenlib/intern/util.c +++ b/source/blender/blenlib/intern/util.c @@ -498,6 +498,23 @@ int BLI_findindex(ListBase *listbase, void *vlink) return -1; } +void BLI_duplicatelist(ListBase *list1, ListBase *list2) /* copy from 2 to 1 */ +{ + struct Link *link1, *link2; + + list1->first= list1->last= 0; + + link2= list2->first; + while(link2) { + + link1= MEM_dupallocN(link2); + BLI_addtail(list1, link1); + + link2= link2->next; + } +} + + /*=====================================================================================*/ /* Methods for access array (realloc) */ /*=====================================================================================*/ |