Ignore transactions using ValueTreeState and UndoManager

I am developing a plug-in using ValueTreeState for the plugin’s parameters and UndoManager for the Undo/Redo functionalities by attaching the UndoManager to my ValueTreeState like this:

MyAudioProcessor::MyAudioProcessor()
     : AudioProcessor (BusesProperties()
                               .withInput  ("Input",  juce::AudioChannelSet::stereo(), true)
                               .withOutput ("Output", juce::AudioChannelSet::stereo(), true)
                       ), apvts(*this, &undoManager, "Parameters", createParameters())

There are some parameters in my ValueTreeState that I want to be ignored for the Undo/Redo with the UndoManager and I was wondering if there is any way to make the UndoManager ignore a transaction if it’s coming from a certain parameter.

The use case is I have parameters in the VauleTreeState storing the size of the GUI or the value of the vuMeter that shouldn’t be considered as an undoableAction.

Would you like to create another APVTS for those parameters?

Hmmm that could solve it but would that cause those params to not be visible to the host?
In one of the applications of the plug-in I have the values of the VUMeter externally written from some hardware to the plug-in by setting the parameter value externally.

I’ll try it out anyway, thanks!

Tested it, works like a charm

Ty!