*** empty log message ***

This commit is contained in:
Joe Shochet 2001-03-02 04:03:31 +00:00
parent 4fe070688b
commit 4e636e6d38
1 changed files with 12 additions and 2 deletions

View File

@ -17,7 +17,7 @@ import AngularEulerIntegrator
import ClockObject
import Transitions
import Loader
import time
globalClock = ClockObject.ClockObject.getGlobalClock()
@ -396,7 +396,17 @@ class ShowBase:
self.oobeVis.reparentTo(self.camera)
self.oobeMode = 1
def screenshot(self, namePrefix='screenshot'):
# Get the current date and time to uniquify the image (down to the second)
date = time.ctime(time.time())
# Get the current frame count to uniqify it even more
frameCount = globalClock.getFrameCount()
# Replace spaces with dashes because unix does not like spaces in the filename
date = date.replace(' ', '-')
date = date.replace(':', '-')
imageName = (namePrefix + '-' + date + '-' + str(frameCount) + '.pnm')
self.notify.info("Taking screenshot: " + imageName)
takeSnapshot(self.win, imageName)
def run(self):
self.taskMgr.run()