[Bf-python] Discussion: Mesh PVert/MVert change?
Ken Hughes
khughes at pacific.edu
Thu Jan 12 19:51:34 CET 2006
Wanted to get some feedback if this seems feasible for 2.41:
I would like to make it easier for the Mesh module to create edges and
faces, especially for new meshes. Right now, the user has to create the
new verts and .extend() into the mesh, then construct a sequences of
MVerts and add with me.faces.extend() or me.edges.extend(). Having
written some scripts the last few weeks, it seems better to just create
a sequence of PVerts and then add with me.faces.extend().
The downside of this is me.faces.extend() needs to know actual mesh
vertex indices, which PVerts don't have. What I would have to change is
how MVerts and PVerts are represented internally, and more importantly
allow a PVert to change into an MVert. When a PVert is passed to
.extend(), the method would automatically append it to the mesh prior to
creating the faces. It would also have to change the BPy object so that
the next face containing that vertex doesn't try to append it to the
mesh again.
I'm undecided whether that is a good thing or not; it will be equivalent
to having a Py_NEW object change into a Py_WRAP object.
I don't think this would take long to add; maybe a few hours this
evening. But I'm already pressed for time as it is this week and don't
want to spend time coding if it's not viewed as a good idea anyway.
If you have opinions, please let me know ASAP.
Ken
More information about the Bf-python
mailing list