[Bf-committers] Re: Patch: fixes and additions to python IpoCurve [Was:Re: No numpad -- Keymapping?]

Stephen Swaney sswaney at centurytel.net
Wed Jan 19 18:02:50 CET 2005


On Wed, Jan 19, 2005 at 08:33:19AM -0800, Ken Hughes wrote:
> 
> In reply to Kent Mein <mein at cs.umn.edu>
>  
> 
>  > Your a lot more likely to get something committed if you say hey guys 
>  > its been awhile since I posted this...   And I haven't heard anything.
>  > Could someone take another look at it.
> 
> I'll bite:
> 
> "It's been a while since I posted this... and I haven't heard anything" :-)
> 
> -------------------------------
> 
> Here is a patch to source/blender/python/api2_2x/Ipo.c and
> source/blender/src/editipo.c which do the following:
> 
> * allow IPOs for material texture channels and world channels to
>     be added ('addCurve()') and retrived ('getCurve() and getCurves()')
> * cleaned up the search for named IPO curves (use a binary search,
>     and uses string/attribute structures instead of individual
>     strcmp() calls)
> * fixed inconsistency between Lamp Energy IpoCurve names (you could
>     add 'Energy' but get 'Energ')
> * fixed bug in naming of World.MistSta IpoCurve

It's in progress.  Apologies for the lack of updates.

A couple thoughts:

I think we need to make the curve names and values avaiable in the
API.  Probably thru a dictionary.

The search stuff does need some cleanup!  However, for a small number
of items, a binary search is no faster than a linear one and also
requires the data to be sorted.  Keeping it sorted concerns me.  A
dictionary is another candidate solution here and ties in with the
first thought.

I didn't commit the new texture channel stuff yet because it wasn't
obvious to me what it was doing.  ( some study on my part will fix
this! A comment or two wouldn't hurt either. )  Having a test script
would be Real Nice, both to verify the code and to make my lazy life
easier!

Code with lots of magic numbers imbedded in it makes me twitchy.

Lots of good fixes and new features in your patches.  Don't think it
isn't appreciated.  I just keep getting distracted by things like
getting gcc to catch non-ansi code and the 8 inches of snow in the
driveway.  Thanks!

<insert standard remark about test script or .blend accompanying patches>

-- 
Stephen Swaney
sswaney at centurytel.net



More information about the Bf-committers mailing list