MCPcopy Create free account
hub / github.com/OpenShot/libopenshot / SetJsonValue

Method SetJsonValue

src/effects/Wave.cpp:136–152  ·  view source on GitHub ↗

Load Json::Value into this object

Source from the content-addressed store, hash-verified

134
135// Load Json::Value into this object
136void Wave::SetJsonValue(const Json::Value root) {
137
138 // Set parent data
139 EffectBase::SetJsonValue(root);
140
141 // Set data from Json (if key is found)
142 if (!root["wavelength"].isNull())
143 wavelength.SetJsonValue(root["wavelength"]);
144 if (!root["amplitude"].isNull())
145 amplitude.SetJsonValue(root["amplitude"]);
146 if (!root["multiplier"].isNull())
147 multiplier.SetJsonValue(root["multiplier"]);
148 if (!root["shift_x"].isNull())
149 shift_x.SetJsonValue(root["shift_x"]);
150 if (!root["speed_y"].isNull())
151 speed_y.SetJsonValue(root["speed_y"]);
152}
153
154// Get all properties for a specific frame
155std::string Wave::PropertiesJSON(int64_t requested_frame) const {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected