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:
authorSergey Sharybin <sergey.vfx@gmail.com>2019-06-11 11:55:13 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-06-11 16:11:07 +0300
commit0767f95a63959e156c302520db7fbf480159abe0 (patch)
treee4f416474ae320156e9e35b1d25d2b8300ad628e /source/blender/makesrna/intern/rna_sequencer.c
parent3a6f6c87e051edd3e98c92428980a52bafd7abf0 (diff)
Sound: Fix queries of sound info
A lot of areas were querying sound information directly using audio handle which does not exist on an original sound IDs. This change basically makes it so it's possible to query information about given sound ID, without worrying about whether it's loaded or not: if it is needed to load it first it happens automatically (no automatically-opened handles are left behind though). While this seems a bit extreme to open files on such queries it is still better than the old situation when all sound handles were opened on file load, no matter if it's needed or not. Besides, none of the changed code paths are performance critical, just handful of tools. Fixes T65696: Sequencer fails to create a new sound sequence strip via Python Fixes T65656: Audio strip - SHIFT K crashes Blender Reviewers: brecht Reviewed By: brecht Subscribers: ISS Maniphest Tasks: T65696, T65656 Differential Revision: https://developer.blender.org/D5061
Diffstat (limited to 'source/blender/makesrna/intern/rna_sequencer.c')
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index 4d7bc45308a..f5e4259c471 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -69,6 +69,7 @@ const EnumPropertyItem rna_enum_sequence_modifier_type_items[] = {
#ifdef RNA_RUNTIME
+# include "BKE_global.h"
# include "BKE_report.h"
# include "BKE_idprop.h"
# include "BKE_movieclip.h"
@@ -321,7 +322,7 @@ static void rna_Sequence_anim_startofs_final_set(PointerRNA *ptr, int value)
seq->anim_startofs = MIN2(value, seq->len + seq->anim_startofs);
- BKE_sequence_reload_new_file(scene, seq, false);
+ BKE_sequence_reload_new_file(G.main, scene, seq, false);
do_sequence_frame_change_update(scene, seq);
}
@@ -332,7 +333,7 @@ static void rna_Sequence_anim_endofs_final_set(PointerRNA *ptr, int value)
seq->anim_endofs = MIN2(value, seq->len + seq->anim_endofs);
- BKE_sequence_reload_new_file(scene, seq, false);
+ BKE_sequence_reload_new_file(G.main, scene, seq, false);
do_sequence_frame_change_update(scene, seq);
}
@@ -803,7 +804,7 @@ static void rna_Sequence_filepath_update(Main *bmain, Scene *UNUSED(scene), Poin
{
Scene *scene = (Scene *)ptr->id.data;
Sequence *seq = (Sequence *)(ptr->data);
- BKE_sequence_reload_new_file(scene, seq, true);
+ BKE_sequence_reload_new_file(bmain, scene, seq, true);
BKE_sequence_calc(scene, seq);
rna_Sequence_invalidate_raw_update(bmain, scene, ptr);
}
@@ -838,13 +839,13 @@ static Sequence *sequence_get_by_proxy(Editing *ed, StripProxy *proxy)
return data.seq;
}
-static void rna_Sequence_tcindex_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
+static void rna_Sequence_tcindex_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
{
Scene *scene = (Scene *)ptr->id.data;
Editing *ed = BKE_sequencer_editing_get(scene, false);
Sequence *seq = sequence_get_by_proxy(ed, ptr->data);
- BKE_sequence_reload_new_file(scene, seq, false);
+ BKE_sequence_reload_new_file(bmain, scene, seq, false);
do_sequence_frame_change_update(scene, seq);
}