Question

I am trying to change the color of my 3D object in Blender. Is there any way to do it run time through actuators? Thanks in advance

Was it helpful?

Solution

You can use a python script to change the colour. Most likely you want to adjust the diffuse_color property of the material, which is an array of three numbers - [0]=red [1]=green [2]=blue.

While they don't show up in the action editor you can add keyframes to the colour components to create material actions and they will show up in action actuators list to play. To animate a colour you add a keyframe by right-clicking on the colour swatch and selecting Insert keyframe or press I while the mouse is over the colour swatch. Then move to another frame adjust the colour and set another keyframe.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top