テンプレート:Release Notes/2.46/Python/API
目次
Blender
- Added "mipmap" and "compressfile" as an option for Blender.Get/Set
- Blender.SaveUndoState()
- Blender.GetPaths( absolute=0 ) returns a list of files this blend file uses: (libraries, images, sounds, fonts, sequencer movies etc).
Object
- Scriptlinks for ObjectUpdate and ObDataUpdate events, So python scripts can run whenever an object is changed or its data is changed.
- object.matrixParentInverse
- object.dupliFaceScale object.dupliFaceScale
- Added support for python keyframing object layers
- Read access to Track and Up axis attributes for Object.
- Added an optional argument for object.getBoundBox(worldspace) - so you can get localspace boundboxes, this is useful when getting a dipli's boundbox where the objects worldspace matrix has no useful meaning.
Mesh
- mesh.renderColorLayer and mesh.renderUVLayer
- Smooth keyword for new faces: mesh.faces.extend([..., smooth=True)]
- Added a keyword argument for mesh.pointInside(point, selected_only=True)
This means only selected faces are tested when doing the inside/outside test, disabled by default. - mesh.addMultiresLevel()
- mesh.getTangents()
Armature
- LayerMask access for Armatures and Bones and PoseBones
- Enabled setting the pose_bone.poseMatrix, this does not set the matrix directly, only the pose bones loc/size/rot, when dealing with an armature without constraints this works as expected. it uses the same code as Copy Visual Loc/Size/Rot. (Useful for baking animation)
Image
- image.updateDisplay() to update display image from floating point image.
- Python access to high color depth's getPixelHDR & setPixelHDR()
Material
- Added fromDupli and fromOrig MTex boolean setting.
- Access to TEXFACE_ALPHA option.
- gloss settings: glossMir, sampGlossMir, glossTra, sampGlossTra
NLA
Curve
- Made it possible to remove curves from python with "del curve[i"]
- CurNurb.smooth addition.
- knot vector access for SurfNurb
Window
- Window.TestBreak() - True if the user pressed escape.
- Window.ViewLayers() so you can set the layer for each viewport.
- Window.GetPivot() and Window.SetPivot()
- Window.PoseMode() read only check for posemode
Texture
- texture.evaluate can now accept tuples of numbers as well as vectors.
- Added support for texture flags TEX_PRV_ALPHA, TEX_REPEAT_XMIR and TEX_REPEAT_YMIR to tex.flags attribute.
Draw
Geometry
Modifier
Lamp
BGL
Sys
Scene
Scene.Render
- Access to Bake functionality, api access and for automated baking.
- This adds fractional FPS support to blender and should finally
make NTSC work correctly.
NTSC has an FPS of 30.0/1.001 which is approximately 29.97 FPS.
Therefore, it is not enough to simply make frs_sec a float, since you can't represent this accurately enough.
I added a separate variable frs_sec_base and FPS is now. frs_sec / fpsBase - Api access for OpenEXR settings
scene.render.halfFloat, scene.render.zbuf and scene.render.preview - scene.render.touch and scene.render.noOverwrite
- scene.render.getFrameFilename() to get the filename of the image that will be rendered.
- Added the MULTILAYER image type.
PyNodes
- http://wiki.blender.org/index.php/BlenderDev/PyNodes
- http://wiki.blender.org/index.php/BlenderDev/PyNodes/API
PyConstraints
- (no docs for this new api yet)