SaveInProject without saveInPreset
-
Hello folks,
As the title, how would you go about saving widgets in the project (in the DAW) without saving them in the presets?My use case: I have my drums plugin with comboBoxes that handles multi-out routing.
I wish to save the user's routing setup in his project when he saves it (obviously) , but at the same I wish to allow him to setup the routing and keep this setup while browsing the presets.Would that be possible?
Hint: I tried apostCallback
in a presetHandler but it doesn't work. -
@Matt_SF said in SaveInProject without saveInPreset:
Hint: I tried a postCallback in a presetHandler but it doesn't work.
You need to use saveInPreset and the pre and post callbacks.
In the pre-callback you store the current value, then the saveInPreset thing will trigger, then in the post-callback you restore the value you saved in the pre-callback.
And you'll use UserPresetHandler.isInternalPresetLoad() to distinguish between a preset load and a daw restore.
More info - https://forum.hise.audio/topic/6410/restoring-properties-with-daw-session?_=1735644318211
-
@d-healey said in SaveInProject without saveInPreset:
You need to use saveInPreset and the pre and post callbacks.
In the pre-callback you store the current value, then the saveInPreset thing will trigger, then in the post-callback you restore the value you saved in the pre-callback.
That's what I did.
And you'll use UserPresetHandler.isInternalPresetLoad() to distinguish between a preset load and a daw restore.
But I haven't done this.
Thanks David! I'll try this and report back
-
@d-healey seems to be working fine!
I remember having seen the post you reffered to but couldn't find it when searching the forum.
I've said it many times but I don't know what we would do without you
-
@Matt_SF said in SaveInProject without saveInPreset:
couldn't find it when searching the forum
I struggled to find it too, looking forward to getting better search functionality back!