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)
Having a selectable time range will drastically speed this up, here is a hacky implementation in python of this premise.
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
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.
- 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.
- 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.)
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.
frame: The frame value of the handle.
select: Whether or not the handle is selected.
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 4
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.
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 of
has_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 function
func(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.