[Bf-python] Request: IPO stuff- delCurve, delBezier, addChannel. Ken Hughes, please read ;)

Ken Hughes khughes at pacific.edu
Thu Mar 10 20:11:01 CET 2005


Dominic Agoro-Ombaka wrote:
> Hi, I need to simplify some baked actions for the gameengine, so I decided to
>  write a simple IPO decimator. Unfortunately, the API keeps me from doing that...
> a few little additions would fix some holes in the API and be greatly appreciated-
> 
> 1) delBezier() for IpoCurve class.
> This would be the counterpart to addBezier(). My idea was to compare the rate of change in a curve's slope and delete points below a certain threshold- this would make it easy to do.
> 
> 2) delCurve() for Ipo class.
> Counterpart to addCurve(). Would allow me to delete unused channels in baked IPOs, like SizeX,Y,Z.
> 
> 3) addChannel() for Action class.
> Counterpart to removeChannel(). For the sake of consistency

Dominic:

Funny you should post that.  I was playing around with a delCurve() last weekend, but
was holding off posting something until Stephen catches up on his backlog.  If you're
interested in trying it out, I can post it to the list.  The only caveat I have with
it is that it requires a patch to editipo.c in which I'm not confident; there is some
stuff with G.sipo that has to be checked to be sure that if the IPO is being edited
some other poniters are cleared.

I can look at implementing delBezier() also, but since the Ipo and IpoCurve APIs
seemed to be in state of flux I wasn't sure of the best way to proceed without the
input of others. For example, what's the best way to specify the point?  The
index in the point list?  The value of the point (i.e.,
     points = ipocurve.getPoints()
     ipocurve.delBezier(points[-1])
)?

Also, there is a Ipo.setBeztriple() which allows you to change an existing Bezier
point with much more control that BezTriple.setPoints(), but which requires the
curve and point indices.  (OK, maybe this is off-topic to the question at hand,
but was one thing which stopped me from going farther).

Ken



More information about the Bf-python mailing list