Dev:Ref/Release Notes/2.40/addons

提供: wiki
移動先: 案内検索

<section begin=2.40-Game Engine-Python API />

API and Modules changed

Armature - complete overhaul - see docs

BezTriple - code cleanup and bug fixes

BGL - code cleanup

Blender - code cleanup

Bone - complete overhaul - see docs

Build - removed

constant - complete overhaul

CurNurb - code cleanup and bug fixes

Curve - added functions getKey, getTaperOb, setTaberOb

Draw - code cleanup

Effect - major over haul and additions

euler - rotate, nds, setattr, richcmpr, slicing, cleanup

gen_utils - FlaotsAreEqual, VectorsAreEqual, GetModuleConstant, intError, objError, incr2, incr3, decr2, decr2, setFloatClamped, setIvalueClamped, setFloatRange, setIValueRange, setModuleConstant, getBitfield, setBitfield, setterWrapper, setterWrapperTuple, dict-set_item_str

Image - GetCurrent, New, getPixelI, setPixelF, setPixelI, getMinXY, save, getStart, getEnd, getSpeed, setStart, setEnd, setSpeed

Ipo - cleanup

Ipocurve - getDriver, setDriver, getDriverObject, setDriverObject, getDriverChannel, setDriverChannel, getseters, improved Init, removed setPoints

Key - New module

Lamp - setComponent, getTypesConst, getModesConst, getComponent, getUsers, getsetters, removed setIpo, (ask about deprecated...)

Lattice - getKey

Library - cleanup

Material - getseters, getColorComponent, getOopsLoc, getOopsSel, setOopsLoc, setOopsSel, getUsers

Mathutils - major overhaul see below

matrix - len, item, ass_item, slice, coerce

Mesh - new module

Metaball - clean up

MTex - getsetters

NLA.c - minimal changes (shouldn't this have a major update??)

NMesh - getKey, nmedge_from_index,nmvert_from_float, nmface_from_index, correctFaceIndex, new_NMesh_displist, removed addEdgesData (edges are always present now)

Object - getParentBoneName, makeParentDeform, makeParentVertex, getEffects, updateDag, add the

following attributes - DupSta, DupEnd, DupOn, DupOff, Dupliframes, effects, users, protectFlags, removed functions getSBEnable, setSBEnable, getSBPostDef, setSBPostDef

Particle - New, Get, getType, setType, getFlag, setFlag, getsta, setSta, getEnd, setEnd, getLifetime, setLifetime, getNormfac, setNormfac, getObfac, setObfac, getRandfac, setRandfac, getTexfac, setTexfac, getRandlife, setRandlife, getNabla, setNabla, getVectsize, setVecSize, getTotpart, setTotpart, getTotkey, setTotkey, getSeed, setSeed, getForce, setForce, getMut, setMult, getLife, setLife, getMat, setMat, getChild, setChild, getDefvec, setDefvec

point - new module

quat - getsetter, repr (print self) richcmpr, len,

item, coerce - major improvements in robustness and

automatic type conversion

rgbTuple - cleanup

Scene - getTimeLine

sceneRender - SaveRenderedImage added HDR type

sceneTimeLine - new module

Text3d - code cleanup

Texture - getsetters, compare, ProjDict, NoiseDict,

BlendModesDict, MappingsDict

Types - Mesh_Type, MFace_Type, MVert_Type, PVert-Type,

MEdge_Type, MCol_Type, point_type, remove Build_Type,

Particle_Type

vector - toPoint, toTrackQuat

Wave - removed

windowTheme - lamp, textfield_hi


Scripts

  • added - 3ds_import, 3ds_export, md2_export, md2_import, XSI_export
  • updated - ac3d_import, ac3d_export, bevel_center, bvh2arm, bvh_import, console, DirectX8Exporter, discombobulator, disp_paint, hotkeys, lightwave_export, lightwave_import, obj_export, obj_import, rvk1_torvk2, skin, tex2uvbaker, uv_export, wings_export, wings_import

Mathutils

   - clean up of uninitialized variables & removal of unneccessary objects
   - NMesh returns wrapped vectors now
   - World returns wrapped matrices now
   - Object.getEuler() and Object.getBoundingBox() return Wrapped data when data is present
   - Object.getMatrix() returns wrapped data if it's worldspace, 'localspace' returns a new matrix
   - Vector, Euler, Mat, Quat, call all now internally wrap object without destroying internal datablocks
   - Vector's resize methods are only applicable to new vectors not wrapped data.
   - Matrix(), Quat(), Euler(), Vector() now accepts ANY sequence list, including tuples, list,
   or a self object to copy - matrices accept multiple sequences
   - Fixed Slerp() so that it now works correctly values are clamped between 0 and 1
   - Euler.rotate does internal rotation now
   - Slice assignment now works better for all types
   - Vector * Vector and Quat * Quat are defined and return the DOT product
   - Mat * Vec and Vec * Mat are defined now
   - matrix.toQuat() and .toEuler() now fixed take appropriate matrix sizes
   - Matrix() with no parameters now returns an identity matrix by default not a zero matrix
   - printf() now prints with 6 digits instead of 4
   - printf() now prints output with object descriptor
   - Matrices now support [x][y] assignment (e.g. matrix[x][y] = 5.4)
   - Matrix[index] = value now expectes a sequence not an integer. This will now
   set a ROW of the matrix through a sequence.  index cannot go above the row
   size of the matrix.
   - slice operations on matrices work with sequences now (rows of the matrix) example:
   mymatrix[0:2] returns a list of 2 wrapped vectors with access to the matrix data.
   - slice assignment will no longer modify the data if the assignment operation fails
   - fixed error in matrix * scalar multiplication
   - euler.toMatrix(), toQuat() no longer causes "creep" from repeated use
   - Wrapped data will generate wrapped objects when toEuler(), toQuat(), toMatrix() is used
   - Quats can be created with angle/axis, axis/angle
   - 4x4 matrices can be multiplied by 3D vectors (by popular demand :))
   - vec *quat / quat * vec is now defined
   - vec.magnitude alias for vec.length
   - all self, internal methods return a pointer to self now so you can do print
   vector.internalmethod() or vector.internalmethod().nextmethod() 
   (no more print matrix.inverse() returning 'none')
   - added the ability to negate vectors/points with "-vec"
     * deprecated vector.negate()
   - added the ability to shorthand inverse matrices with "~mat" (tilde)
   - added some equivalency testing for vector classes
    >, >=, <, <= test vector magnitude
    ==, != test vector values 'within epsilon' :)
    Added some equvalency tests for the other math objects
   * ==, != are defined for matrix, quat, euler.
   - conversion between vector/point with toXXX() methods
   - intersection tests for lines
   - triangle area function
   - tracking quaternion from vector
   - some helpful normal calculators
   -fix for angleBetweenVecs
   * adds a test to check for zero-length vectors
   - these methods have been deprecated (still functioning but suggested to use
   the corrected functionality):
     * CopyVec() - replaced by Vector() functionality
     * CopyMat() - replaced by Matrix() functionality
     * CopyQuat() - replace by Quaternion() functionality
     * CopyEuler() - replaced by Euler() functionality
     * RotateEuler() - replaced by Euler.rotate() funtionality
     * MatMultVec() - replaced by matrix * vector
     * VecMultMat() - replaced by vector * matrix
   -  New struct containers references to python object data or internally allocated
   blender data for wrapping
   * Explaination here:  math structs now function as a 'simple wrapper' or a 'py_object' -
   data that is created  on the fly will now be a 'py_object' with its memory managed 
   by python otherwise if the data is returned by blender's G.main then the math object
   is a 'simple wrapper' and data can be accessed directly from the struct just like other
   python objects.

<section end=2.40-Game Engine-Python API />