View Single Post
  #3  
Old 09-05-2012, 12:17 PM
shivanangel shivanangel is offline
Member
 
Join Date: Feb 2006
Location: New Jersey
Posts: 182
Sorry, forgot to include that class as well.
Here is a super class of GreenObject called Model3D which derives
from viz.VizNode

Code:
class Model3D(viz.VizNode):
	
	GORM = None
	
	def __init__(self, string):
		
		#Typical string entry
		if type(string) == str:
			base = viz.add(string)
			viz.VizNode.__init__(self, base.id)
				
		#Use for on-the-fly creation in Vizard
		elif isinstance(string, viz.VizNode):
			base = string
			viz.VizNode.__init__(self, base.id)
				
		elif isinstance(string, int): #We are dealing with a copy that has passed in an id number
			viz.VizNode.__init__(self, string)
			
		
		else:
			print 'Copy type', string, type(string)
Reply With Quote