问题
Is there an easy way to change the content of Model Browser in the Forge Viewer? I would like to rename som nodes, add and remove node.
回答1:
Unfortunately Model Browser sources its data from the object tree (model.getInstanceTree()
) which is immutable and can only be extended by re-creating your own data structure.
Here’s a couple of good starting points:
Data Structure: https://forge.autodesk.com/blog/supporting-multiple-models-new-modelstructurepanel
Behavior: https://forge.autodesk.com/blog/customizing-modelstructurepanel-behavior-forge-viewer
Code Sample: https://github.com/yiskang/forge-au-sample/tree/master/model-structure
来源:https://stackoverflow.com/questions/53792642/change-content-of-model-browser-in-forge-viewer