diff --git a/include/Timeline.h b/include/Timeline.h index 5ffcb44a..a7e4eced 100644 --- a/include/Timeline.h +++ b/include/Timeline.h @@ -43,6 +43,7 @@ #include "Cache.h" #include "Color.h" #include "Clip.h" +#include "Point.h" #include "EffectBase.h" #include "ReaderBase.h" #include "Fraction.h" diff --git a/src/Coordinate.cpp b/src/Coordinate.cpp index 612eff67..5ca079c3 100644 --- a/src/Coordinate.cpp +++ b/src/Coordinate.cpp @@ -55,11 +55,11 @@ Json::Value Coordinate::JsonValue() { Json::Value root; root["X"] = X; root["Y"] = Y; - root["increasing"] = increasing; - root["repeated"] = Json::Value(Json::objectValue); - root["repeated"]["num"] = repeated.num; - root["repeated"]["den"] = repeated.den; - root["delta"] = delta; + //root["increasing"] = increasing; + //root["repeated"] = Json::Value(Json::objectValue); + //root["repeated"]["num"] = repeated.num; + //root["repeated"]["den"] = repeated.den; + //root["delta"] = delta; // return JsonValue return root; diff --git a/src/KeyFrame.cpp b/src/KeyFrame.cpp index 0cce9aab..f1347890 100644 --- a/src/KeyFrame.cpp +++ b/src/KeyFrame.cpp @@ -257,7 +257,7 @@ Json::Value Keyframe::JsonValue() { Point existing_point = Points[x]; root["Points"].append(existing_point.JsonValue()); } - root["Auto_Handle_Percentage"] = Auto_Handle_Percentage; + //root["Auto_Handle_Percentage"] = Auto_Handle_Percentage; // return JsonValue return root; diff --git a/src/Point.cpp b/src/Point.cpp index e3008238..7bd6a681 100644 --- a/src/Point.cpp +++ b/src/Point.cpp @@ -42,7 +42,7 @@ Point::Point() : interpolation(BEZIER), handle_type(AUTO) // Constructor which creates a single coordinate at X=0 Point::Point(float y) : - interpolation(BEZIER), handle_type(AUTO) { + interpolation(CONSTANT), handle_type(AUTO) { // set new coorinate co = Coordinate(0, y); @@ -106,10 +106,12 @@ Json::Value Point::JsonValue() { // Create root json object Json::Value root; root["co"] = co.JsonValue(); - root["handle_left"] = handle_left.JsonValue(); - root["handle_right"] = handle_right.JsonValue(); + if (interpolation == BEZIER) { + root["handle_left"] = handle_left.JsonValue(); + root["handle_right"] = handle_right.JsonValue(); + root["handle_type"] = handle_type; + } root["interpolation"] = interpolation; - root["handle_type"] = handle_type; // return JsonValue return root;