Arbitrary metadata for custom parameters

It would be useful to be able to attach a dict of arbitrary constant values to Par objects. This would allow you to set metadata when defining them. Then you could write code that inspects that metadata to generate other things.

Example:
You could set a “editorType” field on a Par that would be a path to the type of Panel COMP to create to make a widget for editing a particular parameter.
For a rotation parameter, it could be like: o.par.Rotate.meta['editorType'] = '/components/ui/radial_dial'
Then you could have a component that gets a reference to some OP and looks at each parameter and creates the relevant type of widget bound to it.

It should be enough to be able to store a single immutable dict of the same kinds of values that can be put into Storage (pickle-able values).
Being able to inherit it from a clone master would be a good step towards a more inheritance-based extension system, with a “class” as a COMP and the “instances” as clones of it.

Would it be possible to do something like that?

The alternative would be to put something in storage that matches up with the names of the parameters. But that wouldn’t handle inheritance from masters.

Had a similiar idea! Like your approach of appending a dict.
viewtopic.php?f=17&t=19202&p=58595#p58595