「Dev:Ref/Release Notes/2.62/Python」の版間の差分

提供: wiki
移動先: 案内検索
 
(1版 をインポートしました)
 
(相違点なし)

2018年6月29日 (金) 05:44時点における最新版

Blender 2.62: Python

Math

Matrix indexing was changed to conform to standard notation, so that it is mat[row][column] rather than mat[column][row]. This breaks compatibility for existing scripts, details on how to update here. - r42816

  • Matrices now have row and col attributes for accessing rows and columns, e.g. mat.col[2] gives the second column. - r42858
  • Better formatting when printing matrices and other math data types - r42748, r42751
  • Matrix.translation added, to access the translation component of a 4x4 matrix - r42813
  • Remove Matrix.row_size and Matrix.col_size, use len(mat.row) and len(mat.col) instead - r42989
  • Add Matrix.Identity() class method, to create an identity matrix of a specific size without having to specify all the values in the matrix - r43658
  • Support for arbitrary sized vectors (was limited to 2,3,4 previously) - r42702

Presets

Presets can now be stored in XML, which has the advantages: - r43260

  • Missing attributes are ignored and don't error out like they would on a script when the API changes.
  • Don't run code (secure to run from untrusted sources).

Addons can now add a presets directory in their directory, and it will be found by the presets system. - r42993

Other

  • Add bpy collection method .find(key), so you can get the index of an item in a collection, -1 if not found. - r43152
  • Expose sensor.controllers and controller.actuators - r43510