diff options
author | Jacques Lucke <jacques@blender.org> | 2020-08-28 17:57:28 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-08-28 17:57:34 +0300 |
commit | 62e2d92aed25fe4da91ed380719ec341b3e0074b (patch) | |
tree | 3356b28b91edd7de43dfb5ad5edbbf56e9a91547 /source/blender/blenloader/intern/readfile.c | |
parent | 5086bdfe0bb69c8841b81f5f867acd5626038622 (diff) |
Blenloader: add api function for accessing packedfile address map
This is needed to move direct_link_packedfile out of readfile.c for T76372.
Diffstat (limited to 'source/blender/blenloader/intern/readfile.c')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index e9dcd5dddae..84cb898a426 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -2631,12 +2631,12 @@ static void direct_link_paint_curve(BlendDataReader *reader, PaintCurve *pc) /** \name Read PackedFile * \{ */ -static PackedFile *direct_link_packedfile(BlendDataReader *reader, PackedFile *oldpf) +static PackedFile *direct_link_packedfile(BlendDataReader *reader, PackedFile *pf) { - PackedFile *pf = newpackedadr(reader->fd, oldpf); + BLO_read_packed_address(reader, &pf); if (pf) { - pf->data = newpackedadr(reader->fd, pf->data); + BLO_read_packed_address(reader, &pf->data); if (pf->data == NULL) { /* We cannot allow a PackedFile with a NULL data field, * the whole code assumes this is not possible. See T70315. */ @@ -11089,6 +11089,11 @@ void *BLO_read_get_new_data_address(BlendDataReader *reader, const void *old_add return newdataadr(reader->fd, old_address); } +void *BLO_read_get_new_packed_address(BlendDataReader *reader, const void *old_address) +{ + return newpackedadr(reader->fd, old_address); +} + ID *BLO_read_get_new_id_address(BlendLibReader *reader, Library *lib, ID *id) { return newlibadr(reader->fd, lib, id); |