DAW state restoration of plugins for controls not saveInPreset
-
So I have my pref file restoring a few parameters at init.
But for multiple instances, you might want oversampling here but not there... I thought DAWs were restoring the state as it was the last time when saving/closing a project, and not performing a "real init" when opening again.And that's the case for ProTools. But not for Logic or Reaper (probably others), where the pref file is reapplied to all instances...
Is the only way to prevent this to set those parameters to
saveInPreset
? -
@ustk Is this valid for all ui elements or only for buttons?
Even if you set the default value of buttons to 1, in Pro Tools, they always initialize at 0. This has been a bug for years. Maybe that might be the reason.
-
@orange Well I'm not sure this applies, because ProTools does load with the previous state of each instance, be it on or off.
While in other DAWs, all instances get initialised with the pref file, be it on or off...
So the default value seems to have no effect on this.UserPresetHandler.isInternalPresetLoad()
might help to decide if it's a DAW state that is restored or not... But a pre/post load callback is for preset loading, so if this applies to instance restoration I don't know, I have to experiment... Maybe it's a matter of creating a flag that authorises or not the loading of the pref file, hopping this won't interfere when first inserting the plugin on a track.