I am using HOOPS_communicator_2024.3.0. In the sample application, the result from getBranchVisibility is always Mixed. No matter I hidden the whole model by toggling the visibility icon of the root node in the model browser or toggle it back to show the model. So is the behavior normal? Thank you
While getVisibilityState can determine the visibility for a node, it cannot be used to determine if there are some children are hidden and some children are visible. From my expectation and based on the sample source code, the getBranchVisibility is for this purpose. However, it returns Mixed even the model is first loaded and thus some icons are showed as partial hidden in the above screenshot. (I am using model arboleda in the sample).
So I would like to know the expected behavior of getBranchVisibility. Thank you.
The arboleda model is an interesting model. By default, certain nodes are set to hidden. More specifically, those nodes associated with IFCSPACE are not visible as these objects represent bounding volumes instead of physical parts of the building.
When calling getBranchVisibility on the absolute root node (-2), a single child node that is set as hidden will return Mixed for the function.
If you want to toggle all the nodes to visible, you can run this snippet:
All this is to say that getBranchVisibility should work. If you have a particular model in addition to the arboleda model, it might be better if you create a support ticket in our portal and send us the file.