WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Changing the Color of On-the-Fly Objects (https://forum.worldviz.com/showthread.php?t=262)

vjosh 01-02-2005 09:52 PM

Changing the Color of On-the-Fly Objects
 
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 .color method doesn't seem to apply.

Thanks!

-Josh

farshizzo 01-04-2005 11:48 PM

Hi,

Once you have created an on-the-fly object you can change each vertex color individually using the .vertexcolor command. So to change the color of the every vertex you could do something similar to the following:
Code:

object = viz.endlayer()
for v in range(NumberOfVertices):
        object.vertexcolor(v,newcolor)

The next update to Vizard should allow you to use the .color command to change the color of the entire on-the-fly object


All times are GMT -7. The time now is 10:34 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC