Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugin: track undo state for serialized data #81

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

JoepVanlier
Copy link
Owner

@JoepVanlier JoepVanlier commented Jan 8, 2025

  • Adds an API endpoint (ysfx_fetch_want_undopoint) to poll whether the JSFX asked for a manual undo point for the serialized state to be made (invoked through sliderchange(-1), polling it clears the state).
  • Exposes undo/redo for serialized state to the plugin UI. I would have preferred to have this go over the DAW undo system, but most DAWs do not store the serialized state as presented in getStateInformation as part of the undo state.

For a few versions, this system will be disabled by default in the plugin. It can be enabled by setting the configuration flag ysfx_maintain_serialization_undo to 2 (the default value is 1) in %APPDATA%\ysfx_saike_mod\ysfx_saike_mod.prefs. Note that the plugin should not be running when changing this config, as the plugin will overwrite it with the default upon closing.

To do:

  • Expose a config flag to turn this system on/off.
  • Verify that the serialized state actually changed before storing and throttle the undo state generation considering that there may be pathological JSFX.

@JoepVanlier JoepVanlier force-pushed the undo_new branch 5 times, most recently from 37ca9f8 to de7fc76 Compare January 20, 2025 21:03
@JoepVanlier JoepVanlier changed the title plugin: show undo state to DAW plugin: track undo state for serialized data Jan 26, 2025
@JoepVanlier JoepVanlier force-pushed the undo_new branch 2 times, most recently from 55c250a to 41b1273 Compare January 26, 2025 16:52
notify the host when a script asks for an undo point to be made manually
- makes message thread poll for undo state
- ensures that any undo state added is different (prevents jsfx just spamming undo points without making a change to serialized state)
- currently, this mode is enabled explicitly in the preferences (off by default)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant