I have this weird problem: I'm trying to animate 16 cylinders (material animation). I wrote this code:
mm = multimaterial numsubs:13;
mm.name = "Light Anim"
meditMaterials[1] = mm;
mm[1]=meditMaterials[7];
-- I declared up to the 13th Material.
mm[13]=meditMaterials[23];
colors = #(4,5,6,7,8,9,10,11,12,13,4,5,6,7,8,9);
-- After creating and chaning positions of the cylinders
-- and giving them their initial materials
for m=1 to 16 do
(
animate on at time (m*50)
cylinders[m].modifiers[#MaterialMod].materialID = 2;
)
After this code I find that the cylinders change colors by a weird way - like the colors are swapped somehow.
Is this the right way for animating the elements ?
I tried to use some lock keys but I didn't help...
Anubis · 2009-09-09