== Sequencer ==
authorPeter Schlaile <peter@schlaile.de>
Sun, 30 May 2010 19:33:26 +0000 (19:33 +0000)
committerPeter Schlaile <peter@schlaile.de>
Sun, 30 May 2010 19:33:26 +0000 (19:33 +0000)
This fixes loading of hard trimmed audio files in readfile
and adds trim options to N-keys for audio files.

release/scripts/ui/space_sequencer.py
source/blender/blenloader/intern/readfile.c

index e300cfd3d3255166a585bd2d3349c79e5ed6a254..c3f056b13945454a6df405767eb5561302b227d0 100644 (file)
@@ -457,6 +457,7 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel):
             row = layout.row(align=True)
             sub = row.row()
             sub.scale_x = 2.0
+           
             if not context.screen.animation_playing:
                 sub.operator("screen.animation_play", text="", icon='PLAY')
             else:
@@ -666,6 +667,11 @@ class SEQUENCER_PT_sound(SequencerButtonsPanel):
 
         layout.prop(strip, "volume")
 
+        col = layout.column(align=True)
+        col.label(text="Trim Duration:")
+        col.prop(strip, "animation_start_offset", text="Start")
+        col.prop(strip, "animation_end_offset", text="End")
+
 
 class SEQUENCER_PT_scene(SequencerButtonsPanel):
     bl_label = "Scene"
index b0574e7b6220f316d5ee7e84618dacb26d3e1588..61685ccefcee8ed6b636e1961212398e94acad7d 100644 (file)
@@ -4174,7 +4174,7 @@ static void lib_link_scene(FileData *fd, Main *main)
                                if(seq->ipo) seq->ipo= newlibadr_us(fd, sce->id.lib, seq->ipo);
                                if(seq->scene) {
                                        seq->scene= newlibadr(fd, sce->id.lib, seq->scene);
-                                       seq->scene_sound = sound_scene_add_scene_sound(sce, seq, seq->startdisp, seq->enddisp, seq->startofs);
+                                       seq->scene_sound = sound_scene_add_scene_sound(sce, seq, seq->startdisp, seq->enddisp, seq->startofs + seq->anim_startofs);
                                }
                                if(seq->scene_camera) seq->scene_camera= newlibadr(fd, sce->id.lib, seq->scene_camera);
                                if(seq->sound) {
@@ -4185,7 +4185,7 @@ static void lib_link_scene(FileData *fd, Main *main)
                                                seq->sound= newlibadr(fd, sce->id.lib, seq->sound);
                                        if (seq->sound) {
                                                seq->sound->id.us++;
-                                               seq->scene_sound = sound_add_scene_sound(sce, seq, seq->startdisp, seq->enddisp, seq->startofs);
+                                               seq->scene_sound = sound_add_scene_sound(sce, seq, seq->startdisp, seq->enddisp, seq->startofs + seq->anim_startofs);
                                        }
                                }
                                seq->anim= 0;