Animation: Sensible frame range for motion paths

Motion paths can now be initialised to more sensible frame ranges,
rather than simply 1-250:

- Scene Frame Range
- Selected Keyframes
- All Keyframes

The Motion Paths operators are now also added to the Object context menu
and the Dopesheet context menu.

The scene range operator was removed, because the operators now
automatically find the range when baking the motion paths.

The clear operator now appears separated in "Selected Only" and "All",
because it was not clear for the user what the button was doing.

Reviewed By: sybren, looch

Maniphest Tasks: T93047

Differential Revision: https://developer.blender.org/D13687
This commit is contained in:
Colin Marmont
2022-02-28 12:23:56 +01:00
committed by Sybren A. Stüvel
parent 6f23401e98
commit 1558b270e9
18 changed files with 296 additions and 164 deletions

View File

@@ -1089,6 +1089,15 @@ void animviz_calc_motionpaths(struct Depsgraph *depsgraph,
eAnimvizCalcRange range,
bool restore);
/**
* Update motion path computation range (in ob.avs or armature.avs) from user choice in
* ob.avs.path_range or arm.avs.path_range, depending on active user mode.
*
* @param ob: Object to compute range for (must be provided)
* @param scene: Used when scene range is choosen
*/
void animviz_motionpath_compute_range(struct Object *ob, struct Scene *scene);
/**
* Get list of motion paths to be baked for the given object.
* - assumes the given list is ready to be used.