Proposal: Time Selection
For what purpose?
Blender lacks a way to modify animation data between points that is not tied to selected keyframes.
If the user wanted to offset an area of an animation, this is how they would have to do it currently. (not entirely 1 to 1)
simplescreenrecorder-2020-11-05_01.34.01
Having a selectable time range will drastically speed this up, here is a hacky implementation in python of this premise.
simplescreenrecorder-2020-11-05_01.35.04
How this would work
The user will select an area on the timeline.
This area can then be used to affect animation data depending on the userâs actions
Here is how it would look.
Ideas for implementation
UI
Interaction
Tool, Mode, or Editor??
This would have to add either a toolshelf and new tool, or a new mode in all the affected spaces/editors, which would be everything under the Animation Editor category. Possibly the Sequencer, and graph/dopesheet for Tracking?
It could be a new editor with two modes. One for setting the time selection which would be easily selected from all other animation editors (Like how ctrl-tab toggles dopesheet/graph, it could be press z to toggle the time range space.), and one for editing time-based data within the selected object/bones, like FCurve modifiers. The second mode is outside the scope of this proposal, though.
With the toggling, I am not sure how you would return.
- Holding shift while left clicking, then dragging will define the start and end of the range (removes falloff)
- Being able to select handles and drag with G
- Select 2 handles by clicking the area between them
- Holding shift and scrolling the mouse wheel expands the outer handles
- Draw something similar to the playhead scrubber, but green, that follows the mouse snapping to the nearest snap option. This could also be used for when moving the handles, but the color will be orange instead. The selected handles could show their frame in the scrubber while being moved.
Drawing
- Draw the range, with a faded gradient.
- Draw Handles, showing if theyâre selected.
- Draw something that reminds the user when the start or end of the range is equal to, or outside the sceneâs start/end. Probably unnecessary, but throwing it out there.
- Draw the lines for how much influence the selection will have for each frame.
Theming
- Selected Time Range (A somewhat transparent green.)
- Selected Handles (Slightly transparent, or fully opaque black.)
- Selected Time Range Influence Line (Same as Selected Time Range, but allow people to make it different if they choose.)
- Time Selection Scrubber (An opaque green.)
Exposed data
Iâve heard discussion about having something that could edit time ranges and such, so Iâve attempted to split this in a way that multiple areas in Blender can use it to show time ranges in the future possibly, such as a tool that shows the active FCurve modifierâs time range in the graph editor for easier and more visual editing.
TimeRangeHandle
-
frame
: The frame value of the handle. -
select
: Whether or not the handle is selected.
TimeRange
I was thinking of calling it TimelineTimeSelection at first, TimeRange would probably be a more apt name, since it could be applied to more things than just selecting a portion of time in the timeline.
-
handles
: A read-only collection of 4TimeRangeHandle
s. -
start
: Read-only value for where the range starts, for convenience. Could be moved to the scene data instead. As only the scene time selection will really need this, if at all.
-
end
: Similar to above.
Now putting this all together as a selection of time usable in the scene.
scene
-
use_selected_time_influence
: User toggle that operators can get to change their behaviour.
scene.selected_time_range or context.selected_time_range
-
range
: A pointer property ofTimeRange
. -
is_enabled
orhas_selection
: Read-only value that should be set to True when range.start != range.end, for convienience. Probably unneeded.
-
falloff_start_interpolation_mode
: The type of interpolation the left falloff should use.
-
falloff_end_interpolation_mode
: Same as above for the right.
-
falloff_start_easing_type
: The type of easing to use for the left side.
-
falloff_end_easing_type
: Same as above for the right.
-
evaluate_frame_influence
: A functionfunc(float frame)
that returns how much influence that frame/step should have. This should also apply easing and interpolation. Will be useful for when an operator is applying an offset or values to animation data between the range.
Here is an add-on I made to show off how it could function, with the hotkeys and such. It should in no way represent an actual implementation in C code.
Hereâs a video showing off how it the add-on functions, and itâs preference options.
It needs some polishing to adhere to Blenderâs standards, but I think itâs overkill to try to re-implement Blenderâs standards in to a prototype. Would be better spent getting the UI down then implementing the functionality in C in my opinion.
simplescreenrecorder-2020-11-04_23.11.49