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:
Jonathan Thomas
2014-01-08 01:43:58 -06:00
parent 16479fba9d
commit 3c99e53dad
21 changed files with 395 additions and 118 deletions

View File

@@ -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();
}