PDA

View Full Version : Changing the Color of On-the-Fly Objects


vjosh
01-02-2005, 10:52 PM
Hey,

The vertexcolor function allows you to determine the color of on-the-fly objects when you create them, but is there any way to change the color of already existing on-the-fly objects? The <node3d>.color method doesn't seem to apply.

Thanks!

-Josh

farshizzo
01-05-2005, 12:48 AM
Hi,

Once you have created an on-the-fly object you can change each vertex color individually using the <node3d>.vertexcolor command. So to change the color of the every vertex you could do something similar to the following:object = viz.endlayer()
for v in range(NumberOfVertices):
object.vertexcolor(v,newcolor)The next update to Vizard should allow you to use the <node3d>.color command to change the color of the entire on-the-fly object