Notifications
Clear all

[Closed] UVanimation isues

I have a script attaching animation frames from an array to bitmap:

animate on (
 for f in frames do (
at time f[1] (
  bmap.coords.U_offset = f[2]
  bmap.coords.V_offset = f[3]
  bmap.coords.W_Angle = f[4]
  )
 )
)

bmap is the bitmap an frames is the array, which looks something like this:

frames=#()
and every element of that array look like this:
frame=#(time, uOffset, vOffset, wRotation)

There is also a script to write the animation frames from bitmap back to an array:

keysCount = bmap.coords.U_offset.keys.count
writeFrames = for i=1 to keysCount collect (#( bmap.coords.U_offset.keys[i].time, bmap.coords.U_offset.keys[i].value, bmap.coords.V_offset.keys[i].value, bmap.coords.W_Angle.keys[i].value))

They guy, who wrote that scripts told me, that the second script, worcks fine for reexporting frames imported with first script, but in general there could be any arbitrary or zero keys, so I would like to modify the second script to worck with general case. Unfortunately my maxscript knowledge is very low and when tallking about animation just 0.

That  inside the code should be ‘)’.

2 Replies

So is there a general way to write UVanimation to an array?

Any answer?