Quantcast
Channel: eX-SI » arrays
Viewing all articles
Browse latest Browse all 20

ICE: Building an array from an fcurve

$
0
0

Suppose you have an animated scalar value, and you want to store its values as you play through a simulation. And suppose you also want to keep a running total of all the values up to the current frame.

My first try used two arrays: one to store the values at each step through the simulation, and one to hold the running total.
FcurveArray1

Calculating the array sum at every step seems wasteful. So, here’s my second try at keeping a running total of the values from the fcurve. I use just one attribute and one array. The attribute was necessary because if I plugged Pop from Array directly into Add, I got nothing.
FcurveArray2



Viewing all articles
Browse latest Browse all 20

Trending Articles