[Bf-python] Ipo/IpoCurve API revisited

Ken Hughes khughes at pacific.edu
Fri Mar 17 02:35:44 CET 2006


Stephen Swaney wrote:
> On Sun, Mar 12, 2006 at 11:09:48AM -0800, Ken Hughes wrote:
> 
> 
>>This didn't tkae as long as I thought it would.  However, I'm going to 
>>be out-of-town for a few days and don't want to commit anything which 
>>might break something (I've tested but not ultra-thoroughly) so I put it 
>>on the patch tracker in case someone wants to play with it:
>>
>>https://projects.blender.org/tracker/index.php?func=detail&aid=4001&group_id=9&atid=127
>>
>
> Looks good at first glance! 
> 
> getCurve(), getCurves() vs Get()
> 
> I realize we are dealing with legacy code here.  However, most of our
> bpy types have a Get method that either returns a named object, or a
> list of objects depending on the argument supplied to Get.  This is
> slightly different since here we have an instance rather than a class
> or type.  Maybe overloading the getCurve() method to return a list
> when called with no args is the right thing to do?

Overloading getCurve() seems like the logical way to proceed.  And it 
only takes about two lines of code.... :-)

Ken



More information about the Bf-python mailing list