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--release/scripts/startup/bl_ui/space_sequencer.py9
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c20
2 files changed, 4 insertions, 25 deletions
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py
index 34a0bacf13b..ab993d1c640 100644
--- a/release/scripts/startup/bl_ui/space_sequencer.py
+++ b/release/scripts/startup/bl_ui/space_sequencer.py
@@ -783,13 +783,10 @@ class SEQUENCER_PT_sound(SequencerButtonsPanel, Panel):
strip = act_strip(context)
sound = strip.sound
- # TODO: add support to handle SOUND datablock in sequencer soundstrips... For now, hide this useless thing!
- # layout.template_ID(strip, "sound", open="sound.open")
-
- # layout.separator()
- layout.prop(strip, "filepath", text="")
-
+ layout.template_ID(strip, "sound", open="sound.open")
if sound is not None:
+ layout.prop(sound, "filepath", text="")
+
row = layout.row()
if sound.packed_file:
row.operator("sound.unpack", icon='PACKAGE', text="Unpack")
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index d9d56adffae..221bf4b59b3 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -596,19 +596,6 @@ static PointerRNA rna_SequenceEditor_meta_stack_get(CollectionPropertyIterator *
static void rna_Sequence_filepath_set(PointerRNA *ptr, const char *value)
{
Sequence *seq = (Sequence *)(ptr->data);
-
- if (seq->type == SEQ_TYPE_SOUND_RAM && seq->sound) {
- /* for sound strips we need to update the sound as well.
- * arguably, this could load in a new sound rather than 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);
- BKE_sound_load(G.main, seq->sound);
- BKE_sound_update_scene_sound(seq->scene_sound, seq->sound);
- }
-
BLI_split_dirfile(value, seq->strip->dir, seq->strip->stripdata->name, sizeof(seq->strip->dir),
sizeof(seq->strip->stripdata->name));
}
@@ -2034,6 +2021,7 @@ static void rna_def_sound(BlenderRNA *brna)
RNA_def_struct_sdna(srna, "Sequence");
prop = RNA_def_property(srna, "sound", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "Sound");
RNA_def_property_ui_text(prop, "Sound", "Sound data-block used by this sequence");
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
@@ -2061,12 +2049,6 @@ static void rna_def_sound(BlenderRNA *brna)
RNA_def_property_float_funcs(prop, NULL, "rna_Sequence_pan_set", NULL);
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
- prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
- RNA_def_property_ui_text(prop, "File", "");
- RNA_def_property_string_funcs(prop, "rna_Sequence_filepath_get", "rna_Sequence_filepath_length",
- "rna_Sequence_filepath_set");
- RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_filepath_update");
-
prop = RNA_def_property(srna, "show_waveform", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_AUDIO_DRAW_WAVEFORM);
RNA_def_property_ui_text(prop, "Draw Waveform", "Whether to draw the sound's waveform");