[Bf-committers] Patch 18678: Swizzle properties for Mathutils.Vector

Alex Fraser alex at phatcore.com
Sun May 3 14:19:14 CEST 2009


Here's a patch that adds swizzling to vectors. It's as fun as it sounds!

| Allows access to elements of vectors in any order. The getter
functions all return a Vector object with the new arrangement
| of axes. For example:
|     vec = Mathutils.Vector([1,2,3])
|     print vec.zxy
|     # prints "[3.000000, 1.000000, 2.000000](vector)"

Tests and other feedback welcome (there's a unit test file attached to
the tracker too). Could someone with big-endian hardware please test
it? :)


More information about the Bf-committers mailing list