ScriptSpot home

Forum topic · General Scripting

Animating Color / Material for a Cylinder

By RapBoyX · 2009-08-18

Description

I'm trying to change the color/material of a cylinder , by doing:

cyl.wireColor = white

but it changes it from the beginning of the animation, how can I do that for only a given amount of frames ? - (and also for materials) !

Thanks

Comments (7)
Panayot Karabakalov

Thanks for your compliment, Michele! :)

Michele Marcelli

""...but I have prepared an example on my home page, which can help you. You can see the link into my account profile here or just click here to download the script...""

Beautiful home page, The entry of my favorites congratulations Anubis! ;)

Panayot Karabakalov

I do not know exactly what you want to do, but I have prepared an example on my home page, which can help you. You can see the link into my account profile here or just click here to download the script.

Panayot Karabakalov

Wirecolor is not animatable, but you can animate material.
See this forum topic: Change Material per frame

Michele Marcelli

Hi RapBoyX!

Try this:
----------------------------------------------------------
for t = animationrange.start to animationrange.end do
(
sliderTime = t
$.wireColor = random (color 0 0 0) (color 255 255 255)
)

----------------------------------------------------------
Create an animated object and evaluates the script. The object changes color every frame.