BPython:
- Blender.Window: added function GetPerspMatrix() (Tom Musgrave's patch, thanks); - added Chris Want's patch to tell argc, argv to the Python interpreter (thanks, Hos); - Blender.Image: added image.glFree() to free textures bound by the recently added image.glLoad() (both suggested by Campbell Barton -- thanks, with these Blender can be used to load textures for scripts); - Blender.Sound: removed for now at least a few get/set methods of vars that can't be accessed via interface; - renamed Get/makeActive to Get/setCurrent in Blender.World (actually added alias for now), same in Blender.Sound: renamed makeActive to setCurrent. Stephen Swaney pointed this some weeks ago, we should stick to one naming convention. - added documentation for Sound and Window.Theme modules and the other added functions, made other small updates. - Blender.Object: made 'worldspace' become the default output of .getMatrix and .mat/.matrix: after reading a discussion on blender.org's Python forum where eeshlo mentioned the pre 2.34 default was worldspace, I took a better look at Blender's relevant code, confirmed, talked to Theeth about this and as he suggested am changing the default back to 'worldspace'.
This commit is contained in:
@@ -6,7 +6,7 @@ The Blender.Image submodule.
|
||||
Image
|
||||
=====
|
||||
|
||||
B{New}: L{Image.reload}, L{Image.getBindCode}.
|
||||
B{New}: L{Image.glLoad}, L{Image.glFree}.
|
||||
|
||||
This module provides access to B{Image} objects in Blender.
|
||||
|
||||
@@ -110,8 +110,8 @@ class Image:
|
||||
|
||||
def getBindCode():
|
||||
"""
|
||||
Get the Image's bindcode. This is for texture loading using BGL calls,
|
||||
see for example L{BGL.glBindTexture}.
|
||||
Get the Image's bindcode. This is for texture loading using BGL calls.
|
||||
See, for example, L{BGL.glBindTexture} and L{glLoad}.
|
||||
@rtype: int
|
||||
"""
|
||||
|
||||
@@ -125,6 +125,29 @@ class Image:
|
||||
@returns: None
|
||||
"""
|
||||
|
||||
def glLoad():
|
||||
"""
|
||||
Load this image's data into OpenGL texture memory, if it is not already
|
||||
loaded (image.bindcode is 0 if it is not loaded yet).
|
||||
@note: Usually you don't need to call this method. It is only necessary
|
||||
if you want to draw textured objects in the Scripts window and the
|
||||
image's bind code is zero at that moment, otherwise Blender itself can
|
||||
take care of binding / unbinding textures. Calling this method for an
|
||||
image with nonzero bind code simply returns the image's bind code value
|
||||
(see L{getBindCode}).
|
||||
@rtype: int
|
||||
@returns: the texture's bind code.
|
||||
"""
|
||||
|
||||
def glFree():
|
||||
"""
|
||||
Delete this image's data from OpenGL texture memory, only (the image itself
|
||||
is not removed from Blender's memory). Internally, glDeleteTextures (see
|
||||
L{BGL.glDeleteTextures}) is used, but this method also updates Blender's
|
||||
Image object so that its bind code is set to 0. See also L{Image.glLoad},
|
||||
L{Image.getBindCode}.
|
||||
"""
|
||||
|
||||
def setName(name):
|
||||
"""
|
||||
Set the name of this Image object.
|
||||
|
||||
Reference in New Issue
Block a user