Closed via5 closed 3 years ago
Yeah the time and scrubber storables are legacy, I'd like to get rid of them (and I'm not sure about adding as many moving storables as there are animations). I was thinking of something like a "Publish animation storable" option that would make the time storable accessible for a given animation. The remaining time however I'm not sure. I'm not rejecting the idea but I'm uncomfortable with the new storable as it is. Let me sleep on it, see if I can find a way to solve what you're looking for without introducing more "current"-specific storables.
not sure about adding as many moving storables as there are animations
Just to clarify, my PR only introduces one storable.
This adds a new "Time Remaining" parameter which returns the time left in the first clip in the list that's playing. I couldn't find an easy way to get the current clip from
AtomAnimation
, but if I understand correctly, it's because there's no current clip, it's just that some haveplaybackEnabled
totrue
. I guess blending has multiple clips enabled simultaneously.In my case, I have no transitions, sequencing or looping, I just trigger discrete animations with the
Play anim X
action parameter and I want to know how much time is left in that animation.This PR's use case may be too narrow and it could have some performance penalties (it potentially loops on all clips in
Update()
), so I understand if you don't want to merge it.(By the way, "Allow edits by maintainers" seems to be enabled by default now on new PRs, which is why you could push on my repo last time.)