Dev:Ref/Release Notes/2.62/Python

提供: wiki
< Dev:Ref‎ | Release Notes‎ | 2.62
2018年6月29日 (金) 05:44時点におけるYamyam (トーク | 投稿記録)による版 (1版 をインポートしました)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
移動先: 案内検索

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