Fix #135523: Calculate Motion Paths ignores Selected Keys option

Since the switch to slotted actions, we cannot solely rely on the
Listbase of `curves` (this is for legacy actions only), but need to
consider Channelbag for new slotted actions. There is
`assigned_action_has_keyframes` that handles both of these
and would also early out if we have no keyframes to process,
so use it.

Pull Request: https://projects.blender.org/blender/blender/pulls/135566
This commit is contained in:
Philipp Oeser
2025-03-07 08:35:17 +01:00
committed by Philipp Oeser
parent cf95ff1a6e
commit d18fe0c575
@@ -364,7 +364,7 @@ void animviz_motionpath_compute_range(Object *ob, Scene *scene)
const bool has_action = ob->adt && ob->adt->action;
if (avs->path_range == MOTIONPATH_RANGE_SCENE || !has_action ||
BLI_listbase_is_empty(&ob->adt->action->curves))
!blender::animrig::legacy::assigned_action_has_keyframes(ob->adt))
{
/* Default to the scene (preview) range if there is no animation data to
* find selected keys in. */