alembic/cask

get_value() by frame has integer div truncation

Closed this issue · 4 comments

We're (me and @mdecaria) playing round with cask at the office right now, and I noticed what looks like an edge case in get_sample, which seems to be from __get_sample_index under the hood.

Basically, the default Archive constructor sets an fps of (int) 24 which is used as the divisor in __get_sample_index, so the getNearIndex call will be fed steppy numbers from the integer division.

Not sure if it's just us or the function is working as intended (the simple fix was to set the archive fps to 24.0) so I've thrown in a bit of a trivial PR for it since it looks like the rest of functions that rely on archive.fps have a float wrapper

Does the latest commit (8d50836) fix this for you?

Looks good, will pull and cross check at the office this week and let you know, thanks!

Yep, all good!

Great, thanks for testing!