diff options
author | Jacques Lucke <jacques@blender.org> | 2020-09-10 18:31:18 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-09-10 18:31:18 +0300 |
commit | 0c7e77d416cac85d6b50778115d8cae4c3d64a6c (patch) | |
tree | 69f86021fea53d821f0497474d6735b014c82246 /source/blender/blenloader/intern/writefile.c | |
parent | be5cbbabcea555fc5ba3ac84922342ad2fb71dd4 (diff) |
Refactor: move Speaker .blend I/O to IDTypeInfo callbacks
Diffstat (limited to 'source/blender/blenloader/intern/writefile.c')
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index dff161172c7..9a423ab6906 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -2187,19 +2187,6 @@ static void write_armature(BlendWriter *writer, bArmature *arm, const void *id_a } } -static void write_speaker(BlendWriter *writer, Speaker *spk, const void *id_address) -{ - if (spk->id.us > 0 || BLO_write_is_undo(writer)) { - /* write LibData */ - BLO_write_id_struct(writer, Speaker, id_address, &spk->id); - BKE_id_blend_write(writer, &spk->id); - - if (spk->adt) { - BKE_animdata_blend_write(writer, spk->adt); - } - } -} - static void write_sound(BlendWriter *writer, bSound *sound, const void *id_address) { if (sound->id.us > 0 || BLO_write_is_undo(writer)) { @@ -2665,9 +2652,6 @@ static bool write_file_handle(Main *mainvar, case ID_KE: write_key(&writer, (Key *)id_buffer, id); break; - case ID_SPK: - write_speaker(&writer, (Speaker *)id_buffer, id); - break; case ID_LP: write_probe(&writer, (LightProbe *)id_buffer, id); break; @@ -2726,6 +2710,7 @@ static bool write_file_handle(Main *mainvar, case ID_CA: case ID_WO: case ID_MSK: + case ID_SPK: /* Do nothing, handled in IDTypeInfo callback. */ break; case ID_LI: |