| 891 | } |
| 892 | |
| 893 | juce::ValueTree ScriptUserPresetHandler::prePresetLoad(const ValueTree& dataToLoad, const File& fileToLoad) |
| 894 | { |
| 895 | currentlyLoadedFile = fileToLoad; |
| 896 | |
| 897 | if (preCallback) |
| 898 | { |
| 899 | var args; |
| 900 | |
| 901 | if (enablePreprocessing) |
| 902 | args = convertToJson(dataToLoad); |
| 903 | else |
| 904 | args = var(new ScriptingObjects::ScriptFile(getScriptProcessor(), fileToLoad)); |
| 905 | |
| 906 | auto r = preCallback.callSync(&args, 1, nullptr); |
| 907 | |
| 908 | if (enablePreprocessing) |
| 909 | return applyJSON(dataToLoad, args.getDynamicObject()); |
| 910 | } |
| 911 | |
| 912 | return dataToLoad; |
| 913 | } |
| 914 | |
| 915 | void ScriptUserPresetHandler::presetChanged(const File& newPreset) |
| 916 | { |
nothing calls this directly
no test coverage detected