Login | Register 
FEATURES
APPLICATIONS
DOWNLOADS
EDUCATION
BLOG
WIKI
FORUM
STORE

FIXED:CPlusPlusChop PrimitiveInfo.numVertices doesn't update

Report bugs so we can squash them!

FIXED:CPlusPlusChop PrimitiveInfo.numVertices doesn't update

Postby colasf » Sun Sep 16, 2018 11:05 am

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 93 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 93 times


I'm using touch 2018.25850 on Windows 10

Cheers,
Colas
Attachments
CPlusPlusCHOPExample.cpp
source code
(8.71 KiB) Not downloaded yet
NumVerticeBug.toe
example network
(4.03 KiB) Not downloaded yet
colasf
 
Posts: 11
Joined: Mon Apr 05, 2010 10:47 am

Re: CPlusPlusChop PrimitiveInfo.numVertices doesn't update

Postby ben » Tue Sep 18, 2018 12:36 pm

Thanks for the report, we'll look into it.
User avatar
ben
Staff
 
Posts: 2268
Joined: Thu Nov 08, 2007 6:55 pm
Location: Toronto

Re: CPlusPlusChop PrimitiveInfo.numVertices doesn't update

Postby parto » Tue Sep 18, 2018 5:07 pm

hi,
This issue is fixed. It will be available in our next build.
Thanks for reporting this!
parto
 
Posts: 7
Joined: Wed May 31, 2017 7:06 pm


Return to Bugs

Who is online

Users browsing this forum: No registered users and 11 guests