[Bf-committers] Python API Question

Thomas H. Hendrick thomas.hendrick at vistagy.com
Mon Jul 17 22:54:14 CEST 2006


Looking through the source of CurNurb.c in python/api2_2x, it appears we cannot 
access all of the control points of a nurbs surface through the Python API, even 
though surfaces are represented using the same Curve structure.  (I understand 
why this is done, as adding a point to the end of a curve, when the curve is 
actually a surface, seems like it would lead to an undefined behaviour.)

You can access the first curve (first "v" curve, which uses the "u" parameter) 
of the surface, but you cannot access the remaining control points.  Is there a 
plan on augmenting the API to provide access to the entirety of the surface 
information?

I had thought about attempting to code it myself and submit a patch, but the 
question becomes whether it is better to augment the existing PyCurve Object to 
understand when things are surfaces, or create a new PySurface Object to treat 
surfaces in a special manner.  I might be able to hack and slash my way through 
some code to provide this API (post 2.4x release, where x=2 of course), but I 
was wondering what design the developers would prefer, rather than just hacking 
my way through only to leave more work for someone to clean up later.

Happy Blending,

--Tom H.

-- 
------------------------------------------------------------------------
Tom Hendrick<thomas.hendrick at vistagy.com>                Technical Staff
[W] 1-(781)-290-0506 x252   [M] 1-(617) 448-2585    [H] 1-(978)-244-1149
Vistagy, Inc.                                    http://www.vistagy.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: thomas.hendrick.vcf
Type: text/x-vcard
Size: 312 bytes
Desc: not available
Url : http://projects.blender.org/pipermail/bf-committers/attachments/20060717/f19845d9/thomas.hendrick.vcf


More information about the Bf-committers mailing list