Saving attributes in min-devkit

dyzid's icon

Hey all,

I am currently trying to make my custom attribute remember its state, on saving the patch. None of my attributes are being saved at the moment. I am comparing my code to the min.meter_tilde example, and I can't find any difference in how I setup the attribute.
I read about the "value" name, but as I understood this is meant specifically to make the attribute visible to pattr and similar systems, am I right? (Also the meter_tilde example is not using it, so that's how I figured)

I even copy/pasted attributes from the min.meter_tilde example (for example m_range) into my code, and also then it doesn't save. So it seems I need to setup something else to get that to work? I hope someone could shed some light on this topic.

EDIT:
So, after bastardising the min.meter_tilde example a bit, I learned that as soon as I remove the ui_operator<> inheritance from the min_meter class, it doesn't save arguments anymore. So is this somehow managing that in the background?
Also, I don't need custom UI, so that is probably not the best way to deal with it. What is the intended way to save attributes then?

Thanks :)