[C++] Registering a struct and exposing it as a property?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By chanon
:warning: Old Version Published before Godot 3 was released.

I’m developing a custom node type in a custom C++ module that uses custom resource types.

One of the custom resource types needs to hold an array (vector) of structs.

First question:
I’ve looked at how the SpriteFrames resource (in animated_sprite) and a few other resource classes save their data when they hold an array of structs (in SpriteFrame’s case a map). It looks like the method used is to encode the data into an array of Dictionaries and let it be serialized that way.

I’m wondering if it is possible to register_type the struct instead and then serialize it as an array of the registered struct type?

I guess it is probably possible to make the struct a new Resource type, but I think that is overkill. I’d just want to register it as a simple struct and be able to have it serialize correctly just using the plain built in PropertyInfo binding. (In SpriteFrames case that would be equivalent to registering the SpriteFrames::Anim struct)

Second question:
If the above is possible, then would it be editable in the property inspector?