[Bf-python] About the NMesh module

Jordi Rovira i Bonet jordi.rovira at ima.udg.es
Wed May 28 17:58:05 CEST 2003


Hello again,

    I've been examining the NMesh module (both in the experimental api, 
and the old one) and have some questions and comments. The main one is: 
why does this module "copy" all the data in blender C structures using 
python objects, instead of wrapping the thing like in all the other 
classes? I suppose that there must be a good reason for this, as it 
complicates the module a lot and forces the existence of things like 
"update" to "commit" the mesh. Wouldn't it be possible to make it 
thinner and faster simply wrapping (using pointers, or pointers+indices 
for array elements) and redefining the comparison function? I suppose 
that in the experimental api, this has been ported straightforward from 
the old one without questioning this.
    Knowing that the main goal now is to keep compatibility with old 
API, this changes (if turned out to be possible) would have to wait 
until we could change this compatibility.
    Another question is... why NMesh and not Mesh. I think this comes 
from a reimplementation when both neede to coexist. If i'm right i 
suggest switching to "Mesh" again when we could break the API.
    Another questionthat suddenly comes up to my mind... not related to 
python... what doesn "NLA" mean? i've seen all around the code.

(bandoler)

P.S. Maybe i've drunk too much coffee... it makes me ask a lot of questions.




More information about the Bf-python mailing list