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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-06-10 19:41:01 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-06-10 19:41:01 +0400
commit7e21cede8f9a392db31889b398233f7b4ed829f0 (patch)
treee464e1138d38af61d82a54d0c8325fadc55dac5e /source
parent64fbe2ee215821ad99b2554dd49cb16b20f867e3 (diff)
setting the sequencer strip filepath for sound strips would rename the strip path but not the sounds,
resulting in sounds that didnt play in the sequencer unless you removed and replaced them with a strip that pointed to the new path. The way these 2 datablocks work together is a bit odd, I think this is OK for now but should be better defined.
Diffstat (limited to 'source')
-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);