check out this tut on snippets
http://blenderartists.org/forum/showthread.php?t=193908
show how to add objects ect…
now to define a new mesh’s data
depends there are 2 ways right now in 2.54
1 - Geometry looks at the “pipe script” to see hwo it is done
but more complicated to do but it works
2 - the other simpler way use
mesh.from_pydata(verts, [], faces)
first make a list of vertices like in 2.49
list_of_verticesbw3=[
[-w2,w2,w2], # vertex 0
[-w2,-w2,w2],
[0,-z1-tip1,0],
]
then a list of edges or faces
list_of_facesbw3=[
[0,1,2,3], # face 0
[4,5,6,7], # face 1
]
then you add theses lists to the mesh
Create the new mesh with the data from verts and faces
mesh = bpy.data.meshes.new(name)
mesh.from_pydata(verts, [], faces)
mesh.from_pydata(list_of_verticesbw3, [], list_of_facesbw3)
mesh.update()
Create a new Object.
ob_new = bpy.data.objects.new(name, mesh)
ob_new.data = mesh
bpy.context.scene.objects.link(ob_new)
hope it helps
happy 2.5