Help me understand how to script .setZoomLevel
-
@d-healey I compiled the snippet and it doesn't work in the DAW (both Win & Mac).
At startup the UI is at 100% not in the value indicated by the combo box.
I tried both with and without:Content.makeFrontInterface(700, 1000); // Settings.setZoomLevel(0.5); (with & without this) //Zoom UI inline function onComboBox1Control(component, value) { if (value < 1) return; local sizes = [0.5, 0.625, 0.825]; Settings.setZoomLevel(sizes[value - 1]); } Content.getComponent("ComboBox1").setControlCallback(onComboBox1Control);
-
@Mighty23 Does it work when compiled as a standalone app?
-
@d-healey I can tell you with certainty that the standalone version (Windows) works; the vst/au version does not.
-
@Mighty23 ok, I'll test the plugin version in a little while
-
VST3 working here too. Did you import the snippet into your current project or a new clean project?
-
@d-healey I apologize if it took me half a day to answer you but I would have liked to give you answers for sure and therefore I did all the tests that came to mind.
-
If I import your snippet into a new project, it behaves exactly as we expect.
-
if I import your snippet into the existing project, the UI zoom does not happen as hoped. The plugin launches with 100% UI.
-
if I copy and/or recreate the code proposed in my project, the plugin does not start with a UI zoomed to 0.5
-
extra: if I open another project this one in HISE "inherits" the zoom of the previous project; only in HISE not in the compiled plugin. (minor issue)
The problem manifests itself in the compiled version of the plugins. How can I continue investigating?
-
-
@Mighty23 what happens if you delete the app data folder for your project before launching the plugin?
-
@d-healey I believe this solved the problem in Windows. Now I have to look for something similar in OSX, right?
on windows:
- with the "run" command I searched for the location of AppData
- inside the AppData folder we find the Roaming folder
- Delete the plugin folder: AppData/Roaming/[Company Name]/[Plugin Name]/
I will wait to complete the final tests on both OSes to be able to confirm this issue as fixed.
-
@Mighty23 Yeah I'm guessing some setting within the app data folder was set by some previous iteration of your project and the new value is just being ignored. So by deleting that folder we start fresh.
-
@d-healey I confirm that it solves completely, thanks for the always efficient help.
On mac os AppData is this:
/users/[YOUR_USER]/Library/Application Support -
-