MCPcopy Create free account
hub / github.com/christophhart/HISE / saveCustomUserPreset

Method saveCustomUserPreset

hi_scripting/scripting/api/ScriptExpansion.cpp:143–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141}
142
143var ScriptUserPresetHandler::saveCustomUserPreset(const String& presetName)
144{
145 if (customSaveCallback)
146 {
147 LockHelpers::SafeLock sl(getScriptProcessor()->getMainController_(), LockHelpers::Type::ScriptLock);
148
149 var rv;
150 var args = presetName;
151 auto ok = customSaveCallback.callSync(&args, 1, &rv);
152
153 if (!ok.wasOk())
154 debugError(getMainController()->getMainSynthChain(), ok.getErrorMessage());
155
156 return rv;
157 }
158
159 return {};
160}
161
162void ScriptUserPresetHandler::setUseUndoForPresetLoading(bool shouldUseUndoManager)
163{

Callers

nothing calls this directly

Calls 5

getMainController_Method · 0.80
callSyncMethod · 0.45
wasOkMethod · 0.45
getMainSynthChainMethod · 0.45
getErrorMessageMethod · 0.45

Tested by

no test coverage detected