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

Manuel Bastioni manuelbastioni at tin.it
Tue Sep 30 22:59:33 CEST 2003


The problem is in the PutRaw function:

if I replace

newBaseObj=NMesh.PutRaw(newBaseMesh,"Base")
newBaseObj.setName("Base")

with

newBaseObj=NMesh.PutRaw(newBaseMesh)
newBaseObj.setName("Base")

Blender don't crash. If I delete the obj and try to rebuild it
with the script, a Mesh.001 is created... but if I take a look in
OOPS schematic window, no "Mesh" is present...

If I repete the procedure, I've Mesh.002, .003, .004, etc...
but in OOPS window I don't see the previous (and deleted)
mesh.


----- Original Message -----


> To prevent crash (cfr. previous message), I've used object.setName("Base")
> instead object.name = "Base".
>
> But now I've a new crash: if I create a new object and assign it the
> name using the function above, all work fine. But if I delete the
> object and, without reboot Blender, try to create the obj again, using the
> same script, Blender crash.
>
> I've try to replace the code
>
> newBaseObj=NMesh.PutRaw(newBaseMesh,"Base")
> newBaseObj.setName("Base")
>
> with the code
>
> scene = Blender.Scene.getCurrent()
> newBaseObj=Blender.Object.New("Mesh","Base")
> newBaseObj.link(newBaseMesh)
> scene.link(newBaseObj)
>
> it don't crash, but when I try the second time
> no mesh is created...
>




More information about the Bf-python mailing list