I’ve been looking a bit at the Cinematics system. Especially serialization saving/loading etc.
The reason is that I noticed that it didn’t work. Saving seemed fine, but it crashed on loading. I reported on that in another thread.
Eventually I managed to stop it from crashing; There was an anonymous inner class after all that I didn’t see when looking the first time. Fixing that and a bunch of default constructors and it loads, but doesn’t show anything.
There were some other issues. In the read method of AnimationEvent I saw this:
//FIXME always the same issue, because of the clonning of assets, this won't work
//we have to somehow store userdata in the spatial and then recurse the
//scene sub scenegraph to find the correct instance of the model
//This brings a reflaxion about the cinematic being an appstate,
//shouldn't it be a control over the scene
// this would allow to use the cloneForSpatial method and automatically
//rebind cloned references of original objects.
**//for now as nobody probably ever saved a cinematic, this is not a critical issue**
I guess someone just did.
In fact, the Cinematics are kind of useless if they can’t be saved (or loaded).
So it brings up a number of questions. It had already struck me that a Cinematic could be a Control, considering it’s coupled to a spatial rather than the app.
Another is whether it’s a good idea that the AnimationEvent saves the spatial. I can see the benefit of not having to load a scene (which might have changed since the Cinematic was created). But I can also see a benefit in having the Cinematic be more dynamic and adapt, if for example a model changes.
What do other people think of this?