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

Method SetJsonValue

src/ClipBase.cpp:80–93  ·  view source on GitHub ↗

Load Json::Value into this object

Source from the content-addressed store, hash-verified

78
79// Load Json::Value into this object
80void ClipBase::SetJsonValue(const Json::Value root) {
81
82 // Set data from Json (if key is found)
83 if (!root["id"].isNull())
84 Id(root["id"].asString());
85 if (!root["position"].isNull())
86 Position(root["position"].asDouble());
87 if (!root["layer"].isNull())
88 Layer(root["layer"].asInt());
89 if (!root["start"].isNull())
90 Start(root["start"].asDouble());
91 if (!root["end"].isNull())
92 End(root["end"].asDouble());
93}
94
95// Generate JSON for a property
96Json::Value ClipBase::add_property_json(std::string name, float value, std::string type, std::string memo, const Keyframe* keyframe, float min_value, float max_value, bool readonly, int64_t requested_frame) const {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected