Hi

Seems there is another bug with the new animation system.

Please take a look at this simple test:

```
public class TestAnimComposer extends SimpleApplication {
public static void main(String[] args) {
TestAnimComposer main = new TestAnimComposer();
AppSettings s = new AppSettings(false);
s.setRenderer(AppSettings.LWJGL_OPENGL3);
main.setSettings(s);
main.start();
}
@Override
public void simpleInitApp() {
initLight();
//workingTest();
//failingTest();
failingTestWithDebug();
}
private void workingTest() {
Spatial model = assetManager.loadModel("models/character/model-1/model.gltf");
model = BinaryExporter.saveAndLoad(assetManager, model);
AnimComposer ac = getAnimComposer(model);
ac.setCurrentAction("walk");
rootNode.attachChild(model);
}
private void failingTest() {
Spatial model = assetManager.loadModel("models/character/model-1/model.gltf");
AnimComposer ac = getAnimComposer(model);
AnimClip animClip = ac.getAnimClip("walk");
ac.removeAnimClip(animClip);
model = BinaryExporter.saveAndLoad(assetManager, model);
ac = getAnimComposer(model);
ac.addAnimClip(animClip);
ac.setCurrentAction("walk");
rootNode.attachChild(model);
}
private void failingTestWithDebug() {
Spatial model = assetManager.loadModel("models/character/model-1/model.gltf");
AnimComposer ac = getAnimComposer(model);
AnimClip animClip = ac.getAnimClip("walk");
ac.removeAnimClip(animClip);
model = BinaryExporter.saveAndLoad(assetManager, model);
ac = getAnimComposer(model);
ac.addAnimClip(animClip);
ac.addAction("walk-debug", new ClipAction(animClip) {
@Override
public boolean interpolate(double t) {
boolean interpolate = super.interpolate(t);
System.out.println("interpolate=" + interpolate + " , time=" + t);
return interpolate;
}
});
ac.setCurrentAction("walk-debug");
rootNode.attachChild(model);
}
private void initLight() {
Node probeNode = (Node) assetManager.loadModel("scenes/lightprobe/bright-sky.j3o");
LightProbe probe = (LightProbe) probeNode.getLocalLightList().iterator().next();
probe.setPosition(new Vector3f(0, 0, 0));
rootNode.addLight(probe);
}
protected AnimComposer getAnimComposer(Spatial model) {
Spatial s = getAnimRoot(model);
AnimComposer animComposer = s == null ? null : s.getControl(AnimComposer.class);
return animComposer;
}
protected Spatial getAnimRoot(Spatial model) {
// Find spatial with the composer
// For the moment, we'll guess
Spatial animRoot = ((Node) model).getChild("Root");
if (animRoot == null) {
// Have to find it the hard way
animRoot = findAnimRoot(model);
if (animRoot.getControl(AnimComposer.class) != null) {
System.out.println("Anim clip names:" + animRoot.getControl(AnimComposer.class).getAnimClipsNames());
}
}
System.out.println("animRoot:" + animRoot);
return animRoot;
}
protected Spatial findAnimRoot(Spatial s) {
if (s.getControl(AnimComposer.class) != null) {
return s;
}
if (s instanceof Node) {
for (Spatial child : ((Node) s).getChildren()) {
Spatial result = findAnimRoot(child);
if (result != null) {
return result;
}
}
}
return null;
}
}
```

in `failingTest`

I first remove the “walk” clip then save and reload the model and add the clip again and play it, but nothing is played on the model and no error is poped.

I also added a debug mode to get sure if the walk tween is being interpolated and yes it is already being updated by anim composer but nothing happens on the spatial.

Here is the debug output:

```
interpolate=false , time=1.1401335000991821
May 25, 2019 1:51:16 AM com.jme3.anim.SkinningControl controlRender
INFO: Hardware skinning engaged for Scene (Node)
interpolate=true , time=0.22571951150894165
interpolate=true , time=0.24320552684366703
interpolate=true , time=0.2548838760703802
interpolate=true , time=0.2673773439601064
interpolate=true , time=0.28046389296650887
interpolate=true , time=0.2890698844566941
interpolate=true , time=0.3003846388310194
interpolate=true , time=0.31670890375971794
interpolate=true , time=0.3329110350459814
interpolate=true , time=0.3498958982527256
interpolate=true , time=0.36482047103345394
interpolate=true , time=0.3801583554595709
interpolate=true , time=0.3959277383983135
interpolate=true , time=0.4134633522480726
interpolate=true , time=0.42879048362374306
interpolate=true , time=0.4490779358893633
interpolate=true , time=0.46701435931026936
interpolate=true , time=0.4795372188091278
interpolate=true , time=0.49637261405587196
interpolate=true , time=0.5135316960513592
interpolate=true , time=0.5293561015278101
interpolate=true , time=0.5463519301265478
interpolate=true , time=0.5689896959811449
interpolate=true , time=0.5781451426446438
interpolate=true , time=0.595979530364275
interpolate=true , time=0.6132344976067543
interpolate=true , time=0.628871975466609
interpolate=true , time=0.6444609258323908
interpolate=true , time=0.6690077111124992
interpolate=true , time=0.6781017547473311
interpolate=true , time=0.6954481294378638
interpolate=true , time=0.7164562894031405
interpolate=true , time=0.7300194529816508
interpolate=true , time=0.7446048660203815
interpolate=true , time=0.7672818386927247
interpolate=true , time=0.77814204338938
interpolate=true , time=0.794001636095345
interpolate=true , time=0.8167021675035357
interpolate=true , time=0.8277528146281838
interpolate=true , time=0.843994134105742
interpolate=true , time=0.8688864456489682
interpolate=true , time=0.8781820805743337
interpolate=true , time=0.8948670057579875
interpolate=true , time=0.9121995540335774
interpolate=true , time=0.9276542002335191
interpolate=true , time=0.9440788691863418
interpolate=true , time=0.9670754810795188
interpolate=true , time=0.9777142563834786
interpolate=true , time=0.9941864041611552
interpolate=false , time=1.0176119627431035
```

I will appreciate if someone gives me a clue of where should I look for the bug

Thanks