[Bf-python] iterators for Lattice points (was "tp_getset update")

Ken Hughes khughes at pacific.edu
Wed Aug 17 17:47:17 CEST 2005


Stephen Swaney wrote:
> On Mon, Aug 15, 2005 at 10:08:16AM -0700, Ken Hughes wrote:
> 
>>* I've noted two modules where it would make sense to implement sequence 
>>or index operators; Metaball.c and Lattice.c.  For example: 
>>Lattice.getPoint(index), Lattice.setPoint(index,position) and 
>>Lattice.latSize.  These could be replaced with built-in operators and 
>>attributes: Lattice.point[i] and len(Lattice.points)
> 
> In general,  access to sequence data in types via a FORTRAN-like
> interface can be replaced with the pythonic sequence protocol.
> I will make a note on the wiki.
> 
> Implementing iterators is probably not a bad idea either.
> Back in the olden days, we were not quite as clever as we are now!

So would the iterators wrap Blender data like BezTriple does, or
use PyLists like getPoint()/setPoint() currently do?  If the former,
it'll need to wait until some of my Ipo/Curve stuff gets committed
(specifically the wrapper for BPoints types).

Ken



More information about the Bf-python mailing list