Though I'd create a topic specifically for questions regarding the save/load system.
There is code that looks like it is part of the game save/load process, but I can't find where it is ever called in that process.
For example: SaveModelToBinary()
which is called in the function ModelViewer::PollEvents()
What is this?
Will be grateful for any help with this :)
Going to have to close down for a while, but will log on again later tonight.
Questions regarding the save/load system
Re: Questions regarding the save/load system
Also, could anybody shed any light on NodeVisitor and its derived classes?
As far as I can see, ONLY one that is part of the save/load process is SaveVisitor and LoadVisitor (now SaveVisitorJson and LoadVisitorJson) which are invoked in ModelBody::Save(Serializer::Writer &wr, Space *space)
Thanks
As far as I can see, ONLY one that is part of the save/load process is SaveVisitor and LoadVisitor (now SaveVisitorJson and LoadVisitorJson) which are invoked in ModelBody::Save(Serializer::Writer &wr, Space *space)
Thanks
Re: Questions regarding the save/load system
SaveModelToBinary is part of the model compiler. You don't need to worry about it for this.
NodeVisitor walks a model node graph and invokes methods for each node. SaveVisitor and LoadVisitor are responsible for serializing and deserializing node state. They're the only ones involved in the save/load process.
NodeVisitor walks a model node graph and invokes methods for each node. SaveVisitor and LoadVisitor are responsible for serializing and deserializing node state. They're the only ones involved in the save/load process.
Re: Questions regarding the save/load system
Thanks robn!
Then I've created some unnecessary JSON save/load functions (e.g. in CollMesh) which I'll remove to avoid confusion. Let me know if you ever need them though :)
With regard to SaveVisitor and LoadVisitor:
As far as I can see, only a single matrix4x4f is saved/loaded (in ApplyMatrixTransform).
I'll check again though, to see if any other virtual functions are called that save data.
Then I've created some unnecessary JSON save/load functions (e.g. in CollMesh) which I'll remove to avoid confusion. Let me know if you ever need them though :)
With regard to SaveVisitor and LoadVisitor:
As far as I can see, only a single matrix4x4f is saved/loaded (in ApplyMatrixTransform).
I'll check again though, to see if any other virtual functions are called that save data.
Re: Questions regarding the save/load system
FYI: There may be some information regarding the JSON save/load system in https://github.com/pioneerspacesim/pioneer/pull/3350 which is not covered in the posts in this forum.
Re: Questions regarding the save/load system
At review time, what's in the PR is canonical.