Page MenuHome

VSE: Change Paste Position
ClosedPublic

Authored by Peter Fog (tintwotin) on Dec 3 2020, 4:24 PM.

Details

Summary

Currently the position of where pasted strips are inserted is relative to the Current Frame Cursor position, which means it is very hard paste the strips to a precise point in time:

This patch changes the position to be right after the Current Frame Cursor, which is in consistency with how strips are inserted when using Add:

Diff Detail

Event Timeline

Peter Fog (tintwotin) requested review of this revision.Dec 3 2020, 4:24 PM
Peter Fog (tintwotin) created this revision.
Peter Fog (tintwotin) edited the summary of this revision. (Show Details)
Hans Goudey (HooglyBoogly) requested changes to this revision.Dec 3 2020, 6:30 PM

Just two little code style comments

source/blender/editors/space_sequencer/sequencer_edit.c
2571

Declare this variable on the line before the new loop in order to keep the scope small.

2589

Use LISTBASE_FOREACH like below here.

This revision now requires changes to proceed.Dec 3 2020, 6:30 PM

Thanks. Patch updated with the suggested changes.

The first patch was copying the code from sequencer_set_range_to_strips_exec:
https://developer.blender.org/diffusion/B/browse/master/source/blender/editors/space_sequencer/sequencer_edit.c$3220

Peter Fog (tintwotin) edited the summary of this revision. (Show Details)Dec 3 2020, 8:50 PM
Richard Antalik (ISS) requested changes to this revision.Dec 4 2020, 2:13 AM

I think this is better as default behavior, though I still think that having current behavior available as option would be better. It has use cases which this approach doesn't have - paste strip before playhead or paste with offset.

This revision now requires changes to proceed.Dec 4 2020, 2:13 AM

@Richard Antalik (ISS) The position is calculated when copying, so a Bool should be added to the copy operator, which can be assigned to a key. What key would you prefer?
Should it also be exposed in the menu? If so, what would you call it?

@Richard Antalik (ISS) The position is calculated when copying, so a Bool should be added to the copy operator, which can be assigned to a key. What key would you prefer?
Should it also be exposed in the menu? If so, what would you call it?

Ah I see.. This should definitely be paste property not copy.

It still looks doable - you can find first frame by iterating over seqbase_clipboard then ofs would be ofs = scene->r.cfra - min_seq_start if I calculate this correctly.

Also Ctrl+Shift+V would be good shortcut IMO.

  • Paste strips after playhead by default
  • Add explanation comment
  • Add Ctrl+Shift+V shortcut, add SKIP_SAVE prop flag

@Peter Fog (tintwotin) @Hans Goudey (HooglyBoogly) Please cross check me if this works as you intended, Otherwise looks good to me (obviously :)

Works well. Thank you.

This revision was not accepted when it landed; it landed in state Needs Review.Dec 15 2020, 10:30 PM
This revision was automatically updated to reflect the committed changes.