From 0ee045e455c149f01fdc2374046853ae2fd3f3cc Mon Sep 17 00:00:00 2001 From: Gary Hsu Date: Thu, 26 Sep 2024 09:30:15 -0700 Subject: [PATCH 1/2] Fix Babylon debug code --- pages/babylonDebug.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/babylonDebug.js b/pages/babylonDebug.js index ef27b3b..1f31653 100644 --- a/pages/babylonDebug.js +++ b/pages/babylonDebug.js @@ -102,7 +102,7 @@ window.BabylonDebug = function (scene) { }; function getJsonPointer(node, predicate) { - const jsonPointers = node.metadata && node.metadata.gltf && node.metadata.gltf.pointers; + const jsonPointers = node?._internalMetadata?.gltf?.pointers; if (jsonPointers) { for (const jsonPointer of jsonPointers) { if (!predicate || predicate(jsonPointer)) { From 8c2e7db2145a65fa2b886b978d9e35c0af7d7a89 Mon Sep 17 00:00:00 2001 From: Gary Hsu Date: Thu, 26 Sep 2024 09:30:42 -0700 Subject: [PATCH 2/2] Allow multiselect in glTF windows --- src/gltfWindow.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gltfWindow.ts b/src/gltfWindow.ts index 9a94f3c..4774ded 100644 --- a/src/gltfWindow.ts +++ b/src/gltfWindow.ts @@ -21,7 +21,7 @@ export class GltfWindow { vscode.window.registerTreeDataProvider('gltfOutline', this._gltfOutline); this._gltfInspectData = new GltfInspectData(context, this); - this._gltfInspectData.setTreeView(vscode.window.createTreeView('gltfInspectData', { treeDataProvider: this._gltfInspectData })); + this._gltfInspectData.setTreeView(vscode.window.createTreeView('gltfInspectData', { treeDataProvider: this._gltfInspectData, canSelectMany: true })); vscode.window.onDidChangeActiveTextEditor(() => { // Wait a frame before updating to ensure all window states are updated.