vsg-dev/VulkanSceneGraph

AnimationPath does not write out its 'mode' member

lufriem opened this issue · 2 comments

Describe the bug
When serializing an AnimationPath instance, its mode (ONCE/REPEAT/FORWARD_AND_BACK) is not written out, so that, upon deserializing that object again, it defaults to the ONCE mode.

To Reproduce
Create an AnimationPath object programmatically, write it out (into .vsgt), check that there's no mention of the 'mode' member.

Expected behavior
Well to be honest I guess it could also be a feature (so that, upon loading, the program can set the desired mode)? Otherwise I'd expect the 'mode' member to be persisted (and recreated upon loading).

Additional notes
I don't think there's any mechanism to ensure backwards-compatibility for these files (vsgt/vsgb)? So adding this member would invalidate all existing ones?

The vsg::Input and vsg::Output classes support versioning so it should be possible to add support for missing members and retain backwards compatibility.

Ah yes I see you did this for example in PR #963 (ShaderSet.cpp). I'll take a stab at adding that to AnimationPath..