[Bf-python] iterators for Lattice points (was "tp_getset update")
Gilbert, Joseph
jgilbert at tigr.ORG
Wed Aug 17 18:10:43 CEST 2005
Don't worry about iterators on lattice for now. I think that interface
should be Lattice.points[x] where 'points' is a manager object that
implements a sequence protocol for handling lattice points. The manager
should handle bpoints.
-----Original Message-----
From: bf-python-bounces at projects.blender.org
[mailto:bf-python-bounces at projects.blender.org] On Behalf Of Ken Hughes
Sent: Wednesday, August 17, 2005 11:47 AM
To: Blender Foundation Python list
Subject: [Bf-python] iterators for Lattice points (was "tp_getset
update")
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
_______________________________________________
Bf-python mailing list
Bf-python at projects.blender.org
http://projects.blender.org/mailman/listinfo/bf-python
More information about the Bf-python
mailing list