[Bf-python] NURBS and python

Stephen Swaney sswaney at swbell.net
Sat Apr 3 04:51:28 CEST 2004


Francesco Tamagni wrote:
> 
> I'm trying to access to NURBS surfaces from the python api, but... it
> seems that Curve object is not yet able to manage them.
> I found a script (maybe old?) from Jan that uses
> Blender.NURBS.GetRaw(name) to get a NURBS object, but it doesnt seem to
> work with api of Blender 2.32.... hints?

The current python api does not provide access to Surfaces.
It is, however, the next big item on the Curves development
roadmap.  Since you have brought it up, this is a good time
to talk about it.

Even though they share some mathematical properties and
both make use internally of a Nurb data structure, Blender
draws a distinction between Curves and Surfaces.  One bit
of evidence for their common heritage is the existance of 
Surface Curves.  These differ from plain Curves in that
Surface Curves can be joined or lofted into a Surface.

The BPy interface is an attempt to provide scripting acces
to Blender features.  Since Blender draws a distinction between
Curves and Surfaces, I suggest we maintain that distinction
in our python api.  I would expect more than a little code
sharing in the underlying implementation, but since the two 
object types are different in the user's mind, we should maintain
that conceptual difference.

Blender 3 may be a different matter, however.

-- 
Stephen Swaney			
sswaney at swbell.net



More information about the Bf-python mailing list