Page 1 of 1

FIXED:CPlusPlusChop PrimitiveInfo.numVertices doesn't update

PostPosted: Sun Sep 16, 2018 11:05 am
by colasf
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
Code: Select all
   {
      OP_StringParameter sopp;

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

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


execute member function
Code: Select all
        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
numVerticeBug.PNG (85.8 KiB) Viewed 307 times

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
closeInfo.PNG (46.05 KiB) Viewed 307 times


I'm using touch 2018.25850 on Windows 10

Cheers,
Colas

Re: CPlusPlusChop PrimitiveInfo.numVertices doesn't update

PostPosted: Tue Sep 18, 2018 12:36 pm
by ben
Thanks for the report, we'll look into it.

Re: CPlusPlusChop PrimitiveInfo.numVertices doesn't update

PostPosted: Tue Sep 18, 2018 5:07 pm
by parto
hi,
This issue is fixed. It will be available in our next build.
Thanks for reporting this!