NMesh.update()

Hi,
I am pretty new what concerns python in blender and there is one inconvenience that I
encountered. There is some code:

 
def main():
   objects = Blender.Object.GetSelected()
 
   target_m = cloneNMesh(objects[0].getData(0, 0))
   target_m.transform(objects[0].getMatrix())
   target_m.verts[0][0] = 0 
   target_m.update()
   #NMesh.PutRaw(target_m, "ok", 1) this works but I don't want a new mesh
   Blender.Redraw()

The probem is that I don’t get my mesh updated in blender…
What is wrong with the code?
MB

SOLVED
I have ignored cloneNMesh function…

Ok you solved your problem but just a small hint:
You should better use the “normal” Mesh module because NMesh is deprecated.

http://www.blender.org/documentation/246PythonDoc/NMesh-module.html

KoRn

Primarily i think, it is not the update, that does not work, the problem is maybe is before this.

You should use

Blender.Windows.Editmode(0)

to assure, that there will happen anything at all.

To get the mesh data, i use this snippet:

scn = Scene.GetCurrent()
ob = scn.objects.active
mesh = ob.getData()