[Bf-python] Mesh.Face() constructor

Campbell Barton cbarton at metavr.com
Fri Mar 3 04:12:28 CET 2006


extending a face needs verts to exist alredy.
you need to compare the length of me.faces before and after extending a 
face.

Ken, PFace would be ok. a light face data storage would be okay. Though 
Im for verts that have alredy been added rather then checking and adding 
where needed.
(Unless adding verts where needed if fairly fast)

- Can
Chris Want wrote:
> Ken Hughes wrote:
>> Yes, once you've created the face you can access it with me.faces[-1],
>> although as Cam points out you have to be sure it really added the 
>> face before you do this (if the face already exists in the mesh, or 
>> has duplicate vertices, it is ignored).
>
> How do you test this? Check the length of face.verts before
> and after? Or does extend() return an error code?
>
>> The examples are there, but they are shown with the .extend() 
>> methods. I think I discussed this with Toni once before; maybe we 
>> need some examples on the wiki (hey, maybe in the Manual under the 
>> Python section) which show how to do things.  I wouldn't mind writing 
>> some stuff for that, or maybe Cam already has some simple examples 
>> lying around.
>
> I think in the top level doc for the module (i.e., the doc for Mesh)
> should have a non-trivial example. If you had never used the Mesh
> module before, how would you know to look in the doc for this
> strange thing called MFaceSeq? The example in MFaceSeq for
> extend() does not show things like vertex colors being assigned,
> and I think that would be helpful.
>
> Chris
> _______________________________________________
> 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