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:
@@ -3,7 +3,8 @@
|
||||
"""
|
||||
The Blender.Object submodule
|
||||
|
||||
B{New}: 'oldlocal' parameter in L{Object.Object.getMatrix}.
|
||||
B{New}: 'old_worldspace' parameter in L{Object.Object.getMatrix}, which now
|
||||
defaults to 'worldspace'.
|
||||
|
||||
Object
|
||||
======
|
||||
@@ -146,7 +147,7 @@ class Object:
|
||||
@cvar data: The data of the object. (Read-only)
|
||||
@cvar ipo: The ipo data associated with the object. (Read-only)
|
||||
@cvar mat: The matrix of the object relative to its parent. (Read-only)
|
||||
@cvar matrix: The matrix of the object relative to its parent. (Read-only)
|
||||
@cvar matrix: The matrix of the object in world space. (Read-only)
|
||||
@cvar matrixLocal: The matrix of the object relative to its parent. (Read-only)
|
||||
@cvar matrixWorld: The matrix of the object in world space. (Read-only)
|
||||
@cvar colbits: The Material usage mask. A set bit #n means: the Material
|
||||
@@ -287,17 +288,17 @@ class Object:
|
||||
@return: list of Material Objects assigned to the object.
|
||||
"""
|
||||
|
||||
def getMatrix(space = 'localspace'):
|
||||
def getMatrix(space = 'worldspace'):
|
||||
"""
|
||||
Returns the object matrix.
|
||||
@type space: string
|
||||
@param space: The desired matrix:
|
||||
- localspace (default): relative to the object's parent;
|
||||
- worldspace: absolute, taking vertex parents, tracking and ipo's into
|
||||
account;
|
||||
- oldlocal: old behavior, prior to Blender 2.34, where eventual changes
|
||||
made by the script itself were not taken into account until the
|
||||
script finished executing.
|
||||
- worldspace (default): absolute, taking vertex parents, tracking and
|
||||
ipo's into account;
|
||||
- localspace: relative to the object's parent;
|
||||
- old_worldspace: old behavior, prior to Blender 2.34, where eventual
|
||||
changes made by the script itself were not taken into account until
|
||||
a redraw happened, either called by the script or upon its exit.
|
||||
Returns the object matrix.
|
||||
@rtype: Py_Matrix
|
||||
@return: a python 4x4 matrix object
|
||||
|
||||
Reference in New Issue
Block a user