diff options
author | Tom Edwards <contact@steamreview.org> | 2014-01-15 19:37:03 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-01-15 19:47:53 +0400 |
commit | 1f2136b329c1c457f8f2a77c26d0fdffc635e7a2 (patch) | |
tree | 53d91bba6000bea9d9aaf683261936167ab6627b /source/blender/blenkernel/intern/sound.c | |
parent | 8c444958fcba92135b22893ae5da53bc31e96eb6 (diff) |
Python/Depsgraph: bpy.data.*.is_updated now detects add/remove of any datablock.
Previously this only worked for some datablocks relevant to rendering, now it
can be used to detect if any type of datablock was added or removed (but not
yet to detect if it was modified, we need many more depsgraph tags for that).
Most of the changes are some function parameter changes, the important parts
are the DAG_id_type_tag calls.
Reviewed By: sergey, brecht
Differential Revision: https://developer.blender.org/D195
Diffstat (limited to 'source/blender/blenkernel/intern/sound.c')
-rw-r--r-- | source/blender/blenkernel/intern/sound.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c index 3910ef5cb69..3a8754e8dd2 100644 --- a/source/blender/blenkernel/intern/sound.c +++ b/source/blender/blenkernel/intern/sound.c @@ -84,14 +84,14 @@ bSound *sound_new_file(struct Main *bmain, const char *filename) while (len > 0 && filename[len - 1] != '/' && filename[len - 1] != '\\') len--; - sound = BKE_libblock_alloc(&bmain->sound, ID_SO, filename + len); + sound = BKE_libblock_alloc(bmain, ID_SO, filename + len); BLI_strncpy(sound->name, filename, FILE_MAX); // XXX unused currently sound->type = SOUND_TYPE_FILE; sound_load(bmain, sound); if (!sound->playback_handle) { - BKE_libblock_free(&bmain->sound, sound); + BKE_libblock_free(bmain, sound); sound = NULL; } @@ -233,7 +233,7 @@ bSound *sound_new_buffer(struct Main *bmain, bSound *source) strcpy(name, "buf_"); strcpy(name + 4, source->id.name); - sound = BKE_libblock_alloc(&bmain->sound, ID_SO, name); + sound = BKE_libblock_alloc(bmain, ID_SO, name); sound->child_sound = source; sound->type = SOUND_TYPE_BUFFER; @@ -242,7 +242,7 @@ bSound *sound_new_buffer(struct Main *bmain, bSound *source) if (!sound->playback_handle) { - BKE_libblock_free(&bmain->sound, sound); + BKE_libblock_free(bmain, sound); sound = NULL; } @@ -257,7 +257,7 @@ bSound *sound_new_limiter(struct Main *bmain, bSound *source, float start, float strcpy(name, "lim_"); strcpy(name + 4, source->id.name); - sound = BKE_libblock_alloc(&bmain->sound, ID_SO, name); + sound = BKE_libblock_alloc(bmain, ID_SO, name); sound->child_sound = source; sound->start = start; @@ -268,7 +268,7 @@ bSound *sound_new_limiter(struct Main *bmain, bSound *source, float start, float if (!sound->playback_handle) { - BKE_libblock_free(&bmain->sound, sound); + BKE_libblock_free(bmain, sound); sound = NULL; } @@ -281,7 +281,7 @@ void sound_delete(struct Main *bmain, bSound *sound) if (sound) { BKE_sound_free(sound); - BKE_libblock_free(&bmain->sound, sound); + BKE_libblock_free(bmain, sound); } } |