added Image.SetCurrent(img) and img.has_data so you can see if an image contains pixel info.

This commit is contained in:
Campbell Barton
2006-09-16 06:18:41 +00:00
parent 9932322fa8
commit 2b7f09b8ea
2 changed files with 47 additions and 4 deletions

View File

@@ -65,6 +65,16 @@ def GetCurrent ():
@return: The Current Blender Image, If there is no current image it returns None.
"""
def SetCurrent (image):
"""
Set the currently displayed Image from Blenders UV/Image window.
When multiple images are displayed, the last active UV/Image windows image is used.
@type image: Blender Image
@param image: The image to display in the image view.
@rtype: bool
@return: True if the current image could be set, if no window was available, it will be set to False.
"""
class Image:
"""
The Image object
@@ -83,6 +93,7 @@ class Image:
@ivar end: Texture's animation end frame [0, 128].
@ivar speed: Texture's animation speed [1, 100].
@ivar packed: Boolean, True when the Texture is packed (readonly).
@ivar has_data: Boolean, True when the image has pixel data (readonly).
@ivar bindcode: Texture's bind code (readonly).
"""