CVS-blender python problem [FIXED in CVS]

I can’t get work with curves anymore with cvs-version of Blender.

I made a simple example to illustrate the problem. This won’t work with CVS-build:

import Blender
from Blender import Curve, Object


ob = Object.GetSelected()[0]
curve = ob.getData()
c = curve[0]

print c[0]

Blender says:
IndexError: no points in this SurfNurb (There is a bezier circle selected)

Also I can’t get append to work. Blender says:
AttributeError: ‘SurfNurb’ object has no attribute ‘append’

Same scripts works with 2.42a. So, have I missed something totally here? Or should I file a bug?

I get the same error, and the script works for me too with 2.42a.

So yeah, I’d call code that worked in 2.42a but is broken in CVS a bug :slight_smile:

I see there is now a SurfNurb class in the epdocs, with supposed equivalent functionality to the CurNurb class.

Looks to me that something didn’t get updated cleanly or that SurfNurb has replaced CurNurb.

It seems only with the Bezier types that the code now doesn’t work.

Reading the usual terse epydocs, I can’t figure out the difference between these two or how (if?) they are used differently.

Mike

Thanks for confirming this!

I filed a bug, let’s see what happens.

edit: Oh yes, you are right. If I change the type of the curve to poly, then it works. Weird…

It is fixed now. These fellows are quick!

http://projects.blender.org/tracker/?func=detail&atid=125&aid=5447&group_id=9