[Bf-python] Another Mesh question
Chris Want
cwant at ualberta.ca
Sat Mar 4 03:40:32 CET 2006
Thanks Ken, I'll give this a try on Monday.
(This strikes me as requiring a lot of
memory, so I'll probably do it so that
it does, say, a thousand at a time.)
Chris
Ken Hughes wrote:
> Chris Want wrote:
>
>> Willian Padovani Germano wrote:
>>
>>> Guess we can favor both speed and consistency, at least regarding
>>> parts I know better in the API. There is a good reason to have
>>> pverts, pfaces, etc. but much probably not for things they contain
>>> (aka properties), like mcols.
>>
>>
>> Speaking of speed, I'm actually getting really terrible
>> speed using me.faces.extend([v1,v2,v3]) to create a mesh
>> with about 17,000 faces. It takes around 8 minutes. When
>> the script was using NMesh it only took a few seconds.
>
>
> Don't add the faces one at a time; add them all at once.
>
> newFaces=[]
> for i in whateverYouIterateOn:
> newFaces.extend([v1,v2,v3])
> me.faces.extend(newFaces)
>
> Ken
> _______________________________________________
> Bf-python mailing list
> Bf-python at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-python
>
More information about the Bf-python
mailing list