HAPI_ParmInfo::childIndex being greater than its parent size

   1054   0   0
User Avatar
2 posts
Joined: April 2017
Hi all,

I've been trying to figure out the following:

How can a Parm HAPI_ParmInfo::childIndex be sometimes greater than its parent HAPI_ParmInfo::size? I understand that folder lists influence the hierarchy in some way but how are you suppose to traverse the Parm graph if a folder can have more children than its supposed size...

The docs says that the HAPI_ParmInfo::childIndex is a "Child index within its immediate parent parameter". So maybe I'm misinterpreting "immediate" but this seems to be conflicting with the HAPI_ParmInfo::size documentation: "For folders and folder lists, this value is the number of children they own."

As an example here's an array of Parms I'm trying to build a UI for in our custom engine:

The elements selected in blue all share the same parent with an id of 5 but you can see that at the childIndex jumps from 10 to 17 which obviously confuses my traversal code into thinking that it reached the end of that container ...

Is this the expected behavior? Is there somewhere a good explanation of how folder lists change the hierarchy or even better a reference Parms traversal code?

Any pointer would be greatly appreciated.

unknown0.png (160.4 KB)
unknown1.png (36.1 KB)

  • Quick Links