xeokit / xeokit-sdk

Open source JavaScript SDK for viewing high-detail, full-precision 3D BIM and AEC models in the Web browser.
https://xeokit.io
Other
728 stars 287 forks source link

FIX: TreeView rendering when using globalizeObjectIds #1224

Closed mlankamp closed 12 months ago

mlankamp commented 12 months ago

Describe the bug When using the option to globalize ObjectIds the treeview doesn't render

To Reproduce Use one of the xkt examples, and add the following line:

const xktLoader = new XKTLoaderPlugin(viewer);
+ xktLoader.globalizeObjectIds = true;

The same behavior happens when using:

    const sceneModel = xktLoader.load({
        id: "myModel",
        src: "../../assets/models/xkt/v8/ifc/IfcOpenHouse4.ifc.xkt",
        saoEnabled: true,
        edges: true,
+        globalizeObjectIds: true,
        objectDefaults: { // This model has opaque windows / spaces; make them transparent
            "IfcPlate": {
                opacity: 0.3 // These are used as windows in this model - make transparent
            }
        }
    });

Expected behavior The treeview should render.

Or is this setting depricated?

xeolabs commented 12 months ago

Yip that's a bug. We'll fix as priority.

globalizeObjectIds is not deprecated, but the only use case we have that for it AFAIK is when we want to load two or more instances of the same model alongside each other, so we avoid object ID clashes between them. Do you happen to know of other user cases?

mlankamp commented 12 months ago

No, I don't know any other use case.

xeolabs commented 12 months ago

Fixed in 2.4.2-beta-3