I was wondering if it’s possible to reassign an object’s mesh from python script?
It’s easy to this in the Blender window.
select an object
go to edit mode
select a Mesh
I know that it’s possible to replace an objects raw mesh from script by doing the following.
Python> import Blender as B Python> OBJ1 = B.Object.Get(“Object_1”) Python> OBJ2 = B.Object.New(1) #Makes a Mesh Object Python> OBJ2.name = “Object_2” Python> H_mesh = B.Nmesh.GetRawFromObject(“Object_1”) Python> B.Nmesh.PutRaw(H_mesh,”Object_2”)
But this only changes the geometry of Object_2’s mesh to that of Object_1’s. I want to link Object_2’s mesh to that of Object_1’s
(i.e. by looking in the OOPS window, I should see the following…
before: Object_1 and Object_2 are linked to their own mesh
after: Object_2 is linked with Object_1’s mesh)
Any insight would be appreciated.