Closed bboudaoud-nv closed 2 years ago
We still need to find a way to support Array<Color4>
cleanly from FPSciAnyTableReader
before closing this issue. In the future we should try to use Array<Type>
fields over more specific, unsupported types that could duplicate this functionality.
This branch adds an
FPSciAnyTableReader
to replace the G3DAnyTableReader
. This Any table reader is largely unchanged, but it supports special methods for reading arrays (of correct length) as G3D-specific types such asVector2
/Point2
,Vector3
/Point3
, andColor3
/Color4
using JSON-style formatting.Specifically this fix is targeted at improving the ability to serialize in JSON-style arrays for these fields, making the
jsonAnyOutput
flag more useful (and less likely to introduce bugs).Notably this branch does not support all G3D Any-serializable objects, and currently more elaborate types (such as
CFrame
andSampler
may still not serialize correctly from JSON-formatted Any). However theFPSciAnyTableReader
class provides us an easy way to add support for such special cases in the future.