Page MenuHome

Add Scissors tool and new Blade modes to VSE
AbandonedPublic

Authored by Richard Antalik (ISS) on Mar 4 2020, 10:13 AM.

Details

Summary

This patch adds set of functions to enable quick editing of strips.

  • New property Selection Influence for tool Blade with options:
    • Split selected strips
    • Split one strip
    • Split all strips
  • New operator sequencer.split_box and tool Scissors - draw 2D box, slpit all strips within and delete them. Operator supports snapping to edit points
  • New gizmo SEQUENCER_GGT_preselect_image_preview which will make playhead follow mouse cursor, so user can actually see where edit is being done.

Both tools use gizmo to make playhead follow mouse cursor. Perhaps I could have added option to disable following mouse cursor.

Here is a quick video:

Hacks:

  • Gizmo implementation is a bit hacky - it stops working when modal operator starts running, so function is duplicated in sequencer_split_box_modal. I suspect, that I implemented this "other way around".
  • Ideally we wouldn't need to move playhead, but either draw preview in timeline directly, but that can be distracting and messy, or in preview area by other means, but that may involve hacks as well.
  • Not sure if I should add gesture keymaps like this, or there is more discrete way to do it - see Gesture Box Snap
  • Snapping implementation feels a bit hacky as well - see fake_event used to override values for WM_gesture_box_modal

This patch could be split into 3 parts, but it was easier for me to work on it as a whole.

Diff Detail

Repository
rB Blender
Branch
tool-split-box (branched from master)
Build Status
Buildable 7028
Build 7028: arc lint + arc unit

Event Timeline

  • make playhead follow cursor while cutting
  • well these commits now won't make sense anyway
  • preview for box
  • cut box: make cursor follow mouse while modal
  • merge tool preview
  • fix merge gone wrong
  • remove unintended changes
  • make snapping precise
  • many small fixes
  • more fixes
Richard Antalik (ISS) retitled this revision from Sample split_box operator to Add new cut tool and modes to VSE.Mar 8 2020, 7:00 PM
Richard Antalik (ISS) edited the summary of this revision. (Show Details)
  • give GIZMO_SEQ_hack a better name
  • remove WM_gizmomap_tag_refresh() - it doesnt't do what I thought it does
  • Rename new tool to Scissors
Richard Antalik (ISS) edited the summary of this revision. (Show Details)Mar 8 2020, 7:23 PM
Richard Antalik (ISS) retitled this revision from Add new cut tool and modes to VSE to Add Scissors tool and new Blade modes to VSE.Mar 8 2020, 7:26 PM

Will have to find better solution here