push primitive data as string into geom objects


I suppose the answer is right before my eyes, but I cannot see.

Now, I use the setData method (Python) to push the whole V3c4n2 Array into the geom node. But I wonder if there is a method to do the same with the primitive data.

Currently I use addVertices to add vertices (0, 1, 2, 3) to my tristrips object, followed by a closePrimitive call. If it wasn’t for the closePrimitive, I’d add range(0, 20) to add the vertices for 5 tristrip faces at once, but it seems to me that the geom’s primitives list must contain Primitive-objects.

So, is there a way/method to just set the result string, like for geomVertexArray?


Sure. Use tristrips.modifyVertices().modifyHandle().setData(newData).


Right, this was the method I once found in a thread or article (unfortunately I have lost the link).

I was looking through the GeomNode, Geom, Primitive and GeomTristrips API, but didn’t find this method. I’ll have a try.

David, many thanks again!