Animating Color / Material for a Cylinder

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

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Anubis's picture

Thanks for your compliment,

Thanks for your compliment, Michele! :)

my recent MAXScripts RSS (archive here)

Michele71's picture

""...but I have prepared an

""...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! ;)

Anubis's picture

I do not know exactly what

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.

my recent MAXScripts RSS (archive here)

RapBoyX's picture

Thank you ! it was helpful.

Thank you ! it was helpful.

Anubis's picture

Wirecolor is not animatable,

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

my recent MAXScripts RSS (archive here)

RapBoyX's picture

I saw it but I didn't

I saw it but I didn't understand how to do it in code - if you can give me a small example.

Michele71's picture

Hi RapBoyX! Try

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.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.