View Single Post
  #2  
Old 01-26-2009, 05:46 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
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()
Reply With Quote