diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-07-24 10:51:04 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-07-24 10:51:04 +0400 |
commit | 576161b18673ef5cd5833330d4bfbf1266c3f624 (patch) | |
tree | 4448532c0b4b8aac30cac9d0de0d29e821df4dce /release/scripts/startup/bl_ui/space_sequencer.py | |
parent | d0f225393cc4c65c1e2e9c2003f3a07eb18db28f (diff) |
fix [#36262] Paste strip with video or sound content from another file crashes Blender
existing code was very stupid.
- all ID pointers for clipboard strips are handled uniformly.
- clipboard stores a duplicate ID pointer which are restored on paste.
- restoring pointers...
-- use ID's that are still in the database (copy&paste within the same file).
-- fallback to name lookup.
-- fallback to loading them from the original filepath (movie-clip and sound only).
also fix bug pasting where initialing the sound wasn't done if there was no frame-offset.
Diffstat (limited to 'release/scripts/startup/bl_ui/space_sequencer.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_sequencer.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index 3477353ba0d..79191637080 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -671,13 +671,14 @@ class SEQUENCER_PT_sound(SequencerButtonsPanel, Panel): layout.separator() layout.prop(strip, "filepath", text="") - row = layout.row() - if sound.packed_file: - row.operator("sound.unpack", icon='PACKAGE', text="Unpack") - else: - row.operator("sound.pack", icon='UGLYPACKAGE', text="Pack") + if sound is not None: + row = layout.row() + if sound.packed_file: + row.operator("sound.unpack", icon='PACKAGE', text="Unpack") + else: + row.operator("sound.pack", icon='UGLYPACKAGE', text="Pack") - row.prop(sound, "use_memory_cache") + row.prop(sound, "use_memory_cache") layout.prop(strip, "show_waveform") layout.prop(strip, "volume") |