[Bf-python] Little (almost new UPDATE) error with 228c

models at paposo.com models at paposo.com
Thu Oct 2 03:18:28 CEST 2003


I tried to duplicate your experiment. This is what I did:
 1)I ran this script:

mesh = Blender.NMesh.New()
for j in range(0, 100):

v = Blender.NMesh.Vert()
v.co[0] = j
v.co[1] = j
v.co[2] = 0

mesh.verts.append(v)
newBaseObject = Blender.NMesh.PutRaw(mesh, 'Base')
newBaseObject.setName('Base')


2) A new object appeared called 'Base' with a meshblock called 'Base'
3) Hit x - delete the object called 'Base'
4) run the script again
5) Crash

The cause of the crash is this line in NMesh.PutRaw():

    if (name) new_id(&(G.main->mesh), &mesh->id, name);

If you change this to:

    if(name){}

Things work fine. However, when you do this the mesh is called 'Mesh' not
'Base'.

I don't know why it causes the crash though.  I am suspicious of the object
called 'Base' and the mesh called 'Base' and I wonder if the IDs somehow
conflict....




More information about the Bf-python mailing list