Generate Json::Value for this object
| 936 | |
| 937 | // Generate Json::Value for this object |
| 938 | Json::Value Clip::JsonValue() const { |
| 939 | |
| 940 | // Create root json object |
| 941 | Json::Value root = ClipBase::JsonValue(); // get parent properties |
| 942 | root["parentObjectId"] = parentObjectId; |
| 943 | root["gravity"] = gravity; |
| 944 | root["scale"] = scale; |
| 945 | root["anchor"] = anchor; |
| 946 | root["display"] = display; |
| 947 | root["mixing"] = mixing; |
| 948 | root["composite"] = composite; |
| 949 | root["waveform"] = waveform; |
| 950 | root["scale_x"] = scale_x.JsonValue(); |
| 951 | root["scale_y"] = scale_y.JsonValue(); |
| 952 | root["location_x"] = location_x.JsonValue(); |
| 953 | root["location_y"] = location_y.JsonValue(); |
| 954 | root["alpha"] = alpha.JsonValue(); |
| 955 | root["rotation"] = rotation.JsonValue(); |
| 956 | root["time"] = time.JsonValue(); |
| 957 | root["volume"] = volume.JsonValue(); |
| 958 | root["wave_color"] = wave_color.JsonValue(); |
| 959 | root["shear_x"] = shear_x.JsonValue(); |
| 960 | root["shear_y"] = shear_y.JsonValue(); |
| 961 | root["origin_x"] = origin_x.JsonValue(); |
| 962 | root["origin_y"] = origin_y.JsonValue(); |
| 963 | root["channel_filter"] = channel_filter.JsonValue(); |
| 964 | root["channel_mapping"] = channel_mapping.JsonValue(); |
| 965 | root["has_audio"] = has_audio.JsonValue(); |
| 966 | root["has_video"] = has_video.JsonValue(); |
| 967 | root["perspective_c1_x"] = perspective_c1_x.JsonValue(); |
| 968 | root["perspective_c1_y"] = perspective_c1_y.JsonValue(); |
| 969 | root["perspective_c2_x"] = perspective_c2_x.JsonValue(); |
| 970 | root["perspective_c2_y"] = perspective_c2_y.JsonValue(); |
| 971 | root["perspective_c3_x"] = perspective_c3_x.JsonValue(); |
| 972 | root["perspective_c3_y"] = perspective_c3_y.JsonValue(); |
| 973 | root["perspective_c4_x"] = perspective_c4_x.JsonValue(); |
| 974 | root["perspective_c4_y"] = perspective_c4_y.JsonValue(); |
| 975 | |
| 976 | // Add array of effects |
| 977 | root["effects"] = Json::Value(Json::arrayValue); |
| 978 | |
| 979 | // loop through effects |
| 980 | for (auto existing_effect : effects) |
| 981 | { |
| 982 | root["effects"].append(existing_effect->JsonValue()); |
| 983 | } |
| 984 | |
| 985 | if (reader) |
| 986 | root["reader"] = reader->JsonValue(); |
| 987 | else |
| 988 | root["reader"] = Json::Value(Json::objectValue); |
| 989 | |
| 990 | // return JsonValue |
| 991 | return root; |
| 992 | } |
| 993 | |
| 994 | // Load JSON string into this object |
| 995 | void Clip::SetJson(const std::string value) { |
no outgoing calls
no test coverage detected