[Bf-committers] Scripting Loop subdivision using the Mesh module

Campbell Barton ideasman42 at gmail.com
Tue May 12 00:30:59 CEST 2009

The current blender python api is very poor this
import/export/create meshes is ok but mesh editing is a pain, you need
to remove faces and add them back in again (in the case of subdivision
you need to add more verts too)
I did this a while ago and it works ok but its quite tedious and you
need to minimize how many times you extend and delete
faces/verts/edges or the script will get slow since it re-allocates
each time.

Hopefully the 2.5 api will allow better mesh editing within scripts

On Mon, May 11, 2009 at 12:18 PM, Erno Szabados <chromecat77 at gmail.com> wrote:
> Hello,
> I'm trying to implement Loop subdivision using the Python Mesh module, but I
> have encountered some problems.
> I calculate the edge midpoints for every triangle and add them to the vertex
> list, but I could use some help with:
> - how to go about creating the linear subdivision faces.
> - how to discover and store neighbor locations for the refine step.
> I'd be thankful for any pointers in these topics.
> I'd also be glad to help out with (minor) Python-related tasks. I code in C,
> and grasped the basics of Python, but I don't have much experience with real
> Python projects.
> - Erno Szabados
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers

- Campbell

More information about the Bf-committers mailing list