[Bf-python] Object.link

Manuel Bastioni manuelbastioni at tin.it
Sat Sep 13 20:41:32 CEST 2003


> So, what happens in the end is that two meshes were created. A default one
> during object creation, and a new one representing the python mesh.  The
> object gets linked to the new one from the python mesh but it doesn't axe
> the old one, so you have a floating unlinked mesh.


This can be related with my previous message
about possible bug in Object.New() ??

The bug can be the name specified as second
argoment of Blender.Object.New is ignored...
the problem was:

#########################################

I must have a new object named "Base",
with a mesh named "Base" (ie ME:Base OB:Base).

I use this code, but it return a new object called
"Mesh":

------------------------------------------------------
...
 newBaseObj = Blender.Object.New("Mesh","Base")
 newBaseMesh = GetRaw()
 newBaseObj.link(newBaseMesh)
 s = Blender.Scene.GetCurrent()
 s.link(newBaseObj)
...
...[construction of a mesh from a file]...
...
 PutRaw(newBaseMesh,"Base")
-------------------------------------------------------

this return ME:Base OB:Mesh






More information about the Bf-python mailing list