Is there any reason why the GeomVertexReader works, but the GeomVertexWriter does not (as does the GeomVertexRewriter doesn’t work either)? If you comment out the two lines dealing with the GeomVertexWriter, it works, and reads the data correctly. What am I doing wrong?\
import direct.directbase.DirectStart
from pandac.PandaModules import *
#creating
prim = GeomTriangles(Geom.UHStatic)
vdata = GeomVertexData('',GeomVertexFormat.getV3(),Geom.UHDynamic)
geom = Geom(vdata)
geom.addPrimitive(prim)
vertex = GeomVertexWriter(vdata,'vertex')
for i in range(0,3):
vertex.addData3f(0,0,0)
prim.addVertices(0,1,2)
prim.closePrimitive()
node = NodePath(GeomNode('gnode'))
node.node().addGeom(geom)
#modifying
mgeom = node.node().getGeom(0)
mvdata = mgeom.getVertexData()
mvertex = GeomVertexWriter(mvdata, 'vertex') #comment this line to make work
mrvertex = GeomVertexReader(mvdata, 'vertex')
print mrvertex.getData3f()
mvertex.setData3f(0,1,0) #and this line
run()