blender/source
Campbell Barton 30dcada24d python access to RNA arrays.
coords = array.array('f', [0.0]) * len(me.verts) * 3
m.verts.foreach_get('co', coords)

the reverse works with set also.
currently works for python buffers or sequences (slower)

Quick speed test with 1,179,654 verts.

*foreach_get*
list 0.377
array 0.032
py 10.29

*foreach_set*
list 0.184
array 0.028
py 9.79


where python was done like this...
----
 i= 0
 for v in m.verts:
   co = v.co
   l[i] = co[0]; l[i+1] = co[0]; l[i+2] = co[0]
   i+=3
----

some of the error checking here needs to be cleaned up to account for different invalid bad inputs.
2009-06-30 12:52:16 +00:00
..
blender python access to RNA arrays. 2009-06-30 12:52:16 +00:00
creator more corrections from cleanup :/ 2009-06-21 17:03:17 +00:00
darwin * Updated the Mac OS X blender and .blend file icons to support 2009-05-21 13:39:47 +00:00
gameengine Python API 2009-06-30 00:42:17 +00:00
icons Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
kernel 2.50: 2009-06-08 20:08:19 +00:00
CMakeLists.txt 2.50: 2009-06-08 20:08:19 +00:00
Makefile Spring Cleaning 2009-06-21 16:18:38 +00:00
nan_compile.mk Spring Cleaning 2009-06-21 16:18:38 +00:00
nan_definitions.mk Spring Cleaning 2009-06-21 16:18:38 +00:00
nan_link.mk Spring Cleaning 2009-06-21 16:18:38 +00:00
nan_subdirs.mk Makefile updates for Blender 2.5 (from GSR) 2009-03-19 01:50:45 +00:00
nan_warn.mk Makefile updates for Blender 2.5 (from GSR) 2009-03-19 01:50:45 +00:00
SConscript 2009-03-30 18:21:17 +00:00