diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-05-01 16:12:38 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-05-03 16:50:40 +0300 |
commit | d02da8de23b1d5f64695d3e7e91384d5e2f24e4c (patch) | |
tree | be0dbaad0ab75d068b5384e19096e7abd1bc8df4 /source/blender/blenloader | |
parent | 3369b8289167ddf3dbca0e3895d598bf73534124 (diff) |
Sound: Delay opening handlers for until really needed
Needs to be done in order to localize sound handlers to the evaluated
IDs only. This commit might not be fully optimal, since it does more
things on every scene update request, but that will be solved by the
upcoming change which will put those updates to a dependency graph.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 7f62369647a..3326e2c02dc 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -6488,7 +6488,7 @@ static void lib_link_scene(FileData *fd, Main *main) } if (seq->sound) { id_us_plus_no_lib((ID *)seq->sound); - seq->scene_sound = BKE_sound_add_scene_sound_defaults(sce, seq); + seq->scene_sound = NULL; } } if (seq->type == SEQ_TYPE_TEXT) { @@ -6507,9 +6507,6 @@ static void lib_link_scene(FileData *fd, Main *main) } } - BKE_sequencer_update_muting(sce->ed); - BKE_sequencer_update_sound_bounds_all(sce); - /* rigidbody world relies on it's linked collections */ if (sce->rigidbody_world) { RigidBodyWorld *rbw = sce->rigidbody_world; @@ -6681,7 +6678,7 @@ static void direct_link_scene(FileData *fd, Scene *sce) memset(&sce->customdata_mask, 0, sizeof(sce->customdata_mask)); memset(&sce->customdata_mask_modal, 0, sizeof(sce->customdata_mask_modal)); - BKE_sound_create_scene(sce); + BKE_sound_reset_scene_pointers(sce); /* set users to one by default, not in lib-link, this will increase it for compo nodes */ id_us_ensure_real(&sce->id); @@ -8426,7 +8423,7 @@ static void lib_link_sound(FileData *fd, Main *main) sound->ipo = newlibadr_us( fd, sound->id.lib, sound->ipo); // XXX deprecated - old animation system - BKE_sound_load(main, sound); + BKE_sound_reset_pointers(sound); sound->id.tag &= ~LIB_TAG_NEED_LINK; } |