Blender Git Loki

Git Commits -> Revision 8a83aff

Revision 8a83aff by Campbell Barton (master)
May 3, 2009, 17:52 (GMT)
[#18678] Swizzle properties for Mathutils.Vector
patch from Alex Fraser (z0r)

eg.
- vec.xyz = vec.zyx
- vec.xy = vec.zw
- vec.xxy = vec.wzz
- vec.yzyz = vec.yxyx

See http://en.wikipedia.org/wiki/Swizzling_(computer_graphics)

made some minor modifications to this patch.

tested access times and adding 336 attributes to vectors doesn't make a noticeable differences to speed of existing axis attributes (x,y,z,w) - thanks to python dict lookups.

Commit Details:

Full Hash: 8a83aff9f56c5b8f8240847835578f1a23e2e9cf
SVN Revision: 20043
Parent Commit: 03a0770
Lines Changed: +347, -7

7 Modified Paths:

/source/blender/python/api2_2x/doc/Mathutils.py (+15, -2) (Diff)
/source/blender/python/api2_2x/Mathutils.c (+12, -3) (Diff)
/source/blender/python/api2_2x/Mathutils.h (+2, -0) (Diff)
/source/blender/python/api2_2x/vector.c (+309, -2) (Diff)
/source/blender/python/api2_2x/vector.h (+4, -0) (Diff)
/source/blender/python/BPY_interface.c (+2, -0) (Diff)
/source/gameengine/Ketsji/KX_PythonInit.cpp (+3, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021