mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
return filename from base.screenshot(), etc.
This commit is contained in:
parent
0b93deaa03
commit
2b1941a12b
@ -1677,7 +1677,11 @@ class ShowBase(DirectObject.DirectObject):
|
|||||||
makeTextureBuffer() or makeCubeMap(), the parameter toRam
|
makeTextureBuffer() or makeCubeMap(), the parameter toRam
|
||||||
should have been set true). If it is a cube map texture as
|
should have been set true). If it is a cube map texture as
|
||||||
generated by makeCubeMap(), namePrefix should contain the hash
|
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:
|
if source == None:
|
||||||
source = self.win
|
source = self.win
|
||||||
@ -1695,10 +1699,12 @@ class ShowBase(DirectObject.DirectObject):
|
|||||||
else:
|
else:
|
||||||
saved = source.saveScreenshot(filename, imageComment)
|
saved = source.saveScreenshot(filename, imageComment)
|
||||||
|
|
||||||
# Announce to anybody that a screenshot has been taken
|
if saved:
|
||||||
messenger.send('screenshot', [filename])
|
# 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',
|
def saveCubeMap(self, namePrefix = 'cube_map_#.png',
|
||||||
defaultFilename = 0, source = None,
|
defaultFilename = 0, source = None,
|
||||||
@ -1716,7 +1722,11 @@ class ShowBase(DirectObject.DirectObject):
|
|||||||
|
|
||||||
camera should be the node to which the cubemap cameras will be
|
camera should be the node to which the cubemap cameras will be
|
||||||
parented. The default is the camera associated with source,
|
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:
|
if source == None:
|
||||||
source = base.win
|
source = base.win
|
||||||
@ -1770,6 +1780,9 @@ class ShowBase(DirectObject.DirectObject):
|
|||||||
often preferable to cube maps because they require only a
|
often preferable to cube maps because they require only a
|
||||||
single texture and because they are supported on a broader
|
single texture and because they are supported on a broader
|
||||||
range of hardware.
|
range of hardware.
|
||||||
|
|
||||||
|
The return value is the filename if successful, or None if
|
||||||
|
there is a problem.
|
||||||
"""
|
"""
|
||||||
if source == None:
|
if source == None:
|
||||||
source = base.win
|
source = base.win
|
||||||
|
Loading…
x
Reference in New Issue
Block a user