View Single Post
  #2  
Old 08-14-2020, 06:57 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
Here's an example using a task function that should capture an object before and after removing it:

Code:
import viz
import viztask

viz.go()

dojo = viz.addChild('dojo.osgb')
ball = viz.addChild('beachball.osgb', pos=[0,1.8,2])

def screenCaptureTask():
	viz.window.screenCapture('Before.png')
	yield viztask.waitFrame(1)
	ball.remove()
	viz.window.screenCapture('After.png')

viztask.schedule( screenCaptureTask() )
Reply With Quote