[Bf-python] Latest update on Mesh module
Ken Hughes
khughes at pacific.edu
Tue Oct 18 04:05:57 CEST 2005
Campbell Barton wrote:
> An equivilent to NMesh.getRawFromObject is needed for exporters (maybe
> there could be added a function like Alt+C, then you get the resulting
> mesh)
Quick update; spent this afternoon working on mesh.getFromObject(), and
coded two implementations for Text/Curves. The first one borrowed
code from NMesh, heavily hacked, but I discoveded that in the end the
converted object had duplicate vertices; one for each filled area and
one for each outlined area. Also discovered that using NMesh to build a
new mesh from getRawFromObject results in segfaults; perhaps because
faces now must have edges?
Daniel reminded me about Alt-C (which I should have remembered from the
comment above) to double-check the correctness of my converted text, and
so started looking at its implementation of Text->Curve->Mesh. I
recoded using these routines to make a temporary Blender object, put a
copy of the text/curve in it, then use nurbs_to_mesh() for the
conversion. results in no duplicate edges, and lets me reuse existing
code instead having to convert from the displaylist to a mesh myself.
I'll continue looking at the other types (metaballs, meshs, surfs).
Ken
More information about the Bf-python
mailing list