1
$\begingroup$

From this question I learned about using frame_range to get start/end frames from actions.

Using it in a custom script I came across some behaviour that I can't explain, I have two actions, one with a single frame, the other with 8, outputting their frame_range results in:

Idle: <Vector (0.0000, 1.0000)>
Walk: <Vector (0.0000, 7.0000)>

The first range is exclusive and the second one is inclusive. All the docs say is

frame_range

The final frame range of all F-Curves within this action Type: float array of 2 items in [-inf, inf], default (0.0, 0.0), (readonly)

I'm confused, how should I interpret the results of frame_range?

$\endgroup$
  • $\begingroup$ My guess is that Action.frame_range when used elsewhere needs a length, for fcurve modifiers the NLA., hence single frame actions are given the length of 1, by adding one to start frame as end frame, by default. $\endgroup$ – batFINGER Dec 26 '17 at 5:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.