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/readfile.c | |
parent | be5cbbabcea555fc5ba3ac84922342ad2fb71dd4 (diff) |
Refactor: move Speaker .blend I/O to IDTypeInfo callbacks
Diffstat (limited to 'source/blender/blenloader/intern/readfile.c')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 39 |
1 files changed, 2 insertions, 37 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index ccc5248c472..b8697734013 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -6445,28 +6445,6 @@ static void direct_link_lightprobe(BlendDataReader *reader, LightProbe *prb) /** \} */ /* -------------------------------------------------------------------- */ -/** \name Read ID: Speaker - * \{ */ - -static void lib_link_speaker(BlendLibReader *reader, Speaker *spk) -{ - BLO_read_id_address(reader, spk->id.lib, &spk->sound); -} - -static void direct_link_speaker(BlendDataReader *reader, Speaker *spk) -{ - BLO_read_data_address(reader, &spk->adt); - BKE_animdata_blend_read_data(reader, spk->adt); - -#if 0 - spk->sound = newdataadr(fd, spk->sound); - direct_link_sound(fd, spk->sound); -#endif -} - -/** \} */ - -/* -------------------------------------------------------------------- */ /** \name Read ID: Sound * \{ */ @@ -6789,9 +6767,6 @@ static bool direct_link_id(FileData *fd, Main *main, const int tag, ID *id, ID * case ID_LI: direct_link_library(fd, (Library *)id, main); break; - case ID_SPK: - direct_link_speaker(&reader, (Speaker *)id); - break; case ID_SO: direct_link_sound(&reader, (bSound *)id); break; @@ -6847,6 +6822,7 @@ static bool direct_link_id(FileData *fd, Main *main, const int tag, ID *id, ID * case ID_CA: case ID_WO: case ID_MSK: + case ID_SPK: /* Do nothing. Handled by IDTypeInfo callback. */ break; } @@ -7473,9 +7449,6 @@ static void lib_link_all(FileData *fd, Main *bmain) case ID_LP: lib_link_lightprobe(&reader, (LightProbe *)id); break; - case ID_SPK: - lib_link_speaker(&reader, (Speaker *)id); - break; case ID_PA: lib_link_particlesettings(&reader, (ParticleSettings *)id); break; @@ -7538,6 +7511,7 @@ static void lib_link_all(FileData *fd, Main *bmain) case ID_CA: case ID_WO: case ID_MSK: + case ID_SPK: /* Do nothing. Handled by IDTypeInfo callback. */ break; } @@ -8496,11 +8470,6 @@ static void expand_cachefile(BlendExpander *UNUSED(expander), CacheFile *UNUSED( { } -static void expand_speaker(BlendExpander *expander, Speaker *spk) -{ - BLO_expand(expander, spk->sound); -} - static void expand_sound(BlendExpander *expander, bSound *snd) { BLO_expand(expander, snd->ipo); // XXX deprecated - old animation system @@ -8510,7 +8479,6 @@ static void expand_lightprobe(BlendExpander *UNUSED(expander), LightProbe *UNUSE { } - static void expand_gpencil(BlendExpander *expander, bGPdata *gpd) { LISTBASE_FOREACH (bGPDlayer *, gpl, &gpd->layers) { @@ -8612,9 +8580,6 @@ void BLO_expand_main(void *fdhandle, Main *mainvar) case ID_KE: expand_key(&expander, (Key *)id); break; - case ID_SPK: - expand_speaker(&expander, (Speaker *)id); - break; case ID_SO: expand_sound(&expander, (bSound *)id); break; |