diff --git a/direct/src/showbase/ShowBase.py b/direct/src/showbase/ShowBase.py index d3c569b5af..47ac83ae96 100644 --- a/direct/src/showbase/ShowBase.py +++ b/direct/src/showbase/ShowBase.py @@ -1677,7 +1677,11 @@ class ShowBase(DirectObject.DirectObject): makeTextureBuffer() or makeCubeMap(), the parameter toRam should have been set true). If it is a cube map texture as generated by makeCubeMap(), namePrefix should contain the hash - mark ('#') character. """ + mark ('#') character. + + The return value is the filename if successful, or None if + there is a problem. + """ if source == None: source = self.win @@ -1695,10 +1699,12 @@ class ShowBase(DirectObject.DirectObject): else: saved = source.saveScreenshot(filename, imageComment) - # Announce to anybody that a screenshot has been taken - messenger.send('screenshot', [filename]) + if saved: + # Announce to anybody that a screenshot has been taken + messenger.send('screenshot', [filename]) + return filename - return saved + return None def saveCubeMap(self, namePrefix = 'cube_map_#.png', defaultFilename = 0, source = None, @@ -1716,7 +1722,11 @@ class ShowBase(DirectObject.DirectObject): camera should be the node to which the cubemap cameras will be parented. The default is the camera associated with source, - if source is a DisplayRegion, or base.camera otherwise.""" + if source is a DisplayRegion, or base.camera otherwise. + + The return value is the filename if successful, or None if + there is a problem. + """ if source == None: source = base.win @@ -1770,6 +1780,9 @@ class ShowBase(DirectObject.DirectObject): often preferable to cube maps because they require only a single texture and because they are supported on a broader range of hardware. + + The return value is the filename if successful, or None if + there is a problem. """ if source == None: source = base.win