[Bf-python] python interface to Edges (NMesh.Edge)
Campbell Barton
cbarton at metavr.com
Thu Sep 30 10:32:34 CEST 2004
Hi, I have been thinking how python could accsess blenders edges for:
- Subserf weight
- Seams
- Edge Selection
edges could be accsessed by-
me = NMesh.GetRaw('mymesh')
for ed in me.edges:
print ed.v[0].co
print ed.v[1].co
for f in me.faces:
for ed in f.edges:
print ed
_______________________
Edges cant be added or removed from a mesh- They are automaticly a part
of a face, (2 vert faces will stay, however these faces will only have 1
edge)
To add or remove youll need to add or remove the face that uses the edge.
Since an edge MUST have 2 verts...
Should an edge accsess its verts by.
# Like faces
print ed.v[0]
print ed.v[1]
print ed.v1
print ed.v2
_____
using a list implies that an edge can have verts added and removed,
which It cant since an edge as a part of a face.
____
I tried to code in edge support into NMesh.h/c but I dont realy
understand the internals well enough, I just copied a lot of the face
stuff and modified for edges.
Do people see this as where bpython could be headed?
- Cam
--
Campbell J Barton
133 Hope Street
Geelong West, Victoria 3218 Australia
URL: http://www.metavr.com
e-mail: cbarton at metavr.com
phone: AU (03) 5229 0241
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4851 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20040930/d1c59910/attachment.bin>
More information about the Bf-python
mailing list