Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2020-09-11 12:52:25 +0300
committerJacques Lucke <jacques@blender.org>2020-09-11 12:52:37 +0300
commitf8ef7f045c289a86a141b2fc952e3e070f7679f1 (patch)
tree899d0b1febdd07293fcc8da86ae9f1076b85dd07 /source/blender/blenloader/intern/writefile.c
parent55efa1795f62bb99dcf4becc046269117032015e (diff)
Refactor: move Sound .blend I/O to IDTypeInfo callbacks
Diffstat (limited to 'source/blender/blenloader/intern/writefile.c')
-rw-r--r--source/blender/blenloader/intern/writefile.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 8bbdee78381..70d68ef5262 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -2055,23 +2055,6 @@ static void write_screen(BlendWriter *writer, bScreen *screen, const void *id_ad
}
}
-static void write_sound(BlendWriter *writer, bSound *sound, const void *id_address)
-{
- if (sound->id.us > 0 || BLO_write_is_undo(writer)) {
- /* Clean up, important in undo case to reduce false detection of changed datablocks. */
- sound->tags = 0;
- sound->handle = NULL;
- sound->playback_handle = NULL;
- sound->spinlock = NULL;
-
- /* write LibData */
- BLO_write_id_struct(writer, bSound, id_address, &sound->id);
- BKE_id_blend_write(writer, &sound->id);
-
- BKE_packedfile_blend_write(writer, sound->packedfile);
- }
-}
-
static void write_cachefile(BlendWriter *writer, CacheFile *cache_file, const void *id_address)
{
if (cache_file->id.us > 0 || BLO_write_is_undo(writer)) {
@@ -2374,9 +2357,6 @@ static bool write_file_handle(Main *mainvar,
case ID_SCE:
write_scene(&writer, (Scene *)id_buffer, id);
break;
- case ID_SO:
- write_sound(&writer, (bSound *)id_buffer, id);
- break;
case ID_GR:
write_collection(&writer, (Collection *)id_buffer, id);
break;
@@ -2418,6 +2398,7 @@ static bool write_file_handle(Main *mainvar,
case ID_PT:
case ID_VO:
case ID_SIM:
+ case ID_SO:
/* Do nothing, handled in IDTypeInfo callback. */
break;
case ID_LI: