Page MenuHome

VSE: Add support for dropped Image, Movie Clip and Sound data-blocks
ClosedPublic

Authored by Peter Fog (tintwotin) on Nov 22 2021, 7:29 AM.
Tokens
"Love" token, awarded by Andrea_Monzini."Love" token, awarded by Draise."Love" token, awarded by HEYPictures."Like" token, awarded by lichtwerk.

Details

Summary

For using the Outliner and/or the Asset Browser as scene independent tools to organize a/v source material is necessary for the users to be able to drag and drop data blocks into the VSE. This was also an unfulfilled design target for the Outliner Gsoc project.

For testing, this scrip can be used to convert selected strips to assets, if the experimental asset browser elements are enabled under Preferences: https://gist.github.com/tin2tin/0da859896432245fd15cfe960fdd9ee9

Additional findings:

  • Dragged and dropped folders and for the vse unknown file types like text, html, diff etc. imports adds an image strip with an invalid path.
  • I have a vague recollection of folders that could be dragged and dropped into the vse, but if it was working at some point it has been broken for several versions back.
  • Drag and drop of ID's of cameras and texts, could also be supported.
  • Drag and drop of paths of movie, sound, text and image from the outliner, could also be supported, but it seems like it's the drag part is missing.

Diff Detail

Repository
rB Blender

Event Timeline

Peter Fog (tintwotin) requested review of this revision.Nov 22 2021, 7:29 AM
Peter Fog (tintwotin) created this revision.
Richard Antalik (ISS) requested changes to this revision.Nov 22 2021, 7:47 AM

The way you modified original code is incorrect, now you can't drop movies. This worked with original patch you shared in chat. I am not quite sure why this change was done.

This revision now requires changes to proceed.Nov 22 2021, 7:47 AM
Peter Fog (tintwotin) edited the summary of this revision. (Show Details)

Revert path(not ID) code.

Peter Fog (tintwotin) edited the summary of this revision. (Show Details)Nov 22 2021, 8:22 AM
This revision is now accepted and ready to land.Nov 22 2021, 8:31 AM

With some minor tweak to name it can indeed be committed.

source/blender/editors/space_sequencer/space_sequencer.c
454

sequencer_id_path_drop_copy -> sequencer_id_or_path_drop_copy

ID path is something else.

Peter Fog (tintwotin) updated this revision to Diff 45078.EditedNov 22 2021, 4:12 PM

Updated to solve the @Sergey Sharybin (sergey) comment. NB. I do not have commit rights.

Peter Fog (tintwotin) marked an inline comment as done.Nov 22 2021, 4:23 PM

Looks like you have included bit more changes.

I will do some changes here anyway, because I noticed, this code isn't formatted with clang-format, and so each WM_dropbox_add call will take 4 lines. So I will revert name back to sequencer_drop_copy and merge poll functions so there is only 1 for each strip type. Other editors do it this way too.

This revision was automatically updated to reflect the committed changes.