FIXED:CPlusPlusChop PrimitiveInfo.numVertices doesn't update

Hi,

It seem that there is a bug with numVertices variable of the PrimitiveInfo objects returned by the getPrimitive member function of the OP_SOPInput.
If i switch the input sop to a sop that contains a primitive with a different number of vertices numVertices doesn’t update.

Here is the change i did to the CPlusPlusCHOPExample

setupParameters member function

	{
		OP_StringParameter sopp;

		sopp.name = "Geo";
		sopp.label = "Geo";

		OP_ParAppendResult res = manager->appendSOP(sopp);
		assert(res == OP_ParAppendResult::Success);
	}

execute member function

        if (inputs->getParSOP("Geo"))
	{
		for (int i = 0; i < inputs->getParSOP("Geo")->getNumPrimitives(); i++)
		{
			std::cout << "Primitive: " << i << std::endl;
			std::cout << "Num Vertices: " << inputs->getParSOP("Geo")->getPrimitive(i).numVertices << std::endl;
		}
	}

I did a simple setup one Sop with one primitive that contains 3 vertices and one Sop with one primitive that contains 5 vertices.
numVerticeBug.PNG
When i switch to the Sop that contains 5 vertices the value of numVertices doesn’t change.

Not really directly related to this bug but that will be nice if PrimitiveInfo objects will also contains the close information like the one you can get from a SopToDat set to primitive.
closeInfo.PNG

I’m using touch 2018.25850 on Windows 10

Cheers,
Colas
CPlusPlusCHOPExample.cpp (8.71 KB)
NumVerticeBug.toe (4.03 KB)

Thanks for the report, we’ll look into it.

hi,
This issue is fixed. It will be available in our next build.
Thanks for reporting this!