[Bf-committers] Change Representation and Initialisation of Matrices to Conform with Standard Notation

Campbell Barton ideasman42 at gmail.com
Fri Dec 9 22:21:37 CET 2011

slice works in the patch,
matrix = matrix[0:2]
... would be become the same as...
matrix = matrix.transposed()[0:2]

matrix[2][:3] can  be replaced with

# for getting ...
location = matrix.to_translation()

# for setting (unless we add a method) ...
matrix[0][2], matrix[1][2], matrix[2][2] = location

On Sat, Dec 10, 2011 at 4:38 AM, Dima Glibitsky <dima.glib at gmail.com> wrote:
> By the way, how slices would be handled in this case?
> If I recall correctly, currently you can write e.g. matrix[0] to get a
> 4-vector of X-axis of transform matrix, or e.g. matrix[2][:3] to get
> 3D-vector of Z-axis.
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers

- Campbell

More information about the Bf-committers mailing list