Vizard 8 » Command Index » Vizard modules » viz » <viz>.setTheme
8.0

<viz>.setTheme

Changes or sets the theme.

<viz>.setTheme(  
theme  
notify = True  
node = None  
)  
theme
notify = True
Setting this to false will only set the default for future nodes and will not change all current nodes to this theme.

The default value will change all current nodes to this theme as well as set the default for all future nodes to this theme.
node = None
If a node is passed in this will only set the theme for that node and will not change the global default theme.

Remarks

Return Value

None

Example

original = viz.getTheme()
blackTheme = viz.Theme()
blackTheme.borderColor = (0.1,0.1,0.1,1)
blackTheme.backColor = (0.4,0.4,0.4,1)
blackTheme.lightBackColor = (0.6,0.6,0.6,1)
blackTheme.darkBackColor = (0.2,0.2,0.2,1)
blackTheme.highBackColor = (0.2,0.2,0.2,1)
object0 = viz.addProgressBar('Changed to black.')
object0.setPosition([.5,.3,0])
viz.setTheme(blackTheme) #Changes all current nodes to this theme
object = viz.addProgressBar('Changed to original')
object.setPosition([.5,.5,0])
viz.setTheme(original,True,object) #Changes the theme for object
object2 = viz.addProgressBar('Created black.')
object2.setPosition([.5,.6,0])

See also

<viz>.getTheme
<node3d:GUI>.setTheme