diff options
author | Jacques Lucke <jacques@blender.org> | 2020-06-05 13:35:03 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-06-05 13:35:20 +0300 |
commit | a1d55bdd530390e58c51abe9707b8d3b0ae3e861 (patch) | |
tree | 64364c40a1c6518ac0120cf8ae5e6b0bdf5c00f5 /source | |
parent | 473aaa389cca1a5062a5867b08fb05276d0b385d (diff) |
Refactor: use new api in write_workspace
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 53e590cf466..73bab07a008 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -3839,17 +3839,17 @@ static void write_cachefile(WriteData *wd, CacheFile *cache_file, const void *id } } -static void write_workspace(WriteData *wd, WorkSpace *workspace, const void *id_address) -{ - writestruct_at_address(wd, ID_WS, WorkSpace, 1, id_address, workspace); - write_iddata(wd, &workspace->id); - writelist(wd, DATA, WorkSpaceLayout, &workspace->layouts); - writelist(wd, DATA, WorkSpaceDataRelation, &workspace->hook_layout_relations); - writelist(wd, DATA, wmOwnerID, &workspace->owner_ids); - writelist(wd, DATA, bToolRef, &workspace->tools); +static void write_workspace(BlendWriter *writer, WorkSpace *workspace, const void *id_address) +{ + BLO_write_id_struct(writer, WorkSpace, id_address, &workspace->id); + write_iddata(writer->wd, &workspace->id); + BLO_write_struct_list(writer, WorkSpaceLayout, &workspace->layouts); + BLO_write_struct_list(writer, WorkSpaceDataRelation, &workspace->hook_layout_relations); + BLO_write_struct_list(writer, wmOwnerID, &workspace->owner_ids); + BLO_write_struct_list(writer, bToolRef, &workspace->tools); LISTBASE_FOREACH (bToolRef *, tref, &workspace->tools) { if (tref->properties) { - IDP_WriteProperty(tref->properties, wd); + IDP_WriteProperty_new_api(tref->properties, writer); } } } @@ -4208,7 +4208,7 @@ static bool write_file_handle(Main *mainvar, write_windowmanager(&writer, (wmWindowManager *)id_buffer, id); break; case ID_WS: - write_workspace(wd, (WorkSpace *)id_buffer, id); + write_workspace(&writer, (WorkSpace *)id_buffer, id); break; case ID_SCR: write_screen(wd, (bScreen *)id_buffer, id); |