There are objects and there are meshes. They each have their own name. A Blender name can only be 21 characters in length (too short in my opinion, but that’s the way it is).
The object defines the LOCROTSCALE of a mesh but it is not the mesh.
In you code, the variable “mesh1” is not the mesh either. It is merely a variable pointing to the mesh. You could have just as easily typed…(to be confusing)
myArmature = NMesh.GetRaw()
This code would not make the NMesh an armature, it simply would be the name your code will reference the NMesh by while it is executing. To set the name of the NMesh, you would use code like this.
and ok i should go witht he Mesh isntead of NMesh is that the latest
i come back with the whole little script to do a sin and cos grahp
cause i got another problem with the second mesh
it’s not drawing in blender
not certain why can you help with this one
code ###############
import math
import Blender
from Blender import NMesh
x = -1 * math.pi
mesh = NMesh.GetRaw()
vNew = NMesh.Vert( x, math.sin( x ), 0 )
mesh.verts.append( vNew )
cyclemax=5
x = x * cyclemax
for j in range (1,cyclemax):
while x < math.pi*cyclemax:
x += 0.1
vOld = vNew
vNew = NMesh.Vert( x, math.sin( x ), 0 )
mesh.verts.append( vNew )
mesh.addEdge( vOld, vNew )
cyclemax=5
x = x * cyclemax
for j in range (1,cyclemax):
while x < math.pi*cyclemax:
x += 0.1
vOld = vNew1
vNew1 = NMesh.Vert( x, math.cos( x ), 0 )
mesh1.verts.append( vNew1 )
mesh1.addEdge( vOld, vNew1 )
It seems that when you do ‘mesh = NMesh.GetRaw()’ and ‘mesh1 = NMesh.GetRaw()’ that mesh == mesh1 because you don’t change what NMesh is point to (most likely the active object but that is yet another guess).
The second mesh isn’t drawing because it is equal to the first mesh.
I’m probably wrong but that’s what it looks like from reading the code.