[Bf-python] IPO vs IPO curve problem

Ken Hughes khughes at pacific.edu
Tue May 31 00:47:20 CEST 2005


What happens when you do this in a script:

   import Blender

   ipo = Blender.Ipo.Get('ObIpo')	# get IPO
   c = ipo.getCurve('LocX')		# get LocX curve
   c.addBezier(1,1)			# add a point
   ipo.delCurve('LocX')			# delete LocX curve
   c.addBezier(2,2)			# add another point?

Not a smart thing to do, but there should be a runtime
exception since the curve isn't there anymore.  But, some
(if not all) the IpoCurve methods assume self points to
an existing curve... the Ipo methods (some if not all)
check the existing IPO list to be sure before doing
anything.

I haven't been able to cause a segfault with any variation
of the code above, but with the debugger did verify that
self->ipocurve is pointing to freed memory.

Ken



More information about the Bf-python mailing list