Yes. I have tried importing, exporting, than importing again, then exporting, then importing.
Each time a new root node is added
Probably this issue has something to do with it
It was first merged, then reverted?
The to extra lights might be coming from
const light1 = new BABYLON.HemisphericLight("light1", new BABYLON.Vector3(1, 1, 0), this._scene);
const light2 = new BABYLON.PointLight("light2", new BABYLON.Vector3(0, 1, -1), this._scene);
Where I add lights to the scene.
I should probably remove them since they were not in the document
I’m seeing the same pattern here, only metadata structured as : {gltf: { extras: {<metadata>} } } gets exported in the resulting gltf.
@Deltakosh, @bghgary Is this wrong behavior? I assume we may want to instead serialize all metadata on a given node without requiring additional formatting?
My opinion originally is that metadata shouldn’t be exported by default, but now that we are loading metadata by default, maybe we should change this behavior. I should probably also change the loader to not add the pointers metadata by default if we do this.
The metadataSelector option allows users to choose what they want to export. The original commit is here and a follow up commit here. I made a comment to @deltakosh when the first commit was made which then changed the behavior to the current code, but this is not a regression. These two commits were made right after each other.