Hi there @Evgeni_Popov:
The case is that, as you can see in this other thread of the forum, the BABYLON.GLTF2Export.GLBAsync API has a fault, consisting in that all the animations in scene are exported, even when some nodes are not (by means of the shouldExportNode option of the API). That is, you end exporting a GLB with animations pointing to non-existent nodes.
So, when I export my scene to GLB, avoiding in such process some nodes, and I try to load it later within Google’s model-viewer, an exception is raised, as the model-viewer importer seems to be very picky with the Kronos Group’s GLTF specification, and doesn’t like at all animations relative to nodes that are not in the file.
As a super-dirty workaround, I’m exporting all the nodes, scaling to 0 those that must not be shown in AR (by means of Google’s model-viewer web component).
A way better workaround would be:
- to disconnect from the scene the animation groups relatives to nodes that are not going to be exported (the animations must be not found by the exporter);
- export then the GLB with only the enabled nodes of the scene and the animations not disconected (the ones relative to the enabled nodes);
- reconnect the animation groups in order to let the user follow working in the BJS part of the webapp, as if nothing had happened.
Is in order to accomplish this last approach, what I’m asking about disconnect/reconnect animation groups.
Thanks for your time.