From BlenderWiki

Jump to: navigation, search

This page is to list changes which effect script authors.

RNA

Since 2.56a

FCurve new function. renamed keyword argument, 35509

  • Action.fcurves.new(array_index="..."), array_index --> index

Object function api changes, r35527

  • Object.create_dupli_list() --> dupli_list_create()
  • Object.free_dupli_list() --> dupli_list_clear()
  • Object.create_mesh() --> to_mesh()

Misc attribute renaming changes from python naming collisions, r35764.

  • Particle.hair --> hair_keys
  • Particle.keys --> particle_keys
  • Key.keys --> key_blocks
  • EnumProperty.items --> enum_items
  • KeyMap.items --> keymap_items

rename mathutils methods r35989.

  • Vector.difference(other) --> rotation_difference
  • Quaternion.difference(other) --> rotation_difference

Mathutils

Since 2.49

Use radians rather then degrees

  • Mathutils.Vector/Euler/Quaternion(), now only take single sequence arguments.
  • Mathutils.MidpointVecs --> vector.lerp(other, fac)
  • Mathutils.AngleBetweenVecs --> vector.angle(other)
  • Mathutils.ProjectVecs --> vector.project(other)
  • Mathutils.DifferenceQuats --> quat.rotation_difference(other)
  • Mathutils.Slerp --> quat.slerp(other, fac)
  • Mathutils.Rand: removed, use pythons random module
  • Mathutils.RotationMatrix(angle, size, axis_flag, axis) --> Mathutils.RotationMatrix(angle, size, axis); merge axis & axis_flag args
  • Mathutils.OrthoProjectionMatrix(plane, size, axis) --> Mathutils.OrthoProjectionMatrix(axis, size); merge axis & plane args
  • Mathutils.ShearMatrix(plane, factor, size) --> Mathutils.ShearMatrix(plane, size, factor); swap size & factor args, match other constructors.
  • Matrix.rotationPart() -> to_3x3()
  • Matrix.scalePart() -> to_scale()
  • Matrix.translationPart() -> to_translation()
  • mathutils.Matrix.Shear(plane, fac, size), now takes a pair of floats for 3x3 or 4x4 shear factor.
  • toMatrix --> to_matrix
  • toEuler --> to_euler
  • toQuat --> to_quat
  • Vector.rotation_difference(other), Added
  • Vector.toTrackQuat --> Vector.to_track_quat
  • Vector.rotate(axis, angle) --> rotate(other), where other can be Euler/Quaternion/Matrix.
  • Quaternion * Quaternion --> cross product (not dot product)
  • Euler.rotate(angle, axis) --> Euler.rotate_axis(axis, angle)
  • Euler.unique() *removed*, not a standard function only toggled different rotations.
  • Matrix.resize4x4() -> resize_4x4()
  • Euler.to_quat() -> to_quaternion()
  • Matrix.to_quat() -> to_quaternion()

Resizing nolonger returns the resized value.

  • Vector.resize2D -> resize_2d
  • Vector.resize3D -> resize_3d
  • Vector.resize4D -> resize_4d

Added new functions.

  • Vector.to_2d()
  • Vector.to_3d()
  • Vector.to_4d()

Moved into class functions.

  • Mathutils.RotationMatrix -> mathutils.Matrix.Rotation
  • Mathutils.ScaleMatrix -> mathutils.Matrix.Scale
  • Mathutils.ShearMatrix -> mathutils.Matrix.Shear
  • Mathutils.TranslationMatrix -> mathutils.Matrix.Translation
  • Mathutils.OrthoProjectionMatrix -> mathutils.Matrix.OrthoProjection

Moved to Geometry module: Intersect, TriangleArea, TriangleNormal, QuadNormal, LineIntersect

  • geometry.Intersect -> intersect_ray_tri
  • geometry.ClosestPointOnLine -> intersect_point_line
  • geometry.PointInTriangle2D -> intersect_point_tri_2d
  • geometry.PointInQuad2D -> intersect_point_quad_2d
  • geometry.LineIntersect -> intersect_line_line
  • geometry.LineIntersect2D -> intersect_line_line_2d
  • geometry.BezierInterp -> interpolate_bezier
  • geometry.TriangleArea -> area_tri
  • geometry.QuadNormal, TriangleNormal -> normal
  • geometry.PolyFill -> tesselate_polygon
  • geometry.BoxPack2D -> box_pack_2d
  • geometry.BarycentricTransform -> barycentric_transform