diff options
author | Jacques Lucke <jacques@blender.org> | 2020-09-11 12:39:06 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-09-11 12:39:06 +0300 |
commit | 12693b807ec0f3daf16f05ae621c7aec98ce2c61 (patch) | |
tree | cc14a6d79042fbf5f4ecd0c7ee000472e6961321 /source/blender/blenloader/intern/writefile.c | |
parent | 1025b5b924ce7a25b4db9b63f43cd2bba55fbede (diff) |
Refactor: move Volume .blend I/O to IDTypeInfo callbacks
Diffstat (limited to 'source/blender/blenloader/intern/writefile.c')
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 386cdfc50eb..8390838163d 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -2104,26 +2104,6 @@ static void write_workspace(BlendWriter *writer, WorkSpace *workspace, const voi } } -static void write_volume(BlendWriter *writer, Volume *volume, const void *id_address) -{ - if (volume->id.us > 0 || BLO_write_is_undo(writer)) { - /* Clean up, important in undo case to reduce false detection of changed datablocks. */ - volume->runtime.grids = 0; - - /* write LibData */ - BLO_write_id_struct(writer, Volume, id_address, &volume->id); - BKE_id_blend_write(writer, &volume->id); - - /* direct data */ - BLO_write_pointer_array(writer, volume->totcol, volume->mat); - if (volume->adt) { - BKE_animdata_blend_write(writer, volume->adt); - } - - BKE_packedfile_blend_write(writer, volume->packedfile); - } -} - static void write_simulation(BlendWriter *writer, Simulation *simulation, const void *id_address) { if (simulation->id.us > 0 || BLO_write_is_undo(writer)) { @@ -2461,9 +2441,6 @@ static bool write_file_handle(Main *mainvar, case ID_CF: write_cachefile(&writer, (CacheFile *)id_buffer, id); break; - case ID_VO: - write_volume(&writer, (Volume *)id_buffer, id); - break; case ID_SIM: write_simulation(&writer, (Simulation *)id_buffer, id); break; @@ -2494,6 +2471,7 @@ static bool write_file_handle(Main *mainvar, case ID_GD: case ID_HA: case ID_PT: + case ID_VO: /* Do nothing, handled in IDTypeInfo callback. */ break; case ID_LI: |