Here is a small example that uses the skydome plugin to show how to customize a plugin object. Usually you create your own Python module that specifies your class. In this example, create a file called
SkyDome.py and add the following code to it:
Code:
import viz
class SkyDomeClass(viz.VizCustomChild):
def myfunc(self):
self.command(1)
viz.upgradeCustomNode('skydome.dlc',SkyDomeClass)
def addSkyDome():
return viz.add('skydome.dlc')
The following code shows how to use your new module:
Code:
import viz
viz.go()
dome = addSkyDome()
dome.myfunc()