You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Added JSON change method, which accepts a diff / sync JSON array, and applies the changes to a timeline and timeline associated properties and items. Also fixed many bugs on JSON type checking.
This commit is contained in:
@@ -295,7 +295,7 @@ void Keyframe::SetJsonValue(Json::Value root) {
|
||||
// Clear existing points
|
||||
Points.clear();
|
||||
|
||||
if (root["Points"] != Json::nullValue)
|
||||
if (!root["Points"].isNull())
|
||||
// loop through points
|
||||
for (int x = 0; x < root["Points"].size(); x++) {
|
||||
// Get each point
|
||||
@@ -311,7 +311,7 @@ void Keyframe::SetJsonValue(Json::Value root) {
|
||||
AddPoint(p);
|
||||
}
|
||||
|
||||
if (root["Auto_Handle_Percentage"] != Json::nullValue)
|
||||
if (!root["Auto_Handle_Percentage"].isNull())
|
||||
Auto_Handle_Percentage = root["Auto_Handle_Percentage"].asBool();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user