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:
-rw-r--r--source/blender/blenkernel/intern/sequencer.c2
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c11
-rw-r--r--source/blender/makesrna/intern/rna_sound.c2
3 files changed, 13 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index f1e60ee2cfd..3ff7370a443 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -566,7 +566,7 @@ void calc_sequence(Scene *scene, Sequence *seq)
}
}
-/* note: caller should run calc_sequence(scene, seq) */
+/* note: caller should run calc_sequence(scene, seq) after */
void reload_sequence_new_file(Scene *scene, Sequence * seq, int lock_range)
{
char str[FILE_MAXDIR+FILE_MAXFILE];
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index f1f4a252c16..b4d7b5559a4 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -348,11 +348,22 @@ static PointerRNA rna_SequenceEditor_meta_stack_get(CollectionPropertyIterator *
return rna_pointer_inherit_refine(&iter->parent, &RNA_Sequence, ms->parseq);
}
+/* TODO, expose seq path setting as a higher level sequencer BKE function */
static void rna_Sequence_filepath_set(PointerRNA *ptr, const char *value)
{
Sequence *seq= (Sequence*)(ptr->data);
char dir[FILE_MAX], name[FILE_MAX];
+ if(seq->type == SEQ_SOUND && seq->sound) {
+ /* for sound strips we need to update the sound as well.
+ * arguably, this could load in a new sound rather then modify an existing one.
+ * but while using the sequencer its most likely your not using the sound in the game engine too.
+ */
+ PointerRNA id_ptr;
+ RNA_id_pointer_create((ID *)seq->sound, &id_ptr);
+ RNA_string_set(&id_ptr, "filepath", value);
+ }
+
BLI_split_dirfile(value, dir, name);
BLI_strncpy(seq->strip->dir, dir, sizeof(seq->strip->dir));
BLI_strncpy(seq->strip->stripdata->name, name, sizeof(seq->strip->stripdata->name));
diff --git a/source/blender/makesrna/intern/rna_sound.c b/source/blender/makesrna/intern/rna_sound.c
index b3c9e36e7b9..9048a3c3072 100644
--- a/source/blender/makesrna/intern/rna_sound.c
+++ b/source/blender/makesrna/intern/rna_sound.c
@@ -72,7 +72,7 @@ static void rna_def_sound(BlenderRNA *brna)
prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_sdna(prop, NULL, "name");
- RNA_def_property_ui_text(prop, "Filename", "Sound sample file used by this Sound datablock");
+ RNA_def_property_ui_text(prop, "File Path", "Sound sample file used by this Sound datablock");
RNA_def_property_update(prop, 0, "rna_Sound_filepath_update");
prop= RNA_def_property(srna, "packed_file", PROP_POINTER, PROP_NONE);