View Single Post
  #2  
Old 03-18-2009, 12:07 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,466
Use the viz.ACTION_END_EVENT to notify you that the action has completed on your object and then within your callback function use <node3D>.remove() to permanently remove the object from the scene.
Code:
import viz
viz.go()

spin = vizact.spin(0,1,0,90,5)

ball = viz.add('ball.wrl',pos=(0,1.8,2))
ball.addAction(spin)

def onActionEnd(e):
	if e.object is ball and e.action is spin:
		ball.remove()
		print 'Ball is removed'

viz.callback(viz.ACTION_END_EVENT,onActionEnd)
Reply With Quote