[Bf-python] loose ends in Curve

Ken Hughes khughes at pacific.edu
Tue Oct 11 07:16:40 CEST 2005


antont at kyperjokki.fi wrote:
> 
> i guess many of us are already flooded with things to do with the API, but i 
> need to add these missing pieces / bugs to fix in the Curve module to the 
> list .. for things needed urgently by Orange. if no one else tackles these 
> before, i'll try myself .. perhaps starting this evening or tomorrow. will 
> first work on the actual script, and there's the meeting soon too, so am not 
> going to look into these now yet.
> 
> missing:
> 
> - way to set a curve to 3d. trivial i hope..

bit 0 of curve.setFlag()?

> broken:
> 
> - setting ResolU: works in the sense that sets the value correctly, but does 
> not do the recalculation to actually change the res. must press the 'Set' 
> button in GUI to get the effect. hopefully just adding the right call to some 
> function in the setter.. Curve.update() does not do it.

Looks like the curves resolu is set but not each of the curve's nurbs. 
The UI doesn't change the display either until you press the "Set" 
button; in do_curvebuts() this causes the resolu value to be copied to
each nurb.  I can commit about a three-line patch to do it (have it 
working here), but your script also needs to do a curve.update() and
Window.RedrawAll(), or else include an EXPP_allqueue call in setResolu().

(BTW, what's the consensus on using EXPP_allqueue(); is that standard 
practice or something not to be done in new code?  Seems I recall 
reading something about this)

> also, i still get occasional segfaults (with the BezTriple module?): after 
> creating new curves, sometimes Blender crash when delete them in the GUI. 
> this is one traceback i got:
> 
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread -1223220544 (LWP 8871)]
> unlink_object (ob=0x894690c) at source/blender/blenkernel/intern/object.c:268
> 268                                     if(cu->bevobj==ob) {
> 
> (gdb) bt
> #0  unlink_object (ob=0x894690c)
>     at source/blender/blenkernel/intern/object.c:268
> #1  0x08366eab in free_libblock_us (lb=0x8ab8394, idv=0x894690c)
>     at source/blender/blenkernel/intern/library.c:488
> ...

The code immediately before this line is "cu= obt->data;" so looks like 
the object has no data?

Ken



More information about the Bf-python mailing list