Question about more control with export hints

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Inces

So we can make our lives simpler with predefining keywords like these :

export ( Array, Color ) var palette

I often find myself very uncomfortable trying to input large data structures into export slots in editor. I would like to be able to define types of data inside other types of data for exported values, for example - dictionary with keys of several defined strings, and values of arrays with colors. Is this possible somehow ?

If not, perhaps is there a way to create custom data structure ? Like defining some specific dictionary, so I would be able to choose it in editor when it asks me about data type of variant data slot ??

:bust_in_silhouette: Reply From: exuin

You can define custom classes and give them a name to register them with the editor. However, this opens up a giant list of all the other classes in the editor too so it’s also cumbersome.

Classes are nice and useful for edotor displays, especially when we define inheritors. But I would like to extend from Dictionary or Array, to predefine some nested layouts, for example something like this

dict animationdata
{ key : (enum.ELEMENTAL_EFFECTS ): value (Array, Curve )}

so I could export another array in the editor and use this predefined dictionary as entries

Inces | 2022-12-11 18:59

Sorry, you can’t extend Dictionary or Array since they are not Objects.

exuin | 2022-12-11 21:28