Setting animation groups for different objects with morph targets results in deserialization error

Hi there, I’ve been encountering this bug and was able to reproduce a few times.

I’m using 3DS Max 2018, with the latest version of the exporter (20200701.2), exporting to .gltf format.

Basically, I have got a scene with two objects. Each object has a morph target modifier, each using a different target, and the morph weights are animated.

When I create an animation group for the first object, it works and exports fine; but when I create an animation group for the second one in a similar vein, it seems to go through fine, but then re-opening the animation groups window and trying to export the object results in a deserialization error:

It works fine when adding multiple basic animations - such as translation and rotation. The issue seems to be with having multiple animations with animated morph targets.

Worth mentioning that when I click “confirm” to commit the changes for the second object’s animation, I get this weird behaviour where both animations are selected in the left pane - shouldn’t just the animation for the second object be selected? Might be a clue for the cause of the bug:

I am uploading two really basic scenes to reproduce the bug here: one has an animation group set for the first object only and works fine; the second one has an animation group set for each but is in a broken state - attempting to export / open the animation group window will result in the aforementioned error.

Pinging @drigax aka TheExporterOverlord

@Deltakosh @Drigax Doesn’t seem to be an issue related to the exporter though, I get the error message even when simply opening the animation groups window on the scene.

I have been banging my head the whole on this - I can replicate that fairly easy, just add two animations for two objects with an animated morph target each, and then all animations in the scene are corrupted - I get that deserialization error every time I open the animation groups window and all the existing animations are gone, can’t add new ones.

Another way to trigger this bug is to add two animations for a node which has two animated morph target. With one animation it all works fine, the moment I add a second animation all hell breaks loose.
Attaching a basic broken .max scene example for this: animmorphbroken.max - AnonFiles

Sounds like we may have an issue in @elpie89’s animation group dialog, got any time to look at it?