Page MenuHome

Generic drag-all-selected support (Node Editor, VSE, Dopesheet Graph Editor, Markers)
AbandonedPublic

Authored by Julian Eisel (Severin) on Thu, Oct 3, 12:53 PM.

Details

Summary

Based on work by Bastien and Brecht, this adds more generic support for
drag-all-selected and uses it for Node Editor, VSE and Dopesheet.

The behavior is supposed to work as follows:

  • Clicking a unselected item immediately selects it, and deselects other items (doesn't wait for release events).
  • Click+drag on an unselected item immediately selects it, deselects others and drags it in one go (don't require selecting it first!).
  • Click+drag on a selected item won't change the selection state (and won't send an undo push) and start dragging all selected items as soon as the drag event is recognized.
  • Clicking on a selected item will still deselect others, but that will only happen on mouse release, when we know the intention is not to drag the item.

In the Node Editor this behavior already worked, I only refactored it a
bit to use the new generic code.

Note that in the VSE implementation of this, the behavior doesn't only
work for strips, but also for the strip handles. So you can click and
drag multiple stip handles now too.

Diff Detail

Repository
rB Blender
Branch
drag-all-select (branched from master)
Build Status
Buildable 5239
Build 5239: arc lint + arc unit

Event Timeline

source/blender/windowmanager/intern/wm_operator_props.c
403

Also set PROP_SKIP_SAVE

Oh, this is great. Any chance for VSE handle selection too? Like this add-on: https://github.com/Salatfreak/VSEBoxSelectHandles

  • Add PROP_SKIP_SAVE to hidden operator property
  • Fix missing undo pushes in Dopesheet
  • Add drag-all-selected for Graph Editor too

Looks good to me.

This is something the animators might have feedback on, so get them to test this once committed.

This revision is now accepted and ready to land.Thu, Oct 3, 4:10 PM

Tested - this seems to do what is expected and works well.

However, this reveals some issues in the Graph Editor:

1: You cannot drag on a handle when a keyframe is selected, or the keyframe also moves. Tweak-dragging on handles should not transform the parent key, even if that key is also selected. But you *should* be able to transform many handles at the same time.

2: Because this does make it nicer to use box select and tweaking in the Graph Editor, we should make it easier to box select handles, which is not possible without also selecting the keyframe. The solution to that would be for tweak-box select to have the option Include Handles enabled. But then the issue is that Include Handles has a bug which makes it impossible to transform keyframes without the handles going haywire:

So, for the Graph Editor, this patch has some implications. We should support box selecting many handles, so you can transform them all together by tweak dragging.

Issue #1 seems fairly important, so not sure if we should commit with that issue still present.

Accepting this, IMO this patch is doing the right thing. Even if it reveals some old issues in the Graph Editor, they are technically separate problems to be solved separately I think.

Brecht Van Lommel (brecht) requested changes to this revision.Thu, Oct 3, 4:53 PM

We should at least try to solve issue #1 I think.

This revision now requires changes to proceed.Thu, Oct 3, 4:53 PM

We could make handle selection slightly different. E.g. when the key + both handles are selected (typically the case when clicking on a key to reveil the handles), clicking on a handle without shift deactivates the key and the other handle. We can leave selection for other keys untouched. That way we can keep the behavior of click and drag for single handles work, but still support dragging multiple items, including handles.
While a bit inconsistent, I think this would give a decent compromise without being too hard on existing muscle memory.

@Julian Eisel (Severin) that sounds like it would then not be possible to drag on multiple handles? It would be good if you could box select many handles and drag on them to move them together.

@Julian Eisel (Severin) that sounds like it would then not be possible to drag on multiple handles? It would be good if you could box select many handles and drag on them to move them together.

Agree with this, when talking to animators in our studio about moving to Blender this exact thing came up, they particularly like being able to multiple select handles and move them together (as well as the keys themselves of course. (they currently use Maya)

No I mean when clicking on a handle while both handles and the key are selected, it will deselect the other handle and the key. Handles from other keys will remain untouched. So overall the behavior to select keys and handles will be consistent with the drag-all-selected needs; only when clicking on the handles when all three points are selected, we digress from that.

E.g.:

  1. Select a bunch of keys and some handles.
  2. Click on a key to reveal its handles (both handles + the key get selected, like currently).
  3. Press on right handle -> the left handle and the key get deselected, everything selected in step 1. stays selected.
  4. Dragging now moves the right handle + what has been selected in 1.

I may have to implement this to demonstrate what I mean. And I guess these kind of things have to be tried in practice anyway.

Julian Eisel (Severin) updated this revision to Diff 18780.EditedFri, Oct 4, 12:17 PM
  • Cleanup: Simplify return value assignment in Graph Editor
  • Experiment: When clicking on handles, deselect other handle+key of current key tripple

This implements described behavior for testing. I did a further change which I think makes sense with this, that is, deselecting a key doesn't hide the handles if one of the handles is still selected. Without this you can't set up any meaningful handle selection to use for drag-all-selected.

Made a little demo to show the behavior, although I guess you'd still have to try yourself to understand:

The update works well in simple cases now then only a single key is selected. And it's also working still if handles on multiple keys selected. So that's good.

The issue is if you try and transform the handle on one key while another *key* is selected, then that whole key, including the handles, are transformed:

It's somewhat a tricky issue. Not sure if there's a simple way around this. Probably the best way to solve this, is by enabling Include Handles in tweak box select so that it becomes easier to select multiple handles. But then we will have to fix the bug that makes Include Handles break normal keyframe transform in the Graph Editor.

  • Add drag-all-select support for markers
Julian Eisel (Severin) retitled this revision from Generic drag-all-selected support + use in Node Editor, VSE & Dopesheet to Generic drag-all-selected support (Node Editor, VSE, Dopesheet Graph Editor, Markers).Fri, Oct 4, 2:53 PM

Hmm yeah that is interesting, I feel like the expected behaviour if the user grabs a handle is that only handles are moved but if a key is grabbed handles and keys are moved together?

@Andrei Nadin (AnadinX) exactly right, that’s how it should work. And in fact if you transform right handles, only other right handles should move.

And in fact if you transform right handles, only other right handles should move.

Maybe it should also include the left handle of the next keyframe if that's selected? But not the left handle of the same keyframe.

Related recent bug report: T70459: Graph Editor Handles problem.

@Andrei Nadin (AnadinX) exactly right, that’s how it should work. And in fact if you transform right handles, only other right handles should move.

Would that not have be a function of the Handle type? if its Vector then only the right hand but if its aligned then the left hand would have to go down etc.?

@Andrei Nadin (AnadinX) No, you misunderstand. I mean that if multiple keys are selected, and you drag on a handle, all of the same type pf handles (left or right) will be transformed.

If the key is set to Aligned, then of course the corresponding left handles will move accordingly (opposite).

Closing this now as most of the patch is in master now. I created T70634 for the Graph Editor discussion.
Thanks all!

So, no love for the Sequncer handles?

@Peter Fog (tintwotin) forgot to answer earlier, sorry - this should probably become a keymap option, just like the Include Handles option in the Graph Editor. This is a rather easy thing to do, I'd leave this up for beginners.

@Julian Eisel (Severin) Okay, could you maybe open a design issue, so beginners will know that it is a welcome feature to work on?