[Bf-python] Ok, heres the status of the EMesh code.

Campbell Barton cbarton at metavr.com
Sun Oct 10 09:22:29 CEST 2004


Hi, Im with you on most things, a few areas of confusion, can cant 
change the vertex data, ie- Location.

But you should be able to select the verts and use a grab macro to move 
them? - Rotate Grab etc.

Other things that you should be able to do are modify edge weight and 
seams on selected edhes.
Ctrl+E, Shift+E - So it works just like in Blender.
- Cam

joeedh wrote:

> Currently EMesh works as following:
>
> The actual module EMesh has the methods AddVert, AddFace, 
> GetScreenVert (get the vert under the mouse cursor, takes no args, 
> should be GetMouseVert?), GetScreeenFace (the same).  It has the 
> attributes "verts", "edges", and "faces", which are python lists that 
> contain all the EditVert/Edge/Face data.  Note that all edge vertex 
> and face data is immutable (you can't change it) except for the 
> crease, seam and sel stuff.
>
> Verts have the attributes co, no, and sel (like in NMesh).
>
> Edges are sequence types; you get there verts by doing edge[0 or 1].  
> Note that an edge's verts inmutable.  They have the attributes 
> "crease", "seam", and "sel", and while they are all implemented I have 
> no idea how you control the crease or seam values.
>
> Faces are also sequence types (i.e. v1 = face[0], v2 = face[1], etc if 
> I wasn't clear above).  They have the attributes "edges" (list of the 
> edges, is also immutable), "sel", "centerdot" (the coordinates of the 
> center dot of the face), and "UV" (which has the u,v, coordinates of 
> the face).  Oh, and "no", which is the normal vector of the face.
>
> So. What do you think?  I plan to implement things like Subdivide, 
> Beauty Fill, Bevel (if anyone ever finishes it?), etc.  In the future 
> all kind of mesh-editing tools could be done in python!
>
> As a sidenote, this is all done as an extreamly low-level wrapper, so 
> everything is done right on the EditMesh data (with error checking, of 
> course).  Because of this, the UV data, the vert coordinates, normals, 
> essentially whereever the Edit* data has a float-array, I use a 
> BPython Vector object, which happily works directly on the C arrays.
>
> joeedh
>
> P.S.: By the way, the QAdd python function will not send events to UI 
> elements.  It would be nice if it did.
> _______________________________________________
> Bf-python mailing list
> Bf-python at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-python
>
>


-- 
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




More information about the Bf-python mailing list