MCPcopy Create free account
hub / github.com/benkuper/Chataigne / getValuesAsJSON

Method getValuesAsJSON

Source/CustomVariables/Preset/CVPreset.cpp:60–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60var CVPreset::getValuesAsJSON()
61{
62 var data = new DynamicObject();
63 for (auto& cc : values.controllableContainers)
64 {
65 if (ParameterPreset* pp = dynamic_cast<ParameterPreset*>(cc.get()))
66 {
67 var ppData(new DynamicObject());
68 ppData.getDynamicObject()->setProperty("value", pp->parameter->value);
69 ppData.getDynamicObject()->setProperty("interpolationMode", pp->interpolationMode->getValueKey());
70 data.getDynamicObject()->setProperty(pp->shortName, ppData);
71
72 }
73 }
74 return data;
75}
76
77void CVPreset::loadValuesFromJSON(var data)
78{

Callers 1

triggerInternalMethod · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected